function getproductimages(divid,product_id)
{
	xmlHttp1=GetXmlHttpObject();
	if (xmlHttp1==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	}
	var url="ajaxresponse.php";
	url=url + "?productid=" + product_id;
	xmlHttp1.onreadystatechange=function()
	{
			if (xmlHttp1.readyState<4) 
			{
            	document.getElementById(divid).innerHTML = "<div style='height:800px;text-align:center;'><br><br><img src=../images/loader.gif alt='loading'></div>";
        	} 

			if (xmlHttp1.readyState==4)
			{	 
				document.getElementById(divid).innerHTML=xmlHttp1.responseText;
			}
			 
	}
	xmlHttp1.open("GET",url,true);
	xmlHttp1.send(null);
}


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 showhideimage(num)
{
	for(i=0;i<=6;i++)
	{
		var divid='products_image_xl_'+i;

		if(i==num)
		{
			document.getElementById(divid).style.display = 'block';
		}
		else
		{
			document.getElementById(divid).style.display = 'none';
		}
	}



}

function imagecall(divid,id,num,pname)
{
	
    
xmlHttp1=GetXmlHttpObject();
	if (xmlHttp1==null)
  	{
  		alert ("Your browser does not support AJAX!");
  		return;
  	}
	
	var url="image_call_ajax.php";
	url=url + "?pid=" + id;
	url=url + "&num=" + num;
	url=url + "&pname=" + pname;

	xmlHttp1.onreadystatechange=function()
	{
			if (xmlHttp1.readyState<4) 
			{
            	//document.getElementById(divid).innerHTML = "<div style='height:800px;text-align:center;'><br><br><img src=images/loader.gif alt='loading'></div>";
        	} 

			if (xmlHttp1.readyState==4)
			{	 
				
              
              document.getElementById(divid).innerHTML=xmlHttp1.responseText;
			}
			 
	}
	xmlHttp1.open("POST",url,true);
	xmlHttp1.send(null);

	
}






