/*--------------------------------------------------GetValueReturns the value of a query string variable when givena variable name.Example:http://some.url/?page=1myValue = GetValue('page');myValue is now set to 1----------------------------------------------------*/function GetValue(varName) {	squery = location.search;	idx = squery.indexOf(varName);	if (idx != -1) {		squery = squery.substr(idx+1+varName.length, squery.length);			// grab value of varName		if (squery.length > 0) {			nextParam = squery.indexOf("&"); // are there multiple values?			if (nextParam != -1) {				theValue = squery.substr(0, nextParam);			} else {				theValue = squery.substr(0, squery.length);			}		}	} else {		theValue = "";	}		return theValue;}