<!--

/*===========================================================================*/

function clearme(FormField) {

	if (FormField.defaultValue==FormField.value) FormField.value=""

}//end function

/*===========================================================================*/

function formatCurrency(xPrice) {

	xPrice = xPrice.toString().replace(/\$|\,/g,'');

	xPounds = parseFloat(xPrice);

	blnSign = (xPounds == (xPounds = Math.abs(xPounds)));

	xPounds = Math.floor(xPounds*100+0.50000000001);

	intPence = xPounds%100;

	xPence = intPence.toString();

	xPounds = Math.floor(xPounds/100).toString();

	if(intPence<10)

		xPence = "0" + xPence;

	for (var i = 0; i < Math.floor((xPounds.length-(1+i))/3); i++)

		xPounds = xPounds.substring(0,xPounds.length-(4*i+3))+','+

		xPounds.substring(xPounds.length-(4*i+3));

	return (((blnSign)?'':'-') + '£' + xPounds + '.' + xPence);

}//end function

/*=========================================================================*/

function CopyAddress() {

	if (document.getElementById("usethesame").checked==true) {

		document.getElementById("xDELtitle").selectedIndex=document.getElementById("xCUSTtitle").selectedIndex;

		document.getElementById("xDELfirstname").value=document.getElementById("xCUSTfirstname").value;

		document.getElementById("xDELsurname").value=document.getElementById("xCUSTsurname").value;

		document.getElementById("xDELcompany").value=document.getElementById("xCUSTcompany").value;

		document.getElementById("xDELposition").value=document.getElementById("xCUSTposition").value;

		document.getElementById("xDELaddress1").value=document.getElementById("xCUSTaddress1").value;

		document.getElementById("xDELaddress2").value=document.getElementById("xCUSTaddress2").value;

		document.getElementById("xDELaddress3").value=document.getElementById("xCUSTaddress3").value;

		document.getElementById("xDELtown").value=document.getElementById("xCUSTtown").value;

		document.getElementById("xDELcounty").value=document.getElementById("xCUSTcounty").value;

		document.getElementById("xDELcountry").selectedIndex=document.getElementById("xCUSTcountry").selectedIndex;

		document.getElementById("xDELpostcode").value=document.getElementById("xCUSTpostcode").value;

		document.getElementById("xDELtel").value=document.getElementById("xCUSTtel").value;

		document.getElementById("xDELfax").value=document.getElementById("xCUSTfax").value;

		document.getElementById("xDELemail").value=document.getElementById("xCUSTemail").value;

	} else {

		document.getElementById("xDELtitle").selectedIndex=0;

		document.getElementById("xDELfirstname").value=document.getElementById("xDELfirstname").defaultValue;

		document.getElementById("xDELsurname").value=document.getElementById("xDELsurname").defaultValue;

		document.getElementById("xDELcompany").value=document.getElementById("xDELcompany").defaultValue;

		document.getElementById("xDELposition").value=document.getElementById("xDELposition").defaultValue;

		document.getElementById("xDELaddress1").value=document.getElementById("xDELaddress1").defaultValue;

		document.getElementById("xDELaddress2").value=document.getElementById("xDELaddress2").defaultValue;

		document.getElementById("xDELaddress3").value=document.getElementById("xDELaddress3").defaultValue;

		document.getElementById("xDELtown").value=document.getElementById("xDELtown").defaultValue;

		document.getElementById("xDELcounty").value=document.getElementById("xDELcounty").defaultValue;

		document.getElementById("xDELcountry").selectedIndex=0;

		document.getElementById("xDELpostcode").value=document.getElementById("xDELpostcode").defaultValue;

		document.getElementById("xDELtel").value=document.getElementById("xDELtel").defaultValue;

		document.getElementById("xDELfax").value=document.getElementById("xDELfax").defaultValue;

		document.getElementById("xDELemail").value=document.getElementById("xDELemail").defaultValue;

	}//end if (document.getElementById("usethesame").checked==true)

}//end function

/*=========================================================================*/

function UpdateField (Source, Target) {

	if (document.getElementById("usethesame").checked==true) {

		document.getElementById(Target).value=document.getElementById(Source).value;

	}//end if (document.getElementById("usethesame").checked==true)

}//end function

/*=========================================================================*/

function UpdateDrop (Source, Target) {

	if (document.getElementById("usethesame").checked==true) {

		document.getElementById(Target).selectedIndex=document.getElementById(Source).selectedIndex;

	}//end if (document.getElementById("usethesame").checked==true)

}//end function

/*=========================================================================*/

function UpdatePrice(MySelect) {

/*===========================================================================

DONT DO ANYTHING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

=============================================================================

	var xprodprice=document.getElementById("prodprice");

	var dxprodprice=document.getElementById("dprodprice");

	var xoptionprice=document.getElementById(MySelect);

		StartingPrice=xprodprice.innerHTML;

		OptionPrice=xoptionprice.options[xoptionprice.selectedIndex].title;

		StartingPrice=StartingPrice*1;

		OptionPrice=OptionPrice*1;

		xprodprice.innerHTML=(StartingPrice+OptionPrice);

		dxprodprice.innerHTML=formatCurrency(StartingPrice+OptionPrice);

=============================================================================

DONT DO ANYTHING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

===========================================================================*/

}//end function

/*===========================================================================*/

//==============================================================================================

function resetme(FormField) {

	FormField.value=FormField.defaultValue;

}//end function

/*=========================================================================*/

var xmlhttp;

var xmlResponse;

var strPredictions;

var xSEARCHstr;

/*=========================================================================*/

function LoadFile(url) {

	xmlhttp=null;

	if (window.XMLHttpRequest) {// Firefox, Opera, IE7

		xmlhttp=new XMLHttpRequest();

	} else if (window.ActiveXObject) {// IE6, IE5

		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");

	}//end if (window.XMLHttpRequest)

	if (xmlhttp!=null) {

		xmlhttp.open("GET",url,true);

		xmlhttp.send(null);

	}//end if (xmlhttp!=null)

	return xmlResponse;

}//end function

/*=========================================================================*/

function Predict(FormField) {

	xSEARCHstr=FormField.value;

	if (xSEARCHstr!="") {

		LoadFile("http://"+window.location.host+"/components/ajaxsearch.asp?xSEARCHstr="+xSEARCHstr);

		xmlhttp.onreadystatechange=function() {

			if (xmlhttp.readyState==4) {// 4 = "loaded"

				if (xmlhttp.status==200) {// 200 = "OK"

					xmlResponse=xmlhttp.responseText;

					if (xmlResponse!="no results") {

						document.getElementById("ajaxresults").innerHTML=xmlResponse;

						document.getElementById("ajaxresults").style.display="";

					} else {

						document.getElementById("ajaxresults").innerHTML="";

						document.getElementById("ajaxresults").style.display="none";

					} //end if (xmlResponse!="")

				}//end if (xmlhttp.status==200)

			}//end if (xmlhttp.readyState==4)

		}//end function

	} else {

		document.getElementById("ajaxresults").innerHTML="";

		document.getElementById("ajaxresults").style.display="none";

	}//end if (xSEARCHstr!="")

}//end function

/*=========================================================================*/

function zoom(MyImage) { 

	window.open(MyImage, "", "resizable=1,HEIGHT=600,WIDTH=800,scrollbars=1");

}//end function

/*=========================================================================*/

var xmlhttp;
var xmlResponse;
var strPredictions;
var xs;
//==============================================================================================
function LoadFile(url) {
	xmlhttp=null;
	if (window.XMLHttpRequest) {// Firefox, Opera, IE7
		xmlhttp=new XMLHttpRequest();
	} else if (window.ActiveXObject) {// IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}//end if (window.XMLHttpRequest)
	if (xmlhttp!=null) {
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}//end if (xmlhttp!=null)
	return xmlResponse;
}//end function
//==============================================================================================
function GenFeed() {
	LoadFile("http://www.jfcsports.co.uk/genfeed.asp");
}//end function
//==============================================================================================
-->