<script language="javascript" type="text/javascript">
function changebgcolor(id,color) {
document.getElementById(id).style.backgroundColor=color;
}
function changevalue(field,color)
{
for(var i=0;i<document.cart_quantity.elements.length;i++)
{
if(document.cart_quantity.elements[i].name==field)
{
document.cart_quantity.elements[i].value=color;
}
}
}
var xmlHttp
function getattribimage(attribfield,width,height,products_options_values_id,products_id)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url="attrib_prod_info.php";
url=url+"?width="+width+"&height="+height+"&products_options_values_id="+product s_options_values_id+"&products_id="+products_id;
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
function stateChanged()
{
if (xmlHttp.readyState==4)
{
var product_color_image=xmlHttp.responseText;
if(product_color_image!=''){
document.getElementById('productMainImage').innerHTML = product_color_image;
}
}
}
//--------------------------------------------------------
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 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;
}
</script>
Bookmarks