// JavaScript Document
       
function show_manufaturer(id)
{
    xmlHttp=GetXmlHttpObject()
	var url="include/common.php";
	url=url+"?page="+'index'+"&action=get_manufacture&selected_id="+id;
	xmlHttp.onreadystatechange=showmsg;
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
 
 }
 function showmsg()             ///////////// Response For Ajax
{
  if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
	  document.getElementById("show_manu_data").innerHTML=xmlHttp.responseText
	 	}
 }
 
 function show_releted_model(id)
 {
    var sim=document.getElementById("sel_contract").value
	xmlHttp=GetXmlHttpObject()
	var url="include/common.php";
	url=url+"?page="+'index'+"&action=get_rel_model&manufacture_id="+id+"&sim="+sim;
	xmlHttp.onreadystatechange=showmsg;
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
    }
function search_model(id)
{
 xmlHttp=GetXmlHttpObject()
	var url="include/common.php";
	url=url+"?page="+'index'+"&action=get_mobile_model&manufacture_id="+id;
	xmlHttp.onreadystatechange=showmodel;
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
 
 }
	
	function showmodel()             ///////////// Response For Ajax
{
  if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
	  document.getElementById("sel_model").innerHTML=xmlHttp.responseText
	 	}
 }
	
	function chk()
	{
	 var brand=document.frm_contract_search.sel_mobile_brand.value
	 var model=document.frm_contract_search.sel_handset_model.value
	if(brand!="")
	{
	  if(model=="")
	   {
	    alert("Please Select Hand Set Model")
		document.frm_contract_search.sel_handset_model.focus()
		return false
		}
	  }
	 }
		
  function GetXmlHttpObject()
    { 
      var objXMLHttp=null
        if (window.XMLHttpRequest)
         {
          objXMLHttp=new XMLHttpRequest()
       }
     else if (window.ActiveXObject)
     {
       objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
       }
         return objXMLHttp
    }

