 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 LoadContents(url,layer) {
		layer.innerHTML = '<center><img src="images/ajax-loader.gif" /><div style="clear:both; height:400px">&nbsp;</div></center>';
		//$('Home_Video_Mobile_Phone').innerHTML = '';

						/*************************************************************************/
							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);
				layer.innerHTML = finalprice;
				ChangeTestimonial();

				if(typeof sIFR == "function"){
					sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"opal.swf", sColor:"#4D91FF", sWmode:"transparent"}));
					sIFR.replaceElement(named({sSelector:"body h2", sFlashSrc:"opal.swf", sColor:"#4D91FF", sWmode:"transparent"}));
					sIFR.replaceElement(named({sSelector:"body h3", sFlashSrc:"opal.swf", sColor:"#FFFFFF", sWmode:"transparent"}));
/*					sIFR.replaceElement(named({sSelector:"body h4", sFlashSrc:"opal.swf", sColor:"#494949", sWmode:"transparent"}));*/
					sIFR.replaceElement(named({sSelector:"body h5", sFlashSrc:"opal.swf", sColor:"#494949", sWmode:"transparent"}));
				};

				if(url=='Support.html') {
						var mysliding_menu = new Accordion($('sliding_menu'), 'h4.toggler', 'div.element', {
							opacity: false,
							onActive: function(toggler, element){
								toggler.setStyle('color', '#494949');
							},
							onBackground: function(toggler, element){
								toggler.setStyle('color', '#4D91FF');
							}
						});
				 }//if(url=='Support.html') {

} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}
	
	function LoadContents_Manual(url,layer) {
		try{
			if(url=='index1.html') {	$('Home_Video_Mobile_Phone').style.display = 'block';}else{$('Home_Video_Mobile_Phone').style.display = 'none';}			
			$('V1_Slideshow_Mobile_Phone').style.display = 'none';
		}
		catch(e){}
		
		layer = document.getElementById(layer);
		layer.innerHTML = '<center><img src="images/ajax-loader.gif" /><div style="clear:both; height:400px">&nbsp;</div></center>';
		//$('Home_Video_Mobile_Phone').innerHTML = '';

						/*************************************************************************/
							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);
				layer.innerHTML = finalprice;
				ChangeTestimonial();

				if(typeof sIFR == "function"){
					sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"opal.swf", sColor:"#4D91FF", sWmode:"transparent"}));
					sIFR.replaceElement(named({sSelector:"body h2", sFlashSrc:"opal.swf", sColor:"#4D91FF", sWmode:"transparent"}));
					sIFR.replaceElement(named({sSelector:"body h3", sFlashSrc:"opal.swf", sColor:"#FFFFFF", sWmode:"transparent"}));
/*					sIFR.replaceElement(named({sSelector:"body h4", sFlashSrc:"opal.swf", sColor:"#494949", sWmode:"transparent"}));*/
					sIFR.replaceElement(named({sSelector:"body h5", sFlashSrc:"opal.swf", sColor:"#494949", sWmode:"transparent"}));
				};

				if(url=='Support.html') {
						var mysliding_menu = new Accordion($('sliding_menu'), 'h4.toggler', 'div.element', {
							opacity: false,
							onActive: function(toggler, element){
								toggler.setStyle('color', '#494949');
							},
							onBackground: function(toggler, element){
								toggler.setStyle('color', '#4D91FF');
							}
						});
				 }//if(url=='Support.html') {

} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}
	
	function LoadContents_Manual_Thanks(url,layer) {
		
		layer = document.getElementById(layer);
		layer.innerHTML = '<center><img src="images/ajax-loader.gif" /><div style="clear:both; height:400px">&nbsp;</div></center>';
		//$('Home_Video_Mobile_Phone').innerHTML = '';

						/*************************************************************************/
							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);
				layer.innerHTML = finalprice;
				ChangeTestimonial();

				if(typeof sIFR == "function"){
					sIFR.replaceElement(named({sSelector:"body h1", sFlashSrc:"opal.swf", sColor:"#4D91FF", sWmode:"transparent"}));
					sIFR.replaceElement(named({sSelector:"body h2", sFlashSrc:"opal.swf", sColor:"#4D91FF", sWmode:"transparent"}));
					sIFR.replaceElement(named({sSelector:"body h3", sFlashSrc:"opal.swf", sColor:"#FFFFFF", sWmode:"transparent"}));
/*					sIFR.replaceElement(named({sSelector:"body h4", sFlashSrc:"opal.swf", sColor:"#494949", sWmode:"transparent"}));*/
					sIFR.replaceElement(named({sSelector:"body h5", sFlashSrc:"opal.swf", sColor:"#494949", sWmode:"transparent"}));
				};

				if(url=='Support.html') {
						var mysliding_menu = new Accordion($('sliding_menu'), 'h4.toggler', 'div.element', {
							opacity: false,
							onActive: function(toggler, element){
								toggler.setStyle('color', '#494949');
							},
							onBackground: function(toggler, element){
								toggler.setStyle('color', '#4D91FF');
							}
						});
				 }//if(url=='Support.html') {

} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}


	function AJAX_Download(url,layer) {
		layer.innerHTML = '<center><img src="images/ajax-loader.gif" /><div style="clear:both; height:400px">&nbsp;</div></center>';
						/*************************************************************************/
							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);
				LoadContents(finalprice,layer);
			} 
		}//xmlhttp.onreadystatechange = function() { 
		xmlhttp.send(null);
	}


	function AJAX_Support_Email(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);
				stopUpload(finalprice);
			} 
		}//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);
	}	