
function popUp(URL, width, height) {
  window.open(URL, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+width+',height='+height+',left=25,top=25');
}

function runFlash(width, height, src, align) {
  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="' +width+ '" height="' +height+ '" align="' +align+ '">\n');
  document.write('<param name="movie" value="' +src+ '" />\n');
  document.write('<param name="wmode" value="transparent" />\n');
  document.write('<param name="quality" value="high" />\n');
  document.write('<embed src="' +src+ '" quality="high" wmode="transparent" align="' +align+ '" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' +width+ '" height="' +height+ '">\n');
  document.write('</embed>\n');
  document.write('</object>\n');
}

sfHover = function() {
	var sfEls = document.getElementById("nav-bottom").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


function validateContactForm() {

  var vbCRLF = String.fromCharCode(13,10);
  var incomplete = 0, msg = "";

  if (document.contactForm.name.value == "") {
    incomplete = 1;
    msg = "Please type your first and last name." + vbCRLF;
  }
  if (document.contactForm.phone.value == "") {
    incomplete = 1;
    msg += "Please type your phone #." + vbCRLF;
  }
  if (document.contactForm.email.value == "" || document.contactForm.email.value.indexOf("@")==-1 || document.contactForm.email.value.indexOf(".")==-1 ) {
    incomplete = 1;
    msg += "Please type a valid email address." + vbCRLF;
  }
  if (incomplete == 1) {
    alert(msg);
  }
  else {
    document.contactForm.submit();
  }

}

