	function popup() {
		//Security Guarantee
		if (arguments.length<1)	{
			features="toolbar=no,location=no,scrollbars=no,status=no";
			u=document.URL;
			(u.search(/S\SCC.html/) != -1)?sec="CC":(u.search(/S\SDD.html/) != -1)?sec="DD":(u.search(/S\SINV.html/) != -1)?sec="INV":(u.search(/S\SCCDD.html/) != -1)?sec="CCDD":(u.search(/S\SCCDDINV.html/) != -1)?sec="CCDDINV":(u.search(/S\SDDINV.html/) != -1)?sec="DDINV":(u.search(/S\SCCINV.html/) != -1)?sec="CCINV":(u.search(/competition.html/) != -1)?sec="INV":(u.search(/\SGCC.html/) != -1)?sec="CC":secName;
			secName=sec;
			if(secName=="CC")	{secName="sec_"+secName+".shtml";height=280;}
			else if(secName=="DD") {secName="sec_"+secName+".shtml";height=310;}
			else if(secName=="CCDD") {secName="sec_"+secName+".shtml";height=380;}
			else if(secName=="INV") {secName="sec_"+secName+".shtml";height=200;}
			else if(secName=="DDINV") {secName="sec_DD.shtml";height=310;}
			else if(secName=="CCINV") {secName="sec_CC.shtml";height=280;}
			else{secName="sec_CCDD.shtml";height=380;}
			window.open('../popups/'+secName, 'popWin','width=250,'+'height='+height+','+features);	
		}
		//Print DD, DD Guar, Prize Draw Rules
		else if (arguments.length==1) {
			features="toolbar=no,location=no";
			popName=arguments[0];
			if (popName=='guar_DD') {whs = "width=300,height=450,scrollbars=no,status=no";}
			else if (popName=='print_DD') {whs = "width=380,height=500,scrollbars=yes,resizable=yes,status=yes";}
			else if (popName=='more_info') {whs = "width=380,height=600,scrollbars=yes,resizable=yes,status=yes";}
			else {whs = "width=250,height=340,scrollbars=yes,resizable=yes,status=no";}
			popName+=".shtml";
			window.open('../popups/'+popName,'popWin',whs+','+features);
		}
		//Popups
		else if (arguments.length==3) {
			features="toolbar=no,location=no,scrollbars=no,status=no";
			popName=arguments[0];w=arguments[1];h=arguments[2];
			popName+=".html";
			window.open('../popups/'+popName,'popWin','width='+w+',height='+h+','+features);
		}
	}
	
function chooseCCorDD() {
	if (document.getElementById("price").value.search(/_CC_/) != -1) {
		CC() ;
	} else {
		DD();
	}
}
		
function CC() {
	
		document.getElementById("CC").style.display = "block";
		document.getElementById("DD").style.display = "none";
		payment_type="Credit Card";
		document.getElementById('pay_method').value="CC";
		
	
}

 
function DD() {
		document.getElementById("CC").style.display = "none";
		document.getElementById("DD").style.display = "block";
		payment_type="Direct Debit";
		document.getElementById('pay_method').value="DD";
	
}