var xmlhttp;

function sumalt()
{
alert("\rPlease allow about 5 seconds while our SECURE SERVER loads the secure Order Page.\r\rThank you.\r");
}


function showUser(str,active,option_arg,Size,Color,Postage,Model)
{
	var pr_size, pr_color, pr_postage, pr_model;
	//window.alert('option arg=='+option_arg);
	if(option_arg==1)
	{
		if(Size==1)
		{
			pr_size  =   document.getElementById(str+'_Size').value;
		}
		else
		{
			pr_size    = "-1";	
		}
		if(Color==1)
		{
			pr_color =   document.getElementById(str+'_Color').value;
		}
		else
		{
			pr_color   = "-1";	
		}
		if(Postage==1)
		{
			pr_postage = document.getElementById(str+'_Postage').value;
		}
		else
		{
			pr_postage = "-1";	
		}
		if(Model==1)
		{
			pr_model   = document.getElementById(str+'_Model').value;
		}
		else
		{
			pr_model   = "-1";	
		}
		//alert("Color=="+pr_color);
	}
	else
	{
		pr_size    = "-1";
		pr_color   = "-1";
		pr_postage = "-1";
		pr_model   = "-1";
	}
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	var url="shopjs.php";
	if(str!=null && active=='addnew')
	{ 
		url=url+"?q="+str+"&txt_mode=addition_new&pr_size="+pr_size+"&pr_color="+pr_color+"&pr_postage="+pr_postage+"&pr_model="+pr_model;
		//alert("URL=="+url);
	}
	xmlhttp.onreadystatechange=stateChanged;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function stateChanged()
{
	if (xmlhttp.readyState==4)
	{
		//document.getElementById("image").innerText="";
		//alert("OutPut==="+xmlhttp.responseText);
		document.getElementById("shop").innerHTML=xmlhttp.responseText;
	}
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function rediindex()
{
	window.location.href="http://www.juicersnewzealand.co.nz/";
}

