	function callPreviewBox() {	
		var iscustomerNameValid = $("#previewpanelform").validate().element("#Preview_customer_name");
		var iscontactNameValid = $("#previewpanelform").validate().element("#Preview_contact_name");	
		var iscustomerEmailValid = $("#previewpanelform").validate().element("#Preview_customer_email");	
		
		if ((iscustomerNameValid == true) && (iscontactNameValid == true) && (iscustomerEmailValid == true))
		{
			var j1 = document.getElementById("previewBox");
			
			var customerNameObj = document.getElementById("Preview_customer_name");
			var customerContactNameObj = document.getElementById("Preview_contact_name");
			var customerEmailObj = document.getElementById("Preview_customer_email");
			var customerPhoneNumObj = document.getElementById("Preview_customer_phone");
			var spamTrapObj = document.getElementById("Preview_SpamTrap");
			
			
			customerName = 'Preview_customer_name='+escape(customerNameObj.value);				
			customerContactName = 'Preview_contact_name='+escape(customerContactNameObj.value);
			customerEmail = 'Preview_customer_email='+escape(customerEmailObj.value);
			customerPhoneNum = 'Preview_customer_phone='+escape(customerPhoneNumObj.value); 
			SpamTrap ='Preview_SpamTrap='+spamTrapObj.value;
			
			try{
			customerCity = 'Preview_customer_city='+geoip_city();
			  }catch(errocustomerCity)
			  {
			   customerCity  = 'Preview_customer_city=';
			  }
			  try{
			   customerState = 'Preview_customer_state='+geoip_region_name();
			  }catch(errocustomerState)
			  {
			   customerState = 'Preview_customer_state='
			  }
			  try{
			   customerZip = 'Preview_customer_zip='+geoip_postal_code();
			  }catch(errocustomerZip)
			  {
			   customerZip = 'Preview_customer_zip=';
			  }			
			
			myhref = 'preview-process.asp?';
			
			j1.href = myhref + customerName + "&amp;" + customerContactName + "&amp;" + customerEmail + "&amp;" + customerPhoneNum+ "&amp;" + customerCity + "&amp;" + customerState + "&amp;" + customerZip + "&amp;" + SpamTrap;
			
			//check the window size. if large enough, display lightbox
			if (( $(window).width() > 1000 ) && ( $(window).height() > 650 )) {
				$('#previewBox').trigger('click');	
			}
			else
			{
				//Window is too small to display in lightbox, redirect to new page
				window.location = myhref + customerName + "&" + customerContactName + "&" + customerEmail + "&" + customerPhoneNum+ "&" + customerCity + "&" + customerState + "&" + customerZip + "&" + SpamTrap;
			}
		}	
	}
	
	
	
	
