function ajaxchange(v,v1)
{
	var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
		
		if(xmlHttp.readyState==1)
     	{
			document.getElementById('idivload').style.display='';
			document.getElementById('imainimage1').style.opacity=0.40;
			document.getElementById('imainimage1').style.filter='alpha(opacity=40)';
	  	}
		if(xmlHttp.readyState==4)
     	{ 
			var str=xmlHttp.responseText;
			var str1=str.split('|')[0];
			var str2=str.split('|')[1];
			document.getElementById('imainimage').innerHTML=str1;
			document.getElementById('idivload').style.display='none';
			document.getElementById('izoom').innerHTML=str2;
			$('.jqzoom').jqzoom({
            zoomType: 'standard',
            lens:true,
            preloadImages: false,
            alwaysOn:false
        });
		}
    }
  xmlHttp.open("POST","change-image.php?nm="+v+"&id="+v1,true);
  
  xmlHttp.send(null);
}





function ajaxsizechange(v1,v2)
{
	
	var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
		
		
		if(xmlHttp.readyState==4)
     	{ 
			
			var str=xmlHttp.responseText;
			var str1=str.split('|')[0];
			var str2=str.split('|')[1];
			document.getElementById('istock').innerHTML=str1;
			document.getElementById('iclr').innerHTML=str2;
			
		}
    }
  xmlHttp.open("POST","changesize.php?sz="+v1+"&id="+v2,true);
  
  xmlHttp.send(null);
}


function ajaxnewsletterrequest(v)
{
	var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
		
		if(xmlHttp.readyState==1)
     	{
			document.getElementById('inreq').innerHTML='<font color="#FFFFFF">Processing...</font>';
	  	}
		if(xmlHttp.readyState==4)
     	{ 
			document.getElementById('inreq').innerHTML=xmlHttp.responseText;
			
		}
    }
  xmlHttp.open("POST","newsletter_request.php?eml="+v,true);
  
  xmlHttp.send(null);
}



function ajaxproductdetail(v)
{

	var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
		
		if(xmlHttp.readyState==1)
     	{
			document.getElementById('idivdetail').innerHTML='<font color="#FFFFFF">Loading Product Detail...</font>';
	  	}
		if(xmlHttp.readyState==4)
     	{ 
			document.getElementById('idivdetail').innerHTML=xmlHttp.responseText;
			
		}
    }
  xmlHttp.open("POST","detailproduct.php?pid="+v,true);
  
  xmlHttp.send(null);
}



function ajaxproductdetail1(v,v1)
{
	
	var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
		
		if(xmlHttp.readyState==1)
     	{
			document.getElementById('idivdetail').innerHTML='<font color="#FFFFFF">Loading Product...</font>';
	  	}
		if(xmlHttp.readyState==4)
     	{ 
			document.getElementById('idivdetail').innerHTML=xmlHttp.responseText;
			
		}
    }
  xmlHttp.open("POST","detailproduct.php?pid="+v+"&m="+v1,true);
  
  xmlHttp.send(null);
}
