// JavaScript Document
// JavaScript Document
var framesetQuery = "";
function getQS( ) {
	if ( window.location.search != 0 ) {
		return window.location.search;
	} else {
		return "";
	}
}

function getParameter ( queryString, parameterName ) {
// Add "=" to the parameter name (i.e. parameterName=value)
var parameterName = parameterName + "=";
if ( queryString.length > 0 ) {
	// Find the beginning of the string
	begin = queryString.indexOf ( parameterName );
	// If the parameter name is not found, skip it, otherwise return the value
	if ( begin != -1 ) {
		// Add the length (integer) to the beginning
		begin += parameterName.length;
		// Multiple parameters are separated by the "&" sign
		end = queryString.indexOf ( "&" , begin );
		if ( end == -1 ) {
			end = queryString.length
		}
	// Return the string
	return unescape ( queryString.substring ( begin, end ) );
	}
	// Return "null" if no parameter has been found
	return null;
	}
}

function readCookie(name)
{
	//alert( name );
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
