var xmlHttp


 
function showTextFeild()
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
var url="process/show_feild.php"
url=url+"?sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged5
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 


function stateChanged5() 
{ 
/*document.write(xmlHttp.readyState);return*/
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("textFeild").innerHTML=xmlHttp.responseText 
 } 
}



function showUser(type_id, pic_id)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }

var url="process/getprice.php"
url=url+"?type_id="+type_id+"&pic_id="+pic_id+"&fn="+1
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 

 document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
 
 } 
}

/*show price */
function showPrice(size_id, format, pic_id, type_id, qty)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
 /*document.write(size_id, format, pic_id, type_id, qty)
 exit;*/


var url="process/getprice.php"
url=url+"?size_id="+size_id+"&format="+format+"&pic_id="+pic_id+"&type_id="+type_id+"&qty="+qty+"&fn="+2
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txtHint2").innerHTML=xmlHttp.responseText 
 } 
}

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;
}

/*update Price */
function updatePrice(qty, size_id, format, pic_id, type_id)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
 /*document.write(qty, size_id, format, pic_id, type_id)
 exit;*/

var url="process/getprice.php"
url=url+"?qty="+qty+"&size_id="+size_id+"&format="+format+"&pic_id="+pic_id+"&type_id="+type_id+"&fn="+3
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}



/*update Price and qty in shopping cart */
function updateQty(qty, ln, p)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
 
 /*document.write(qty, ln, p)
 exit;*/

var url="process/changeQty.php"
url=url+"?qty="+qty+"&ln="+ln+"&p="+p
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChangedCart
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChangedCart() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("cartPrice").innerHTML=xmlHttp.responseText 
 } 
}




function stateChanged2() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txtHint2").innerHTML=xmlHttp.responseText 
 } 
}

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;
}
