
 function send_onclick()
 {
   if (checkform() == true)
   {
		document.form1.action="dp-large-format-printing-action.cfm";
		document.form1.target="_self";
		document.form1.method="post";
		document.form1.submit();
   }
 }
function checkform()
{
	document.form1.phone.value=nolrspaces(document.form1.phone.value);	
	document.form1.phone.value=singlespace(document.form1.phone.value);	
	document.form1.email.value=nospaces(document.form1.email.value);
	
  if ((document.form1.phone.value == "") && (document.form1.email.value == ""))
  {
    alert("How should we reach you?  Pease provide a phone or email address.");
    return false;
  }
	
  if (document.form1.ValidationString.value == "")
  {
    alert("Please type the verification code to continue.");
    return false;
  }
  
   return true;
   
}
 
//'############################################
// converts multiple spaces together in a string to one space.
function singlespace(strinx)
{
	var spc1=' ';
	var spc2='  ';
	while (strinx.indexOf(spc2)>=0)
		{
			strinx=strinx.replace(spc2,spc1);
		} 
return strinx;
}			
//'############################################
//' strips all spaces out of a string
function nospaces(strinx)
{
	var j=0
	var tmpstring =new String
	for( j= 0;  j<strinx.length; j++)
		{		 
			if ( strinx.charCodeAt(j)!=32)
				{ tmpstring=tmpstring.concat(strinx.charAt(j));	}	
		}
return tmpstring;
}
//'############################################
//' strip off leading and trailing spaces from string
function nolrspaces(strinx)
{
	while (strinx.charCodeAt(0)==32)
		{ strinx = strinx.substring(1, strinx.length); 
		}
	while (strinx.charCodeAt(strinx.length-1)==32)
		{ strinx = strinx.substring(0, strinx.length - 1); 
		}
//	  document.form1.password.value = strinx;
	return strinx;
}
