// JavaScript Document
function jaAddEvent(obj, evType, fn){
	if (obj.addEventListener){
		obj.addEventListener(evType, fn, false);
		return true;
	} else if (obj.attachEvent){
		var r = obj.attachEvent("on"+evType, fn);
		return r;
	} else {
		return false;
	}
}
function displayImage(str)
{
if (str.length==0)
  {
  document.getElementById("largeImage").innerHTML="";
  document.getElementById("subCatDesc").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  xmlhttpTwo=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  xmlhttpTwo=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("largeImage").innerHTML=xmlhttp.responseText;
    }
  }
  xmlhttpTwo.onreadystatechange=function()
  {
  if (xmlhttpTwo.readyState==4 && xmlhttpTwo.status==200)
    {
    document.getElementById("subCatDesc").innerHTML=xmlhttpTwo.responseText;
    }
  }
xmlhttp.open("GET","getimage.php?id="+str,true);
xmlhttpTwo.open("GET","imageDesc.php?id="+str,true);
xmlhttp.send();
xmlhttpTwo.send();
}

function displayProductImage(str,subcat)
{
if (str.length==0)
  {
  document.getElementById("rightBlock").innerHTML="";
  return;
  }
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("rightBlock").innerHTML=xmlhttp.responseText;
    }
  }
 
xmlhttp.open("GET","head.php?id="+str+"&subcat="+subcat,true);
xmlhttp.send();
}
