	
	// Checks to see if Macromedia Flash Player 6.0 is installed
	function checkplugin()
	{
		var agt, is_nav, flash_plugin;
		var agt=navigator.userAgent.toLowerCase(); 
		var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1)); 
		var flash_plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

		if (is_nav)
  		{
  			if (!flash_plugin)
     			{
     				document.write('<TABLE BORDER=0>');
     				document.write('<tr>');
     				document.write('<td width=400 align=center>');
     				document.write('<center><font color="FF0000" face="arial, helvetica" size=2>Macromedia Flash Player is required for this presentation. Please click on the image below to install the Flash Player and come back to revisit us.</font><br><br>');
     				document.write('<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><IMG SRC="http://www.macromedia.com/shockwave/download/images/download_now_flash.gif" WIDTH=88 HEIGHT=31 BORDER=0></a></center>');
     				document.write('</td>');
     				document.write('<tr>');
     				document.write('</TABLE>');
     			}		
  			else if (flash_plugin && parseInt(flash_plugin.description.substring(flash_plugin.description.indexOf(".")-1)) < 6 )
     			{
     				document.write('<TABLE BORDER=0>');
     				document.write('<tr>');
     				document.write('<td width=400 align=center>');
     				document.write('<center><font color="FF0000" face="arial, helvetica" size=2>The latest version of Macromedia Flash Player is recommended for this presentation. Please click on the image below to upgrade to the latest Flash Player and come back to revisit us.</font><br><br>');
     				document.write('<a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"><IMG SRC="http://www.macromedia.com/shockwave/download/images/download_now_flash.gif" WIDTH=88 HEIGHT=31 BORDER=0></a></center>');
     				document.write('</td>');
     				document.write('<tr>');
     				document.write('</TABLE>');
     			}
  		}
	}


	

	//validates the  fields for appropriate entries.
	function validatefields()
{
     <!-- validation elements -->
      var nameexpression = /^([a-z]|[0-9]|\.|\s)+$/i;
      var phoneexpression =/^([0-9])+$/i;
      var emailexpression = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
      var urlexpression = /^www\.((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	
	//vailidates First Name
	if (nameexpression.test(document.getElementById("firstname").value) == false)

		{
			alert("First Name cannot be blank. Please type in your first name");
			return false;
		}
	//vailidates Last Name	
        if (document.getElementById("lastname").value == "")
		{
			alert("Last Name cannot be Blank. Please type in your last name");
			return false;
		}
	//vailidates Company Name
        if (document.getElementById("companyname").value == "")
		{
			alert("Company Name cannot be blank.Please enter your company name");
			return false;
		}
	//vailidates Address
	if (document.getElementById("Address1").value == "")
		{
			alert("Address cannot be blank. Please enter your Address");
			return false;
		}
	//vailidates City
	if (document.getElementById("city").value == "")
		{
			alert("Enter the name of the City");
			return false;
		}
	//vailidates Postal code
        if (document.getElementById("postalcode").value == "")
		{
			alert("Enter a valid postal code");
			return false;
		}
	//vailidates Phone
	if (phoneexpression.test(document.getElementById("phone").value) == false)
		{
			alert("Your phone number is either blank or contains invlaid characters. Please check and re-enter");
			return false;
		}
	//vailidates Email
	if (emailexpression.test(document.getElementById("email").value) == false)
	{
		alert("Your email is either blank or contains invalid characters. Please check and re-enter.");
		return false;
	}
	//vailidates URL link
	if (urlexpression.test(document.getElementById("linkurl").value) == false)
	{
		alert("Enter a valid URL. Enter in the format www.yourwebaddress");
		return false;
	}
        
	return true;	


}

	// Directs the current location to home page.
	function redirecttohome()
	{
		window.location.href="default.asp";
	}


	//Takes to paypal page.
	function processpay()
	{
		if (validatefields() == true)
		{
			form1.submit();
		}

	}


