
var browser					=	function(){ 
this.userAgent 				= 	navigator.userAgent;
this.opera 					= 	/opera [56789]|opera\/[56789]/i.test(this.userAgent);
this.gecko 					= 	!this.opera && /gecko/i.test(this.userAgent); 
this.nn6 					= 	!this.opera && /netscape.*6\./i.test(this.userAgent); 
this.ie 					= 	!this.opera && /MSIE/.test(this.userAgent); 
this.ie50 					= 	this.ie && /MSIE 5\.[01234]/.test(this.userAgent) ; 
this.ie6 					= 	this.ie && /MSIE [6789]/.test(this.userAgent);
this.ieBox 					= 	this.ie && (document.compatMode == null || document.compatMode != "CSS1Compat");
this.family					=	(this.opera)?'Opera':(this.ie)?'MSIE':(this.gecko)?'Gecko':(this.nn6)?'NN6':(this.nn4)?'NN4':'Other';}
var thisBrowser 			= 	new browser;

function checkForm()
{
// defaults for the script
   var errors = '';
   var oMyForm = document.form1;
   var validemail       = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
   if(oMyForm.name.value =='')
   {errors+='Give us your name please.\n';}
   if(!validemail.test(oMyForm.email.value))
   {errors+='Provide a valid email address.\n';}
   if(oMyForm.message.value =='')
   {errors+='Type a message dumb-ass!\n';}
   if (errors){alert(errors);}
   else{oMyForm.submit();}
}  

function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 
window.onload = externalLinks;
