// JavaScript Document
var xmlHttp;
function fnShowModels(cat)
{ 
//document.getElementById("cPath1").disabled=true;
//document.getElementById("cPath1").disabled=false;
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
 alert ("Browser does not support HTTP Request");
 return
 }

document.getElementById("lblLoad1").innerHTML="Wait Loading...";
 //var cPath=document.getElementById("cPath").value;
 var url="callAjaxin.php?cat="+cat;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function fnShowModels1(getSelected)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
 alert ("Browser does not support HTTP Request");
 return
 }

document.getElementById("lblLoad2").innerHTML="Wait Loading...";

var url="callAjaxin.php?cat1="+getSelected;
xmlHttp.onreadystatechange=stateChanged2;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function fnShowModels2(getSelected)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
 alert ("Browser does not support HTTP Request");
 return
 }

document.getElementById("lblLoad3").innerHTML="Wait Loading...";

var url="callAjaxin.php?cat2="+getSelected;
xmlHttp.onreadystatechange=stateChanged6;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	//alert(xmlHttp.responseText);
	document.getElementById("getAjax").innerHTML=xmlHttp.responseText ;
 document.getElementById("lblLoad1").innerHTML="";
	
 } 
}
function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	//alert(xmlHttp.responseText);
	document.getElementById("getAjax1").innerHTML=xmlHttp.responseText ;
 document.getElementById("lblLoad2").innerHTML="";
	
 } 
}
function stateChanged6() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	//alert(xmlHttp.responseText);
	document.getElementById("getAjax2").innerHTML=xmlHttp.responseText ;
 document.getElementById("lblLoad3").innerHTML="";
	
 } 
}
function fnGetProducts(subcat)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	 	alert ("Browser does not support HTTP Request");
	 return
	}
	document.getElementById("lblLoad11").innerHTML="Wait Loading...";
	
	var url="callAjaxin.php?subCat="+subcat;
	xmlHttp.onreadystatechange=stateChanged1 ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function fnGetProducts1(getSelected1)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	 	alert ("Browser does not support HTTP Request");
	 return
	}
	document.getElementById("lblLoad21").innerHTML="Wait Loading...";
	
	
	var url="callAjaxin.php?subCat1="+getSelected1;
	xmlHttp.onreadystatechange=stateChanged3;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function fnGetProducts2(getSelected1)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	 	alert ("Browser does not support HTTP Request");
	 return
	}
	document.getElementById("lblLoad31").innerHTML="Wait Loading...";
	//var selected = document.getElementById("frmSpecs2").ddCat2.options[document.getElementById("frmSpecs2").ddCat2.options.selectedIndex].value;
	var url="callAjaxin.php?subCat2="+getSelected1;
	xmlHttp.onreadystatechange=stateChanged7 ;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
function stateChanged1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	//alert(xmlHttp.responseText);
	document.getElementById("getModelAjax").innerHTML=xmlHttp.responseText;
	document.getElementById("lblLoad11").innerHTML="";
	
 } 
}
function stateChanged3() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	//alert(xmlHttp.responseText);
	document.getElementById("getModelAjax1").innerHTML=xmlHttp.responseText;
	document.getElementById("lblLoad21").innerHTML="";
	
 } 
}
function stateChanged7() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 	//alert(xmlHttp.responseText);
	document.getElementById("getModelAjax2").innerHTML=xmlHttp.responseText;
	document.getElementById("lblLoad31").innerHTML="";
	
 } 
}
function fnCompare()
{
	var pID = document.form1.ddPro.value;
	var pID1 = document.form1.ddPro1.value;
	var pID2 = document.form1.ddPro2.value;
	if((pID==0) || (pID1==0))
	{
    alert("Please select Models to compare");
	return false;		
	}
	
	return true;
	
}

function fnShowImg()
{
	document.getElementById("imgReview").src = "http://laptopreviewsonline.com/images/submit_btno.gif";
	
}
function fnShowImg1()
{
	document.getElementById("imgReview").src = "http://laptopreviewsonline.com/images/submit_btn.gif";
	
}

function addfavoris() {
if ( navigator.appName != 'Microsoft Internet Explorer' )
{ window.sidebar.addPanel(document.title,location.href,""); }
else { window.external.AddFavorite(location.href,document.title); } }