// JavaScript Document

//Ajax Code for Model Name Search

var xmlHttpmodelnamexmlHttp

function ShowModelName(handsetName)
{ 
	xmlHttpmodelnamexmlHttp=GetXmlHttpObject()
	if (xmlHttpmodelnamexmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="include/source/modelnamesearch.asp";
	url=url + "?phoneName=" + handsetName ;

	url=url+"&sid="+Math.random()
		
	xmlHttpmodelnamexmlHttp.onreadystatechange=stateChangedmodel 
	xmlHttpmodelnamexmlHttp.open("GET",url,true)
	xmlHttpmodelnamexmlHttp.send(null)
}

function stateChangedmodel() 
{ 
	if (xmlHttpmodelnamexmlHttp.readyState==4 || xmlHttpmodelnamexmlHttp.readyState=="complete")
	{ 
		document.getElementById(2456).innerHTML=xmlHttpmodelnamexmlHttp.responseText 
		document.frmheader.select3.options[0].selected = true;
		document.getElementById("simfree").style.display="none";
		document.getElementById("contract").style.display="none";
		document.getElementById("payg").style.display="none";
	} 
} 

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}

