<!-- Hide code from non-js browsers
//This enables parameters to be passed via the URL and then interrogated
//There is also the linkit function that is used to
//pass the partner to another page via the URL
//for use when a form is NOT being submitted

inputData = top.location.search;
inputData = inputData.replace("?","&");
inputData=inputData+"&";
function getURLdata(searchIndex) {
	//check to see if the variable exists
	//First as the first variable in the string
	if(eval("inputData.indexOf('&"+searchIndex+"=')")>-1)
	{
		var startTemp = inputData.indexOf("&"+searchIndex+"=")+(searchIndex.length+2)
		var endTemp = inputData.indexOf("&",(inputData.indexOf("&"+searchIndex+"=")+1))
		var temp=inputData.substring(startTemp,endTemp)
	}
	else {
		var temp="0"
	}
	return temp
}
var partner=getURLdata("partner")
if (partner=="fred") {
	alert("partner is "+partner)
}

var popup=getURLdata("popup")
if (popup == 1) closeTxt = "<A HREF='javascript:this.window.close()'><b>close window </b></A>";
else closeTxt = "<A HREF='javascript:history.back()'>back </A>";

function linkit(pageref) {
	if (pageref.indexOf('?')>-1) {
		if (partner=="fred") {
			alert("adding to existing string")
		}
		document.location=pageref+"&partner="+partner	
	}
	else {
		if (partner=="fred") {
			alert("new string")
		}
		document.location=pageref+"?partner="+partner
	}	

}

// end hiding -->
