<!--

function pdfWindow(url, windowName){
  var x = 775; //Width
  var y = 500; //Height
  var params = "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=" + x + ",height=" + y + ";"
  newWindow = window.open(url, windowName, params);
}

var MM_FlashCanPlay = false;
var MM_contentVersion = 7;

function showFlash(name, flash, width, height, bgcolor, altImage)
{

	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

	if ( plugin ) {
		
			var words = navigator.plugins["Shockwave Flash"].description.split(" ");
			for (var i = 0; i < words.length; ++i)
			{
					if (isNaN(parseInt(words[i])))
					continue;
					var MM_PluginVersion = words[i]; 
			}
			
			MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
		&& (navigator.appVersion.indexOf("Win") != -1)) {
		
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
        document.write('on error resume next \n');
        document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
        document.write('</SCR' + 'IPT\> \n');
	}

	
	
	if ( MM_FlashCanPlay ) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
		document.write(' width="'+ width + '" height="' + height + '" id="'+name+'">');
		document.write(' <PARAM NAME=movie VALUE="' + flash + '"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=' + bgcolor + '> <PARAM NAME=loop VALUE=FALSE> '); 
		document.write(' <EMBED src="'+ flash + '" menu=false quality=high bgcolor=' + bgcolor);
		document.write(' swLiveConnect=FALSE WIDTH="'+ width + '" HEIGHT="' + height + '" NAME="'+name+'"');
		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
		document.write(' </EMBED>');
		document.write(' </OBJECT>');
	 
	} else{
		document.write('<img src="' + altImage + '" name="logo" width="'+ width + '" height="' + height + '" border="0">'); 
	}
}


var bAdvance = false;
var strCurfld = '';
var strNextfld = '';
var nCurfldlen = 0

function onKeyPress() {
	if (bAdvance == true){
		if (document.all[strCurfld].value.length == nCurfldlen-1){
				document.all[strCurfld].value = document.all[strCurfld].value + String.fromCharCode(window.event.keyCode);
				window.event.keyCode = '';
				document.all[strNextfld].select();
		}
	}
}

function validateForm() {
	var ruvalid = "";
	var doc = document.Form1;
 	
	if(doc.txtFirstName.value.replace(/ /g, "") == ""){
		ruvalid += "--First Name.\n"; 
    }	
	if(doc.txtLastName.value.replace(/ /g, "") == ""){
		ruvalid += "--Last Name.\n"; 
		}
	if(doc.txtEmail.value.replace(/ /g, "") == ""){
		ruvalid += "--Email.\n"; 
	}	  
	if(ruvalid != "") {
		alert("The following fields were left blank or formatted incorrectly in your submission form: \n---------------------------------------------------------------------------------------------------------------------------------\n" + ruvalid + "\n---------------------------------------------------------------------------------------------------------------------------------\n These fields must be filled in correctly before you can successfully submit the form. ");
    return false;
	} else {
		//doc.submit();
		return true;
	}
  
}

function validate() {
	var ruvalid = "";
	var doc = document.Form1;
 	
	if(doc.txtFirstName.value.replace(/ /g, "") == ""){
		ruvalid += "--First Name.\n"; 
    }	
	if(doc.txtLastName.value.replace(/ /g, "") == ""){
		ruvalid += "--Last Name.\n"; 
		}
	if(doc.txtDealer.value.replace(/ /g, "") == ""){
		ruvalid += "--Dealer Code.\n"; 
	}	  
	if(doc.txtRep.value.replace(/ /g, "") == ""){
		ruvalid += "--Rep Code.\n"; 
	}	    
	if(ruvalid != "") {
		alert("The following fields were left blank or formatted incorrectly in your submission form: \n---------------------------------------------------------------------------------------------------------------------------------\n" + ruvalid + "\n---------------------------------------------------------------------------------------------------------------------------------\n These fields must be filled in correctly before you can successfully submit the form. ");
    return false;
	} else {
		//doc.submit();
		return true;
	}
  
}

//-->