function gotoShowMobile()
{
 //alert(document.getElementById("brand").value);
 if(document.getElementById("brand").value=="select")
 {
 	alert("Select Brand");
 }
 else if(document.getElementById("modeltop").value=="NOKIA--Select--" || document.getElementById("modeltop").value=="MOTOROLA--Select--" ||
			document.getElementById("modeltop").value=="BLACKBERRY--Select--" || document.getElementById("modeltop").value=="DOPOD--Select--" ||
 			document.getElementById("modeltop").value=="HP-IPAQ--Select--" || document.getElementById("modeltop").value=="I-MATE--Select--" ||
 			document.getElementById("modeltop").value=="LG--Select--" || document.getElementById("modeltop").value=="O2--Select--" ||
 			document.getElementById("modeltop").value=="SAMSUNG--Select--" || document.getElementById("modeltop").value=="SONYERICSSON--Select--")
 {
 	alert("Select Model");
 }
 else
 {
 	var mid=document.getElementById("modeltop").value;
 	//alert(mid);
 	window.location="showmobile.php?id="+mid;
 }
}

function createXMLtop()
{
	if(window.ActiveXObject)
		xhr=new ActiveXObject("Microsoft.XMLHTTP");
	else if(window.XMLHttpRequest)
	{
		xhr=new XMLHttpRequest();
		if(xhr.overrideMimeType)
		{
		  xhr.overrideMimeType("text/xml");
		}
	}
		//alert(xhr);
}
function startRequesttop(path)
{
	createXMLtop();
	var url="quickload.php?val="+path;
	//alert(url);
	xhr.onreadystatechange=validatetop;
	xhr.open("GET",url,true);
	xhr.send(null);
}
function validatetop()
{

	if(xhr.readyState==4)
	{
		document.getElementById('modeltop').options.length=0;
		var header = document.getElementById("modeltop");
		if(header.hasChildNodes()) 
		{
			header.removeChild(header.childNodes[0]);
		}

		var ss=xhr.responseText;
		if(ss=="nothing")
		{
			var opt=new Option();
			opt.text="--Select--";
			opt.value="select";
			document.getElementById('modeltop').options[0]=opt;
		}
		else
		{
			var dip=ss.split(",");
		//	alert(dip);
			for(var i=0;i<dip.length;i++)
			{
				var opt=new Option();
				opt.text=dip[i];
				opt.value=dip[i];
				document.getElementById('modeltop').options[i]=opt;
			}
		}
	
		
	}
}

function open_TERMS()
{

window.open('terms.htm','','toolbar=no,location=no,status=no,menubar=no,resizable,scrollbars,width=515,height=300,top=200,left=300');
}
function open_PRIVACY()
{
window.open('privacy.htm','','toolbar=no,location=no,status=no,menubar=no,resizable,scrollbars,width=515,height=300,top=200,left=300');
}
function open_DISCLAIMER()
{
window.open('disclaimer.htm','','toolbar=no,location=no,status=no,menubar=no,resizable,scrollbars,width=515,height=300,top=200,left=300');
}