// ajax class creation

function RemoteRequestObjectc()
 {
 	var A = false;
 	
 	try
 	{
 		A = new ActiveXObject("Msxml2.XMLHTTP");
 	}
 	catch(e)
 	{
 		try
 		{
 			A = new ActiveXObject("Microsoft.XMLHTTP");
 		}
 		catch(err)
 		{
 			A = false;
 		}
 	}
 	
 	if(!A && typeof(XMLHttpRequest) != 'undefined')
 		A = new XMLHttpRequest();
 		
 	return A;
 }


var xmlHttpc
function fnPackageDeals(cid)
{ 
	xmlHttpc=RemoteRequestObjectc()
if (xmlHttpc==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
	//var sendVars =fnParameters(pid);
		//var url="session_custom_page4.php?"+sendVars+"&pid="+pid
	var url="getpackage_deals.php";
	var params ="cid="+cid+"&rand="+Math.random();
	//alert(params)
	xmlHttpc.open("POST",url,true)
	xmlHttpc.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttpc.setRequestHeader("Content-length", params.length);

	xmlHttpc.setRequestHeader("Connection", "close");
			
			
			//xmlHttpc.onreadystatechange(pid)=stateChangedc

			xmlHttpc.onreadystatechange=function()
			{
				if (xmlHttpc.readyState==4 || xmlHttpc.readyState=="complete")
					{ 
						
						document.getElementById("somediv").style.display="";
						document.getElementById("somediv").innerHTML="";
						document.getElementById("somediv").innerHTML="<div id='somediv_val' class='popupbg'>"+xmlHttpc.responseText+"</div>"		
						divwin=dhtmlwindow.open('divbox', 'div', 'somediv', 'Pricing & Packages', 'width=450px,left=200px,top=60px,height=340px,scrolling=0'); 
						
				} 		
			}
		
		
	xmlHttpc.send(params)
	
		
}
var xmlHttpc1
function fnProductDetails(cid)
{ 
	xmlHttpc1=RemoteRequestObjectc()
	if (xmlHttpc1==null)
	{
		 alert("Browser does not support HTTP Request")
		return
	 } 
	
	var url="getproduct_details.php";
	var params ="cid="+cid+"&rand="+Math.random();
	//alert(params)
	xmlHttpc1.open("POST",url,true)
	xmlHttpc1.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttpc1.setRequestHeader("Content-length", params.length);

	xmlHttpc1.setRequestHeader("Connection", "close");
			
	xmlHttpc1.onreadystatechange=function()
	{
		if (xmlHttpc1.readyState==4 || xmlHttpc1.readyState=="complete") { 
			document.getElementById("somediv").style.display="";
			document.getElementById("somediv").innerHTML="";
			document.getElementById("somediv").innerHTML="<div id='somediv_val' class='popupbg'>"+xmlHttpc1.responseText+"</div>"		
			divwin=dhtmlwindow.open('divbox', 'div', 'somediv', 'Product Description', 'width=460px,left=200px,top=100px,height=250px,scrolling=1'); 
		} 		
	}
	xmlHttpc1.send(params)
	
		
}

var xmlHttpc2
function fnNotFoundColor()
{ 
	xmlHttpc2=RemoteRequestObjectc()
	if (xmlHttpc2==null)
	{
		 alert("Browser does not support HTTP Request")
		return
	 } 
	
	var url="getnotfoundcolor.php";
	var params ="rand="+Math.random();
	//alert(params)
	xmlHttpc2.open("POST",url,true)
	xmlHttpc2.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttpc2.setRequestHeader("Content-length", params.length);

	xmlHttpc2.setRequestHeader("Connection", "close");
			
	xmlHttpc2.onreadystatechange=function()
	{
		if (xmlHttpc2.readyState==4 || xmlHttpc2.readyState=="complete") { 
			document.getElementById("somediv").style.display="";
			document.getElementById("somediv").innerHTML="";
			document.getElementById("somediv").innerHTML="<div id='somediv_val' class='popupbg'>"+xmlHttpc2.responseText+"</div>"		
			divwin=dhtmlwindow.open('divbox', 'div', 'somediv', "Don't see the color you're looking for?", 'width=600px,left=75px,top=75px,height=600px,scrolling=0'); 
		} 		
	}
	xmlHttpc2.send(params)
	
		
}

function fnGoContactus() {
	dhtmlwindow.close(document.getElementById('divbox'));
	window.location.href="customer_service.php"
}

