

function validate_fields(theForm)
        {
                var strMessage, blnEmpty;
                strMessage = "Please enter the following fields: \n";
                blnEmpty = false;

                if(theForm.txtName.value == null || theForm.txtName.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - Full Name\n"; }

                if(theForm.txtEmail.value == null || theForm.txtEmail.value == "" || !(isEmailAddr(theForm.txtEmail.value)))
                        { blnEmpty = true; strMessage = strMessage + " - Valid Email Address\n"; }

                if(theForm.txtMessage.value == null || theForm.txtMessage.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - Your Message\n"; }


                if(blnEmpty)
                {  alert(strMessage); return (false); }
                else
                {  return (true); }
        }

function validate_fields_dealers(theForm)
        {
                var strMessage, blnEmpty;
                strMessage = "Please enter the following fields: \n";
                blnEmpty = false;

                if(theForm.txtName.value == null || theForm.txtName.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - Full Name\n"; }
					
                if(theForm.txtCompany.value == null || theForm.txtCompany.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - Company Name\n"; }
						
				if(theForm.txtCity.value == null || theForm.txtCity.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - City\n"; }						
				
				if(theForm.txtPhone.value == null || theForm.txtPhone.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - Phone Number\n"; }				

                if(theForm.txtEmail.value == null || theForm.txtEmail.value == "" || !(isEmailAddr(theForm.txtEmail.value)))
                        { blnEmpty = true; strMessage = strMessage + " - Valid Email Address\n"; }

                if(blnEmpty)
                {  alert(strMessage); return (false); }
                else
                {  return (true); }
        }



function isEmailAddr(email)
{
	var result = false
	var theStr = new String(email)
	var index = theStr.indexOf("@");
	if (index > 0)
	{
		var pindex = theStr.indexOf(".",index);
		if ((pindex > index+1) && (theStr.length > pindex+1))
		result = true;
	}
	return result;
}



	function ShowLarge1(sUrl)
	{
		large_image1_win = window.open(sUrl, 'large_image1_win', 'width=650,height=450,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no');
		large_image1_win.focus();
	}
	function ShowLarge2(sUrl)
	{
		large_image1_win = window.open(sUrl, 'large_image1_win', 'width=650,height=550,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no');
		large_image1_win.focus();
	}
	
	function Pop1(sUrl)
	{
		large_image1_win = window.open(sUrl, 'large_win1', 'width=750,height=450,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no');
		large_image1_win.focus();
	}
