// JavaScript Document
// **********************************************************************************
// Get the value of a specified query string item
// **********************************************************************************
function RequestQueryString( strName ) {
	var strQuery = document.location.href;
	var strResult = "" ;

	var intPos = strQuery.indexOf( strName );

	if (intPos > 0) {
		intPos += strName.length + 1 ;
		strResult = intPos ;

		var intEnd = strQuery.indexOf( "&", intPos )

		// value could be at the end of the QueryString
		if (intEnd <= 0) intEnd = strQuery.length ;

		strResult = strQuery.substring( intPos, intEnd ) ;
	}

	return URLDecode(strResult) ;
}
// **********************************************************************************
function URLDecode( strQuery ) {
	var intPos = 0 ;
	var strResult1 = "" ;
	var strResult2 = "" ;
	var intOldPos

	// replace + (spaces)
	intPos = strQuery.indexOf( "+" ) ;

	if (intPos == -1) strResult1 = strQuery ;
	else strResult1 = strQuery.substring(0, intPos) ;

	while (intPos >= 0) {
		strResult1 += " " ;

		intOldPos = intPos + 1 ;

		// get next + (space)
		intPos = strQuery.indexOf( "+", intOldPos ) ;

		if (intPos == -1) strResult1 += strQuery.substring( intOldPos, strQuery.length ) ;
		else strResult1 += strQuery.substring( intOldPos, intPos ) ;
	}

	// replace character codes
	intPos = strResult1.indexOf( "%" ) ;

	if (intPos == -1) strResult2 = strResult1 ;
	else strResult2 = strResult1.substring(0, intPos) ;

	while (intPos >= 0) {
		strResult2 += unescape(strResult1.substring( intPos, intPos + 3 )) ;

		intOldPos = intPos + 3 ;

		// get next character code
		intPos = strResult1.indexOf( "%", intOldPos ) ;

		if (intPos == -1) strResult2 += strResult1.substring( intOldPos, strResult1.length ) ;
		else strResult2 += strResult1.substring( intOldPos, intPos ) ;
	}

	return strResult2 ;
}
// **********************************************************************************
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// **********************************************************************************
function leavingSiteAlert() {

	alert(" You are now leaving the Phoenix website. Phoenix has no control over and will accept no responsibility or liability in respect of the material on any other website.");
}