function $(id){
	return document.getElementById(id);
}

function InitializeAjaxPC() {
	// creating new object for ajax
	var objPC = new Object();
	if(window.XMLHttpRequest)  {
		try {
			objPC = new XMLHttpRequest();
		}
		catch(e) {
			objPC = false;
		}
	}
	else if(window.ActiveXObject) {
		// branch for IE/Windows ActiveX version
		try {
			objPC = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e) {
			try {
				objPC = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e) {
				objPC = false;
			}
		}
	}

	return objPC;
}

function CallXmlDataPC(ActionCode,Url,Flds) {

	var objPC=false;
	objPC=InitializeAjaxPC();
	if(objPC) {
		objPC.onreadystatechange = showValues;
		objPC.open("GET", Url, true);
		objPC.send(Flds);
	}

	function displayXML() {
		var objXML = objPC.responseXML;

		if(objXML.getElementsByTagName('IControl').length>0){

			for(var ii = 0; ii < objXML.getElementsByTagName('IControl').length; ii++){

				ctnrlID = objXML.getElementsByTagName('IControl')[ii];

				var ctnId=ctnrlID.getElementsByTagName('IControlID')[0].firstChild.nodeValue.toString();

				objControl = document.getElementById(ctnId);
				objControl.options.length=0;

				if(ctnrlID.getElementsByTagName('Items').length>0){

					for(var i = 0; i < ctnrlID.getElementsByTagName('Items').length; i++) {
						var divArray= new Array();
						var j=0;
						node=ctnrlID.getElementsByTagName('Items')[i].firstChild;
						while(node)
						{
							divArray[j++]= node.firstChild.nodeValue;
							node=node.nextSibling;
						}
						objControl.options[i] = new Option(divArray[0],divArray[1]);

					}
				}
			}
		}

		for(var i = 0; i < objXML.getElementsByTagName('DivBody').length; i++) {
			var divArray= new Array();
			var j=0;
			node=objXML.getElementsByTagName('DivBody')[i].firstChild;
			while(node)
			{
				divArray[j++]= node.firstChild.nodeValue;
				node=node.nextSibling;
			}
			document.getElementById(divArray[0]).innerHTML=divArray[1];

		}
		for(var i = 0; i < objXML.getElementsByTagName('JS').length; i++) {
			var JSCall="";
			node=objXML.getElementsByTagName('JS')[i].firstChild;
			while(node)
			{
				JSCall= node.firstChild.nodeValue;
				node=node.nextSibling;
				eval(JSCall);
			}
		}
	}


	function showValues() {

		if(objPC.readyState == 4) {

			var objXML = objPC.responseXML;

			if(objPC.responseXML) {
				if(objXML.getElementsByTagName('IControl').length>0 || objXML.getElementsByTagName('JS').length>0 || objXML.getElementsByTagName('DivBody').length>0 || objXML.getElementsByTagName('Items').length>0) {
					displayXML();
				}
				else{
					alert(objPC.responseText);
				}
			}else {
				alert(objPC.responseText);
			}
		}
	}


}


function CallXMLsize(size){
	var df = $("ctlDesignFee").value;
	//if(df != ""){
		var url = "design-and-print-size.php?size="+size+"&df="+df;
		url.toString();
		CallXmlDataPC(1,url,'');
	//}
}
function CallXMLpaper(paper){
	var df = $("ctlDesignFee").value;
	//if(df != ""){
		var url = "design-and-print-paper.php?paper="+paper+"&df="+df;
		url.toString();
		CallXmlDataPC(1,url,'');
	//}
}

function CallXMLcolor(color){
	var df = $("ctlDesignFee").value;
	//if(df != ""){
		var url = "design-and-print-color.php?color="+color+"&df="+df;
		url.toString();
		CallXmlDataPC(1,url,'');
	//}
}

function CallXMLcoating(coating){
	var df = $("ctlDesignFee").value;
        var FnGrpId = document.orderForm.fn_grp_id.value;
        var QtyTxt = document.orderForm.qty_txt_for_fn.value;
	//if(df != ""){
		var url = "design-and-print-coating.php?coating="+coating+"&df="+df+"&FnGrpId="+FnGrpId+"&QtyTxt="+QtyTxt;
		url.toString();
		CallXmlDataPC(1,url,'');
	//}
}

function CallXMLqty(quantity){
	var RFee = $("ctlRushFee").value;
	var shipPrice = $("SelShipPrice").value;
	var df = $("ctlDesignFee").value;
        var TFee = $("ctlTurnaround").value;
        var FnFee = document.orderForm.ctlFnFee.value;
        var FnGrpId = document.orderForm.fn_grp_id.value;
        var QtyTxt = document.orderForm.qty_txt_for_fn.value;
        var OptFee = document.orderForm.ctlOptionFee.value;
        if(shipPrice!='')
        {
            var url = "design-and-print-quantity.php?quantity="+quantity+"&ShipPrice="+shipPrice+"&df="+df+"&RFee="+RFee+"&TFee="+TFee+"&FnFee="+FnFee+"&FnGrpId="+FnGrpId+"&QtyTxt="+QtyTxt+"&OptFee='"+OptFee+"'";
        }
        else
        {
            var url = "design-and-print-quantity.php?quantity="+quantity+"&&df="+df+"&RFee="+RFee+"&TFee="+TFee+"&FnFee="+FnFee+"&FnGrpId="+FnGrpId+"&QtyTxt="+QtyTxt+"&OptFee='"+OptFee+"'";
        }
	
	url.toString();
	CallXmlDataPC(1,url,'');
}
function CallXMLDF(df){
	var RFee = $("ctlRushFee").value;
	var shipPrice = $("SelShipPrice").value;
	var Price = $("Price").value;
        var TFee = $("ctlTurnaround").value;
        var OptFee = $("ctlOptionFee").value;
        var FnFee = document.orderForm.ctlFnFee.value;
	var url = "design-and-print-design-fee.php?df="+df+"&ShipPrice="+shipPrice+"&Price="+Price+"&RFee="+RFee+"&FnFee="+FnFee+"&TFee="+TFee+"&OptFee='"+OptFee+"'";
	url.toString();
	CallXmlDataPC(1,url,'');
}
function CallXMLRF(rf){
	var shipPrice = $("SelShipPrice").value;
	var Price = $("Price").value;
	var DFee = $("ctlDesignFee").value;
        var TFee = $("ctlTurnaround").value;
        var OptFee = $("ctlOptionFee").value;
	var FnFee = document.orderForm.ctlFnFee.value;
	var url = "design-and-print-rush-fee.php?rf="+rf+"&ShipPrice="+shipPrice+"&Price="+Price+"&DFee="+DFee+"&FnFee="+FnFee+"&TFee="+TFee+"&OptFee='"+OptFee+"'";
	url.toString();
	CallXmlDataPC(1,url,'');
}
function CallXMLturnaround(turnaround){
                var shipPrice = $("SelShipPrice").value;
                var Price = $("Price").value;
                var DFee = $("ctlDesignFee").value;
                var RFee = $("ctlRushFee").value;
                var OptFee = $("ctlOptionFee").value;
                var FnFee = document.orderForm.ctlFnFee.value;
		var url = "design-and-print-turnaroundNew.php?turnaround="+turnaround+"&ShipPrice="+shipPrice+"&Price="+Price+"&DFee="+DFee+"&FnFee="+FnFee+"&RFee="+RFee+"&OptFee='"+OptFee+"'";
		url.toString();
		CallXmlDataPC(1,url,'');
	//}
}
function CallXMLGR(gr_id,item_id){
        var shipPrice = $("SelShipPrice").value;
	var Price = $("Price").value;
	var DFee = $("ctlDesignFee").value;
        var RFee = $("ctlRushFee").value;
        var Weight = $("Weight").value;
	var TempWeight = $("TempWeight").value;
        var TFee = $("ctlTurnaround").value;
	var FnFee = document.orderForm.ctlFnFee.value;
	/* commented when I found error on weight of product also add a line ( var TempWeight = $("TempWeight").value; )
	var Weight = $("TempWeight").value;
	var url = "design-and-print-option.php?item_id="+item_id+"&gr_id="+gr_id+"&ShipPrice="+shipPrice+"&Price="+Price+"&FnFee="+FnFee+"&RFee="+RFee+"&DFee="+DFee+"&Weight="+Weight+"&TFee="+TFee;
	*/
        var url = "design-and-print-option.php?item_id="+item_id+"&gr_id="+gr_id+"&ShipPrice="+shipPrice+"&Price="+Price+"&FnFee="+FnFee+"&RFee="+RFee+"&DFee="+DFee+"&Weight="+Weight+"&TFee="+TFee+"&TempWeight="+TempWeight;
        url.toString();
        CallXmlDataPC(1,url,'');
}
function CallXMLFN(fn_id)
{
		var shipPrice = document.getElementById("SelShipPrice").value;
		var Price = document.orderForm.Price.value;
		var DFee = document.orderForm.ctlDesignFee.value;
                var RFee = document.orderForm.ctlRushFee.value;
                var OptFee = document.orderForm.ctlOptionFee.value;
                var TFee = document.orderForm.ctlTurnaround.value;
                var QtyTxt = document.orderForm.qty_txt_for_fn.value;
                if(shipPrice!='')
                {
                    var url = "design-and-print-finishing.php?finishing_id="+fn_id+"&ShipPrice="+shipPrice+"&Price="+Price+"&RFee="+RFee+"&TFee="+TFee+"&DFee="+DFee+"&OptFee="+OptFee+"&QtyTxt="+QtyTxt;
                }
		else
                {
                    var url = "design-and-print-finishing.php?finishing_id="+fn_id+"&Price="+Price+"&RFee="+RFee+"&TFee="+TFee+"&DFee="+DFee+"&OptFee="+OptFee+"&QtyTxt="+QtyTxt;
                }
		url.toString();
		CallXmlDataPC(1,url,'');
}
function callNextPreviousProduct(category, id, action){
	url = "design-and-print-products.php?category="+category+"&id="+id+"&action="+action;
	url.toString();
	CallXmlDataPC(1,url,'');
}

function validateDesignAndPrintFrm(frm, boolValidation){
	if( Trim(frm.txtService.value) == "" ){
	 	alert( "Please Select Any Service !" );
		frm.txtService.focus();
		return false;
	}
	if( Trim(frm.size.value) == "" ){
	 	alert( "Please Select Size !" );
		frm.size.focus();
		return false;
	}
	if( Trim(frm.paper.value) == "" ){
	 	alert( "Please Select Paper !" );
		frm.paper.focus();
		return false;
	}
	if( Trim(frm.color.value) == "" ){
	 	alert( "Please Select Color !" );
		frm.color.focus();
		return false;
	}
	if( Trim(frm.coating.value) == "" ){
	 	alert( "Please Select Coating !" );
		frm.coating.focus();
		return false;
	}
	if( Trim(frm.turnaround.value) == "" ){
	 	alert( "Please Select Turnaround !" );
		frm.turnaround.focus();
		return false;
	}
	if( Trim(frm.quantity.value) == "" ){
	 	alert( "Please Select Quantity !" );
		frm.quantity.focus();
		return false;
	}
	if( Trim(frm.selDesignFee.value) == "" ){
	 	alert( "Please select proof option !" );
		frm.selDesignFee.focus();
		return false;
	}
	/*if( Trim(frm.ctlShipServices.value) == "" ){
	 	alert( "Please Select Shipping Service !" );
		frm.ctlShipServices.focus();
		return false;
	}*/
	if( Trim(frm.ctlProjectName.value) == "" ){
	 	alert( "Please Enter Project Name !" );
		frm.ctlProjectName.value = "";
		frm.ctlProjectName.focus();
		return false;
	}

	if(boolValidation=='yes'){
		if( Trim(frm.fldPictureOne.value) == "" )
		{
			alert( "Please Browse Your Picture  !" );
			frm.fldPictureOne.focus();
			return false;
		}
	}

	return true;
}

function UpdateShipRates(passVal){

	var serviceValue = passVal;
	serviceValue.toString();
	if(serviceValue=='' ){
		var shipRates = 0;
	}else{
		var ValArray = serviceValue.split("-_-");
		var shipRates = ValArray[1];
	}
	if(document.orderForm.selRushFee.value!=''){
		totalPrice = format_number((
								(shipRates*1) +
								(document.getElementById("Price").value*1) +
								(document.getElementById("ctlDesignFee").value*1)+
								(document.getElementById("ctlRushFee").value*1)),2);
	}else{
		totalPrice = format_number((
									(shipRates*1) +
									(document.getElementById("Price").value*1) +
									(document.getElementById("ctlDesignFee").value*1)),2);
	}
	ShipPrice = format_number((shipRates*1),2);
	document.getElementById("divShipRate").style.display = "block";
	document.getElementById("divTotalPrice").style.display = "block";
	document.getElementById("divShipRate").innerHTML = '<strong>$'+(ShipPrice)+'</strong>';
	document.getElementById("divTotalPrice").innerHTML = 'Total Price : <strong>$'+(totalPrice)+'</strong>';
	document.getElementById("TotalPrice").value = format_number(totalPrice,2);
	document.getElementById("SelShipPrice").value = format_number(ShipPrice,2);
}

function format_number(pnumber,decimals){
	if (isNaN(pnumber)) { return 0};
	if (pnumber=='') { return 0};

	var snum = new String(pnumber);
	var sec = snum.split('.');
	var whole = parseFloat(sec[0]);
	var result = '';

	if(sec.length > 1){
		var dec = new String(sec[1]);
		dec = String(parseFloat(sec[1])/Math.pow(10,(dec.length - decimals)));
		dec = String(whole + Math.round(parseFloat(dec))/Math.pow(10,decimals));
		var dot = dec.indexOf('.');
		if(dot == -1){
			dec += '.';
			dot = dec.indexOf('.');
		}
		while(dec.length <= dot + decimals) { dec += '0'; }
		result = dec;
	} else{
		var dot;
		var dec = new String(whole);
		dec += '.';
		dot = dec.indexOf('.');
		while(dec.length <= dot + decimals) { dec += '0'; }
		result = dec;
	}
	return result;
}


///////Added By DSpl///
///For using this i have include Script.js//( I have Usiing this function form Script.js getXMLHTTP)
function design_print_rf(rushfeeId)
{
	objDiv = document.getElementById('divLoader');
	objDiv.style.display = 'block';
	var DesignFee = document.orderForm.ctlDesignFee.value;
	//var RushFee = document.orderForm.ctlRushFee.value;
	var RushFee		=	rushfeeId;
	var Zip = document.orderForm.ctlZip.value;
	var Price = document.orderForm.Price.value;
	var Weight = document.orderForm.Weight.value;
	var st		=document.orderForm.service_type.value;
	if(st=='')
	{
		st='res';
	}
	var strURL="design-and-print-rush-fee(live).php?price="+Price+"&designfee="+DesignFee+"&rushfeeId="+RushFee+"&serivcetype="+st+"&cityzip="+Zip;
	//alert(strURL);
	var req = getXMLHTTP();
	//setTimeout(function(){jQuery("#loading1").removeClass("loadingImg")},3000);

	if (req)
	{
		req.onreadystatechange = function()
		{
			if (req.readyState == 4)
			{// only if "OK"
				if (req.status == 200)
					{
						document.getElementById('test').innerHTML=req.responseText;
						//alert(req.responseText);
						//jQuery("#loading1").removeClass("loadingImg");
						objDiv.style.display = 'none';
					}
				else
					{
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}

function design_print_qty(qty)
{
	objDiv = document.getElementById('divLoader');
	objDiv.style.display = 'block';
	var DesignFee = document.orderForm.ctlDesignFee.value;
	var RushFee = document.orderForm.ctlRushFee.value;
	var Zip = document.orderForm.ctlZip.value;
	var Price = document.orderForm.Price.value;
	var Weight = document.orderForm.Weight.value;
	var st		=document.orderForm.service_type.value;
	//alert(Price);
	var Qty		=qty;
	if(st=='')
	{
		st='res';
	}
	var strURL="design-and-print-rush-fee(live).php?price="+Price+"&designfee="+DesignFee+"&rushfee="+RushFee+"&serivcetype="+st+"&cityzip="+Zip+"&qty="+Qty;
	//alert(strURL);
	var req = getXMLHTTP();
	if (req)
	{
		req.onreadystatechange = function()
		{
			if (req.readyState == 4)
			{
				// only if "OK"
				if (req.status == 200)
				{
					document.getElementById('test').innerHTML=req.responseText;
					//alert(req.responseText);
					//jQuery("#loading1").removeClass("loadingImg");
					objDiv.style.display = 'none';
				}
				else
				{
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}
function design_print_df(design_Id)
{
	objDiv = document.getElementById('divLoader');
	objDiv.style.display = 'block';
	//ajaxpage(p,df,rf,st,cz)

	var DesignFee 	= 	document.orderForm.ctlDesignFee.value;
	var RushFee 	= 	document.orderForm.ctlRushFee.value;
	var Zip 		= 	document.orderForm.ctlZip.value;
	var Price 		= 	document.orderForm.Price.value;
	var Weight 		= 	document.orderForm.Weight.value;
        var TempWeight 		= 	document.orderForm.TempWeight.value;
	var st			=	document.orderForm.service_type.value;
	var Design_Id	=	design_Id;
	if(Design_Id=='')
		{
			Design_Id='blank';
		}
	if(st=='')
		{
			st='res';
		}

		//alert(Price);



	var strURL="design-and-print-rush-fee(live).php?price="+Price+"&weight="+Weight+"&TempWeight="+TempWeight+"&designfee="+DesignFee+"&rushfee="+RushFee+"&serivcetype="+st+"&cityzip="+Zip+"&DesignId="+Design_Id;
	//var strURL="CalculateShipRate_fedex.php?price="+p+"&designfee="+df+"&rushfee="+rf+"&serivcetype="+st+"&cityzip="+cz;

	//var strURL="CalculateShipRate_fedex.php?serivcetype="+st+"&cityzip="+cz;

	//alert(strURL);
	var req = getXMLHTTP();
	//setTimeout(function(){jQuery("#loading1").removeClass("loadingImg")},3000);

	if (req) {

		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				// only if "OK"
				if (req.status == 200) {
					document.getElementById('test').innerHTML=req.responseText;
					//alert(req.responseText);
					//jQuery("#loading1").removeClass("loadingImg");
					objDiv.style.display = 'none';
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}

function fedex_rates(service_type)
{
	//jQuery("#loading1").addClass("loadingImg");
	objDiv = document.getElementById('divLoader');
	objDiv.style.display = 'block';
	//ajaxpage(p,df,rf,st,cz)

		var DesignFee = document.orderForm.ctlDesignFee.value;
		var RushFee = document.orderForm.ctlRushFee.value;
		var Zip = document.orderForm.ctlZip.value;
		var Price = document.orderForm.Price.value;
		var Weight = document.orderForm.Weight.value;
                var TempWeight = document.orderForm.TempWeight.value;
                var OptionFee = document.orderForm.ctlOptionFee.value;
                var TurnAroundFee = document.orderForm.ctlTurnaround.value;
		var FnFee = document.orderForm.ctlFnFee.value;
		//alert(DesignFee);
		if(service_type=='')
		{
			service_type='res';
		}

		var st = service_type;


	var strURL="design-and-print-rush-fee(live).php?price="+Price+"&designfee="+DesignFee+"&TempWeight="+TempWeight+"&rushfee="+RushFee+"&serivcetype="+st+"&cityzip="+Zip+"&weight="+Weight+"&OptionFee="+OptionFee+"&TurnAroundFee="+TurnAroundFee+"&FnFee="+FnFee;
	//var strURL="CalculateShipRate_fedex.php?price="+p+"&designfee="+df+"&rushfee="+rf+"&serivcetype="+st+"&cityzip="+cz;

	//var strURL="CalculateShipRate_fedex.php?serivcetype="+st+"&cityzip="+cz;

	//alert(strURL);
	var req = getXMLHTTP();
	//setTimeout(function(){jQuery("#loading1").removeClass("loadingImg")},3000);

	if (req) {

		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				// only if "OK"
				if (req.status == 200) {
					document.getElementById('test').innerHTML=req.responseText;
					//alert(req.responseText);
					//jQuery("#loading1").removeClass("loadingImg");
					objDiv.style.display = 'none';
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}
function fedex_call_with_method(zip,method)
{
	objDiv 					= document.getElementById('divLoader');
	objDiv.style.display 	= 'block';
	var DesignFee 			= document.orderForm.ctlDesignFee.value;
	var RushFee 			= document.orderForm.ctlRushFee.value;
	var Zip 				= document.orderForm.ctlZip.value;
	var Price 				= document.orderForm.Price.value;
	var Weight 				= document.orderForm.Weight.value;
        var TempWeight = document.orderForm.TempWeight.value;
        var OptionFee = document.orderForm.ctlOptionFee.value;
        var TurnAroundFee = document.orderForm.ctlTurnaround.value;
	var st		= document.orderForm.service_type.value;
	var FnFee = document.orderForm.ctlFnFee.value;
	var method = method;

	if(st=='')
		{
			st='res';
		}


	var strURL="design-and-print-rush-fee(live).php?price="+Price+"&designfee="+DesignFee+"&TempWeight="+TempWeight+"&rushfee="+RushFee+"&serivcetype="+st+"&cityzip="+Zip+"&method="+method+"&weight="+Weight+"&OptionFee="+OptionFee+"&TurnAroundFee="+TurnAroundFee+"&FnFee="+FnFee;
	//var strURL="CalculateShipRate_fedex.php?price="+p+"&designfee="+df+"&rushfee="+rf+"&serivcetype="+st+"&cityzip="+cz;

	//var strURL="CalculateShipRate_fedex.php?serivcetype="+st+"&cityzip="+cz;

	//alert(strURL);
	var req = getXMLHTTP();
	//setTimeout(function(){jQuery("#loading1").removeClass("loadingImg")},3000);

	if (req) {

		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				// only if "OK"
				if (req.status == 200) {
					document.getElementById('price').innerHTML=req.responseText;
					//alert(req.responseText);
					//jQuery("#loading1").removeClass("loadingImg");
					objDiv.style.display = 'none';
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}

function design_and_print_color(color)
{
	objDiv = document.getElementById('divLoader');
	objDiv.style.display = 'block';
	//ajaxpage(p,df,rf,st,cz)

	var DesignFee = document.orderForm.ctlDesignFee.value;
	var RushFee = document.orderForm.ctlRushFee.value;
	var Zip = document.orderForm.ctlZip.value;
	var Price = document.orderForm.Price.value;
	var Weight = document.orderForm.Weight.value;
	var colorId = color;
	var st		=document.orderForm.service_type.value;
	if(st=='')
		{
			st='res';
		}

		//alert(Price);



	var strURL="design-and-print-rush-fee(live).php?price="+Price+"&designfee="+DesignFee+"&rushfee="+RushFee+"&serivcetype="+st+"&cityzip="+Zip+"&colorId="+colorId+"&weight="+Weight;

	//alert(strURL);
	var req = getXMLHTTP();
	//setTimeout(function(){jQuery("#loading1").removeClass("loadingImg")},3000);

	if (req) {

		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				// only if "OK"
				if (req.status == 200) {
					document.getElementById('test').innerHTML=req.responseText;
					//alert(req.responseText);
					//jQuery("#loading1").removeClass("loadingImg");
					objDiv.style.display = 'none';
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}

function design_and_print_coating(coating)
{
	//jQuery("#loading1").addClass("loadingImg");
	objDiv = document.getElementById('divLoader');
	objDiv.style.display = 'block';
	//ajaxpage(p,df,rf,st,cz)

		var DesignFee 		= 	document.orderForm.ctlDesignFee.value;
		var RushFee 		= 	document.orderForm.ctlRushFee.value;
		var Zip 			= 	document.orderForm.ctlZip.value;
		var Price 			= 	document.orderForm.Price.value;
		var Weight 			= 	document.orderForm.Weight.value;
		var st				=	document.orderForm.service_type.value;
		var Qty				=	document.orderForm.quantity.value;

		var coatingId		= 	coating;

		//alert('quantity'+quantity);
		//alert('RushFee'+RushFee);
		//alert('Zip'+Zip);
		//alert('Price'+Price);
		//alert('Weight'+Weight);
		//alert('coatingId'+coatingId);
		//alert('DesignFee'+DesignFee);

		if(st=='')
		{
			st='res';
		}

		//alert(Price);



	var strURL="design-and-print-rush-fee(live).php?price="+Price+"&designfee="+DesignFee+"&rushfee="+RushFee+"&serivcetype="+st+"&cityzip="+Zip+"&coatingId="+coatingId+"&qty="+Qty;
	//alert(strURL);
	//var strURL="CalculateShipRate_fedex.php?price="+p+"&designfee="+df+"&rushfee="+rf+"&serivcetype="+st+"&cityzip="+cz;

	//var strURL="CalculateShipRate_fedex.php?serivcetype="+st+"&cityzip="+cz;

	//alert(strURL);
	var req = getXMLHTTP();
	//setTimeout(function(){jQuery("#loading1").removeClass("loadingImg")},3000);

	if (req) {

		req.onreadystatechange = function() {
			if (req.readyState == 4) {
				// only if "OK"
				if (req.status == 200) {
					document.getElementById('test').innerHTML=req.responseText;
					//alert(req.responseText);
					//jQuery("#loading1").removeClass("loadingImg");
					objDiv.style.display = 'none';
				} else {
					alert("There was a problem while using XMLHTTP:\n" + req.statusText);
				}
			}
		}
		req.open("GET", strURL, true);
		req.send(null);
	}
}
function ajaxpage(url,containerid)
{
    var page_request = false;
    if (window.XMLHttpRequest) // if Mozilla, Safari etc
        page_request = new XMLHttpRequest()
    else if (window.ActiveXObject)
    { // if IE
        try
        {
            page_request = new ActiveXObject("Msxml2.XMLHTTP")
        }
        catch (e)
        {
            try
            {
                page_request = new ActiveXObject("Microsoft.XMLHTTP")
            }
            catch (e){}
        }
    }
    else
    return false
    page_request.onreadystatechange=function()
    {
        loadpage(page_request, containerid)
    }
    page_request.open('GET', url, true)
    page_request.send(null)
}
function loadpage(page_request, containerid)
{
    if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
    document.getElementById(containerid).innerHTML=page_request.responseText

}


