// Email this Tutorial Script
var good;
function checkEmailAddress(field) {
var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.ca)|(\.fr)|(\.org)|(\..{2,2}))$)\b/gi);
if (goodEmail){
   good = true
} else {
   alert('Please enter a valid e-mail address.')
   field.focus()
   field.select()
   good = false
   }
}



u = window.location;
m = "3web Help -- Online Tutorial";
b = "Thank you for using the 3web Online Help Centre at http://help.3web.com. The following link my be useful to you, to open it, simply click the link or highlight the URL and paste it into any browser:";
function mailThisUrl(){
   good = false
   checkEmailAddress(document.eMailer.address)
   if (good){
      window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+b+" "+u;
   }
}

//Print URL
function populateModem()
{	
	var url = window.location.protocol + "//" + window.location.host + window.location.pathname;
	var printPath = url.substring(0,url.lastIndexOf("/")) + "/print" + url.substring(url.lastIndexOf("/")+1) + window.location.search;
	newwin = window.open(printPath);
}
