// JavaScript Document
var xmlHttp

// Function for showing simple pages in which nothing is passed through url

function showPages(page)
{ 
		xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 

	var url=page
	url=url
	xmlHttp.onreadystatechange=statePage 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

}

//Show Products
function showCountry(str)
{ 
	xmlHttp=GetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 

	var url="state.php"
	url=url+"?cat="+str
	xmlHttp.onreadystatechange=statePage 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


//This function is used in the showLoginPage() function
function statePage() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("statelist").innerHTML=xmlHttp.responseText 
	} 
} 


//Check the browser compatibility
function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}

//function to get the values in confirm order field
function GetOrderDetails(orderSuccess)
{
	var buyer=document.frmSubmit.buyer.value;
	var billingadd=document.frmSubmit.billingadd.value;
	var shippingadd=document.frmSubmit.shippingadd.value;
	document.write(buyer);
document.write(billingadd);
document.write(shippingadd);

}