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 get_sizes_by_color(path,color_id)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	//alert(color_id);
	var value = color_id.split("|");
	
	color_id = value[0];	
	
	var url= path + color_id;
	xmlHttp.onreadystatechange= function()
	{
	  	if (xmlHttp.readyState==4)
  		{ 
   			if(xmlHttp.responseText != "")
			{
			  document.getElementById("size_id_options").innerHTML=xmlHttp.responseText;			
			}
		}
	}	
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function get_product(path,elementValue)
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	
	var value = elementValue.split("|");
	
	product_id = value[1];	
	
	var url= path + product_id;
	
	xmlHttp.onreadystatechange= function()
	{
	  	if (xmlHttp.readyState==4)
  		{ 
   			if(xmlHttp.responseText != "")
			{
			  document.getElementById("productViewContainer").innerHTML=xmlHttp.responseText;
			  initLightbox();
			}
		}
	}	
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}