//-------------------------------------//
//-- ©2004; Chuck Karo; CKandCo.com  --//
//-------------------------------------//
//-- all rights (and lefts) reserved --//
//-------------------------------------//
<!--
function chkFrm() {
	with (document.forms(0)) {
		if (contact_email.value == "" && contact_phone.value == "") {
			alert("\n Please enter an email address if you would like a reply .. Thanks!\n\n (* Subscribers -- please provide your cell number.)\n");
			contact_email.focus();
			return false;
		}
		if (parseInt(navigator.appVersion) >= 4) {
			if (contact_email.value != "") {
				//-- check email string --
  				var re = /^[a-zA-Z0-9]+((\.[a-zA-Z0-9]+)|(\_[a-zA-Z0-9]+)|(\-[a-zA-Z0-9]+))?\@[a-zA-Z0-9]+\.[a-zA-Z0-9]+(\.[a-zA-Z]+)?$/;
  				if (!re.test(contact_email.value)) {
	    			alert("\n Please check the format of the email address you've entered...? \n");
					contact_email.focus();
					return false;
				}
			}
		}
		if (contact_comments.value == "") {
			alert("\n Please enter your Question or Comment in the space provided. \n");
			contact_comments.focus();
			return false;
		} 
	}
	document.forms(0).sendbtn.disabled = true; 
	return true;
}

function gosub(elt) {
	switch (elt) {
		case 'sel':
			document.selection.empty();
			break;
		case 'mse':
			if (window.event.button == 2) alert(" \n Get the GoSurf Alert on your cell phone today! \n ");
			break;
		case 'key':
			if (window.event.ctrlKey) window.event.returnValue=false;
			break;
	}
	return false;
}
function chkEmail() {
	var msg = true;
	var em = document.forms(0).email_add.value;
	if (em == null || em == "" || em.indexOf("@") == -1 || (em.indexOf("@") > em.lastIndexOf(".")) || em.indexOf(" ") > 0 || em.indexOf(",") > 0) {
		msg = false;
	}
	if (!msg) {
		alert("\n Please enter an email address where you would like to be notified. \n");
		document.forms(0).email_add.focus();
		return false;
	} else {
		return true;
	}
}
function chkAdd() {
	if (window.location.search == "?add=true") {
		document.forms(0).notify.disabled = true;
		alert("\n Thank you!\n A notification will be sent to your email address when the GoSurf Alert is live!\n");
	}
	if (window.location.search == "?add=false") {
		alert("\n Oops!\n\n There was a problem adding you to the list...\n Please use email link at bottom of page to report problem\n and include an email where you'd like the notification sent. \n\n Thanks!\n");
	}
}
function writeEML(txt) {
	with (document) {
		var lnk = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#99;&#111;&#110;&#115;&#117;&#108;&#116;&#105;&#110;&#103;&#64;&#99;&#107;&#97;&#110;&#100;&#99;&#111;&#46;&#99;&#111;&#109;&#63;&#115;&#117;&#98;&#106;&#101;&#99;&#116;&#61;GoSurf_Alert";
		write(txt.link(lnk));
	}
}
//-->