// JavaScript Document
function showDropdownshead(Type)
{ 
xmlHttp1=GetXmlHttpObject1()
if (xmlHttp1==null)
{
alert ("Browser does not support HTTP Request")
return
} 
var url="ajax/header.asp";
url=url + "?Type=" + Type;
//alert(url);
url=url+"&sid="+Math.random()

xmlHttp1.onreadystatechange=function(){
		if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete"){
			document.getElementById(2222).style.visibility='visible';
			document.getElementById(2222).innerHTML=xmlHttp1.responseText 
		} 
	}
xmlHttp1.open("GET",url,true)
xmlHttp1.send(null)
}



function GetXmlHttpObject1()
  {  
  var xmlHttp;
  try
    {    
		// Firefox, Opera 8.0+, Safari    
		xmlHttp=new XMLHttpRequest();   
		 return xmlHttp;
	}
  catch (e)
    {    
		// Internet Explorer    
		try
      {   
	  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");  
	  return xmlHttp;
	  }
    catch (e)
      {      
	  try
        {        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");  
				return xmlHttp;
		}
      catch (e)
        {        alert("Your browser does not support AJAX!");       
				return false;       
		}      
	   }    
	}  
}
var popp=0;
function popUp(URL)
{
	if(popp)
	{
		if(!popp.closed)
		{
			popp.close();
		}
	}
	popp=open(URL,'','width=380,height=320,menubar=no,resizable=1,dependent=1,toolbar=no,top=90,left=240,scrollbars=1');
}
function submitPhoneType(phonename){
	
	if(document.formphtype.phoneType.value=="Contract")	{
		document.formphtype.action = "Phone_Deal.asp?Ph=" + phonename;
		document.formphtype.submit();}
	else if(document.formphtype.phoneType.value=="PayG"){
		document.formphtype.action = "phone_dealpayg.asp?Ph=" + phonename;
		document.formphtype.submit();}
	else if(document.formphtype.phoneType.value=="SimFree"){
		document.formphtype.action = "phone_dealsimfree.asp?Ph=" + phonename;
		document.formphtype.submit();}
	else if(document.formphtype.phoneType.value=="Clearance"){
		document.formphtype.action = "clearance-deals.asp?Ph=" + phonename;
		document.formphtype.submit();}
}

function submitPhoneType1(phonename,net){
	if(document.frmrrefinesearch.phoneType.value=="Contract"){
		document.frmrrefinesearch.action = "Phone_Deal.asp?Ph="+phonename+"&net"+net;
		document.frmrrefinesearch.submit();}
	else if(document.frmrrefinesearch.phoneType.value=="PayG"){
		document.frmrrefinesearch.action = "phone_dealpayg.asp?Ph=" + phonename;
		document.frmrrefinesearch.submit();}
	else if(document.frmrrefinesearch.phoneType.value=="SimFree"){
		document.frmrrefinesearch.action = "phone_dealsimfree.asp?Ph=" + phonename;
		document.frmrrefinesearch.submit();}
    else if(document.frmrrefinesearch.phoneType.value=="Clearance"){
		document.frmrrefinesearch.action = "clearance-deals.asp?Ph=" + phonename;
		document.frmrrefinesearch.submit();}		
}
function select_phone(reff,Type){
		var reffgo = reff.value;
		if (Type=='Contract'){
		window.location = "Phone_Deal.asp?Ph="+ reff }
		if (Type=='C'){
		window.location = "handset_gift_deal.asp?Ph="+ reff }
		else if (Type=='SimFree'){
		window.location = "Phone_Dealsimfree.asp?Ph="+ reff}
		else if (Type=='PAYG'){
		window.location = "Phone_Dealpayg.asp?Ph="+ reff}
		else if (Type=='12MonthsFree'){
		window.location = "12phone_deal.asp?Ph="+ reff +"&t=1"}
		else if (Type=='Clearance'){
		window.location = "clearance-deals.asp?Ph="+ reff}
	}
function select_phonenet(reff,Type){
		window.location = "netphone_Deal.asp?Ph="+ reff +"&netid="+Type		
	}
function select_rsH(reff){
			document.getElementById(50).action = "tariff_deal.asp?tariff="+ reff.value;
			document.getElementById(50).submit();}
function select_qdf(reff){
			document.getElementById(50).action = "QuickDealFinder.asp?id_value="+ reff.value;
			document.getElementById(50).submit();}