// JavaScript Document

// JavaScript Document
var xmlHttp
var words;
var dt;
var month;
function getWords(str)
{
	words = str;
	showPrices(words,delivery,service);

}
function getDelivery(str1,str2)
{
	delivery = str1;
	service = str2;
	showPrices(words,delivery,service);

}
function promocode(str7)
{
	code = str7;
	showPrices(words,delivery,service,code);
}
function showPrices(str3,str4,str5,str9)
{ 
	words = str3;
	delivery = str4;
	service = str5;
	code = str9
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
 	{
 		alert ("Browser does not support HTTP Request")
 		return
 	} 
	var url="order-promo-price.php"
	url=url+"?p="+words+"&q="+delivery+"&r="+service+"&s="+code
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged() 
{ 
 if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
	 document.getElementById("msg").innerHTML=xmlHttp.responseText
	 document.getElementById("msg1").innerHTML=xmlHttp.responseText 
 } 
}

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;
}