var xmlHttp



function showUser1(str)



{  //alert(str);



xmlHttp=GetXmlHttpObject()



if (xmlHttp==null)



 {



 alert ("Browser does not support HTTP Request")



 return 



 }



var url="getuser1.php"



url=url+"?q="+str



url=url+"&sid="+Math.random()



xmlHttp.onreadystatechange=stateChanged5 



xmlHttp.open("GET",url,true)



xmlHttp.send(null)



}



function stateChanged5() 



{ 



if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")

 { 



 document.getElementById("txtHint").innerHTML=xmlHttp.responseText;

 document.getElementById("txtHide").style.display='none';



 } 



}





function showUser(str)



{  //alert(str);



xmlHttp=GetXmlHttpObject()



if (xmlHttp==null)



 {



 alert ("Browser does not support HTTP Request")



 return 



 }



var url="getuser.php"



url=url+"?q="+str







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;



 document.getElementById("txtHide").style.display='none';



 } 



}







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 showColor(str)



{  



if(str=="")



{



alert('Please enter color.');



return false;



}



xmlHttp=GetXmlHttpObject()



if (xmlHttp==null)



 {



 alert ("Browser does not support HTTP Request")



 return 



 }



var url="getcolor.php"



url=url+"?color="+str;







url=url+"&sid="+Math.random()



xmlHttp.onreadystatechange=stateChanged1 



xmlHttp.open("GET",url,true)



xmlHttp.send(null)



}







function stateChanged1() 



{ 



if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")



 { 



 document.getElementById("txtColor").innerHTML=xmlHttp.responseText;



 document.getElementById("morecolor").value='';



 document.getElementById("col").style.display='none';



 } 



}















//show edit color







function showEditColor(str,id)



{  



//alert(id);



if(str=="")



{



alert('Please enter color.');



return false;



}



xmlHttp=GetXmlHttpObject()



if (xmlHttp==null)



 {



 alert ("Browser does not support HTTP Request")



 return 



 }



var url="getcolor.php"



url=url+"?mode=edit&color="+str+"&product_id="+id;







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("txtColor").innerHTML=xmlHttp.responseText;



 document.getElementById("morecolor").value='';



 document.getElementById("col").style.display='none';



 } 



}











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 copyShowUser(str)



{  //alert(str);



xmlHttp=GetXmlHttpObject()



if (xmlHttp==null)



 {



 alert ("Browser does not support HTTP Request")



 return 



 }



var url="copygetuser.php"



url=url+"?q="+str







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;



 document.getElementById("txtHide").style.display='none';



 } 



}
