function expand() {
	if (document.getElementById('comment').style.display == "none") document.getElementById('comment').style.display = "block"; else 
	if (document.getElementById('comment').style.display == "block") document.getElementById('comment').style.display = "none";
}

function validate() {
	var string='    Please fill the form fields correctly!\n';
	if (document.getElementById('name').value.length<6)
		string+='The name must contain at least 6 characters\n';
	if ((document.getElementById('phone').value.length<10) || (!IsNumeric(document.getElementById('phone').value)))
		string+='The phone number must be numeric and contain at least 10 digits\n';
	if (document.getElementById('address1').value.length<15)
		string+='The address must contain at least 15 characters\n';
	if (document.getElementById('city').value.length<3)
		string+='The city must contain at least 3 characters\n';
	if (document.getElementById('state').value.length<3)
		string+='The state must contain at least 3 characters\n';
	if ((document.getElementById('zip').value.length<5) || (document.getElementById('zip').value.length>5) || (!IsNumeric(document.getElementById('zip').value)))
		string+='The zip code must be numeric and contain 5 characters\n';
	if ((document.getElementById('email').value.length==0) || (document.getElementById('email').value.indexOf('@',0)==-1) || (document.getElementById('email').value.indexOf('.',0)==-1)) string+="Incorrect or empty e-mail adress!\n";
	if (string!='    Please fill the form fields correctly!\n') {
		alert(string);
		return false;
	}
	else return true;	
}

function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }
function hideintro() {document.getElementById("flash").style.display="none"}  
function positionleft() {
	var width = document.body.offsetWidth;
	width = width/2 - 265 - 21
	document.getElementById("flash").style.marginLeft=width-10
	var browserName = navigator.userAgent;
	var isIE = browserName.match(/MSIE/);
	if(!isIE) {
				var width = window.innerWidth;
				width = width/2 - 265 - 21				
				document.getElementById("flash").style.marginLeft=width	
	}
}