 function trimmer(untrimed){
  		var regexp = /^\s+/ 		
		return untrimed.replace(regexp, "") 

  }

	function change(url, ref) {
		var path = document.getElementById(ref);
		path.setAttribute('src',url);
	}	

 function load_paging_Contents(url) {	
	var layer = document.getElementById('location_contents');
	layer.scrollTo();
	layer.innerHTML = '<center><img src="images/loading.gif" border="" /></center>';	
	LoadContents(url,layer);
 }//load_paging_Contents(url) {



	function ImageRemove(url,layer) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
				var finalprice=trimmer(xmlhttp.responseText);		
//				alert(finalprice);
				document.getElementById(layer).style.display='none';
			} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}



	function LoadLocationContents(url,layer) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 

		xmlhttp.onreadystatechange = function() { 
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
				var finalprice=trimmer(xmlhttp.responseText);
				//alert(finalprice);
				layer.innerHTML = finalprice;	
				document.location_frm_1.location.disabled = false;
				document.location_frm_1.style.disabled = false;
				document.location_frm_1.region.disabled = false;
				
			} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}

	function LoadContents(url,layer) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 

		xmlhttp.onreadystatechange = function() { 
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
				var finalprice = trimmer(xmlhttp.responseText);
//				alert(finalprice);
				layer.innerHTML = finalprice;
//				alert(layer.innerHTML);
				//layer.innerHTML = xmlhttp.responseText;	
			} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}



	function userSignup(url) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
				var finalprice=trimmer(xmlhttp.responseText);
				win1(finalprice);
	
			} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}


	function getPClients(url) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
		var finalprice=trimmer(xmlhttp.responseText);
		var str = finalprice.split("-riz-");
		
		//alert(finalprice);
		document.frmRegister.contact_name1.value=str[0];
		document.frmRegister.contact_address1.value=str[1];
		document.frmRegister.contact_zip1.value=str[2];
		document.frmRegister.contact_tel1.value=str[3];
		document.frmRegister.contact_fax1.value=str[4];
		document.frmRegister.contact_email1.value=str[5];
		document.frmRegister.contact_web1.value=str[6];
	
		document.frmRegister.contact_name2.value=str[7];
		document.frmRegister.contact_address2.value=str[8];
		document.frmRegister.contact_zip2.value=str[9];
		document.frmRegister.contact_tel2.value=str[10];
		document.frmRegister.contact_fax2.value=str[11];
		document.frmRegister.contact_email2.value=str[12];
		document.frmRegister.contact_web2.value=str[13];

		document.frmRegister.contact_name1.disabled=false;
		document.frmRegister.contact_address1.disabled=false;
		document.frmRegister.contact_zip1.disabled=false;
		document.frmRegister.contact_tel1.disabled=false;
		document.frmRegister.contact_fax1.disabled=false;
		document.frmRegister.contact_email1.disabled=false;
		document.frmRegister.contact_web1.disabled=false;
	
		document.frmRegister.contact_name2.disabled=false;
		document.frmRegister.contact_address2.disabled=false;
		document.frmRegister.contact_zip2.disabled=false;
		document.frmRegister.contact_tel2.disabled=false;
		document.frmRegister.contact_fax2.disabled=false;
		document.frmRegister.contact_email2.disabled=false;
		document.frmRegister.contact_web2.disabled=false;

//		alert(xmlhttp.responseText);
//		window.focus();
		} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}

	function RenameCampaigns(url) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
		var finalprice=trimmer(xmlhttp.responseText);

		window.location.reload();

//		alert(xmlhttp.responseText);
//		window.focus();
		} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}


	function getAdvertisers(url) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
		var finalprice=trimmer(xmlhttp.responseText);

		document.getElementById('Advertisers').innerHTML = finalprice;

//		alert(xmlhttp.responseText);
//		window.focus();
		} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}
	
/******************************************************************************************************/
	function getCampaigns(url) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
		var finalprice=trimmer(xmlhttp.responseText);

		document.getElementById('Campaigns').innerHTML = finalprice;

//		alert(xmlhttp.responseText);
//		window.focus();
		} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}
	
/******************************************************************************************************/
function FinalPrice(url) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
		var finalprice=trimmer(xmlhttp.responseText);
		if(finalprice==''){
			alert("Price Not Available with cover "+document.form1.cover.value+" ,Set up "+document.form1.proof.value+" ,Additions "+document.form1.finishing.value+" Shipping Handling "+document.form1.shipping_handling.value);
			
		document.getElementById("submitbutton").style.display="none";			
		document.getElementById("totalprice").innerHTML="Price Not Available";
		document.form1.total_price.value="0";
			}else{
		document.getElementById("submitbutton").style.display="block";							
		document.getElementById("totalprice").innerHTML="$&nbsp;"+finalprice;
		document.form1.total_price.value=finalprice;


}
//		alert(xmlhttp.responseText);
//		window.focus();
		} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}
	
	function FinalCopiesPrice(url) {
						/*************************************************************************/
							var xmlhttp=false;
							try { 
								xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //here simply we are creating object
							} catch (e) { 
										try { 
											xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //here simply we are creating object
										} catch (E) { 
											xmlhttp = false; 
										}//try {  
							}//	try { 
						
							if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
								xmlhttp = new XMLHttpRequest();//here simply we are creating object
							}
						/*************************************************************************/
	

		xmlhttp.open("POST", url,true); 
	
		xmlhttp.onreadystatechange = function() { 
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 		
		var finalprice=trimmer(xmlhttp.responseText);
		if(finalprice==''){
//			alert("Price Not Available for size "+document.form1.size.value+" with paper "+document.form1.paper.value+" , Proof "+document.form1.proof.value+" Shipping Handling "+document.form1.shipping_handling.value);
			
		document.getElementById("submitbutton").style.display="none";			
//		document.getElementById("totalprice").innerHTML="Price Not Available";
		document.form1.total_price.value="0";
			}else{
		document.getElementById("submitbutton").style.display="block";							
		document.getElementById("totalprice").innerHTML="$&nbsp;"+finalprice;
		document.form1.total_price.value=finalprice;
		}
//		alert(xmlhttp.responseText);
//		window.focus();
		} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}	