




/*
     FILE ARCHIVED ON 21:27:06 Aug 13, 2006 AND RETRIEVED FROM THE
     INTERNET ARCHIVE ON 6:39:11 Nov 28, 2011.
     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.

     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
     SECTION 108(a)(3)).
*/
// JavaScript Document


window.onload = initscripts;

createNotes=function(){

            showNote=function(){
                        // gets corresponding note element id
                        var id=this.id.replace(/a/,'note');
                        note=document.getElementById(id);
                        // assigns X,Y mouse coordinates to note element
                        note.style.left=event.clientX;
                        note.style.top=event.clientY;
                        // makes note element visible
                        note.style.visibility='visible';
            }

            hideNote=function(){ 
                        // gets corresponding id for note element
                        var id=this.id.replace(/a/,'note');
                        note=document.getElementById(id);
                        // hides note element
                        note.style.visibility='hidden';
            }

            // gets all <a> elements 
            as=document.getElementsByTagName('a');
            // iterates over all <a> elements
            for(i=0;i<as.length;i++){
                        // assigns mouse event handlers to <a> elements with class name "special"
                        if(/\bspecial\b/.test(as[i].className)){
                                    // shows note element when mouse is over 
                                    as[i].onmousemove=showNote;
                                    // hides note element when mouse is out
                                    as[i].onmouseout=hideNote;
                        }
            }
}



function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}

// script from : http://web.archive.org/web/20060813212706/http://www.sitepoint.com
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";
	}
}


// onloads called for the page
function initscripts() {
	externalLinks();
}

//=========================================================
// Function: isValidEmail(obj)
// Description : Checks if given email address has valid syntax
// usage: <INPUT TYPE="TEXT" NAME="email" onChange="isValidEmail(this)" >
// note: it is tempting to call the field e-mail but the dash in the name causes
//         problems later (javascript interpretes this a variable "e" minus a variable "mail"
// note: Validation assumptions 
//   E-mail address has an "@" symbol in it, at least one alphanumeric character before the "@" symbol, 
//   and either a two-letter country code or a .com, .net, .edu, .mil, .gov .biz or .org suffix 

function isValidEmail (obj){
		var str 	= obj.value ; // value to be 'tested' 
		var name 	= obj.name  ; // name of the field	
    var errMsg	= "Please enter your valid email address." 
    	  errMsg +="\nfor " + name + ". (Required entry)" ;
    	  errMsg +="\nYou entered \"" + str +"\"." ;    	  
		var newString = str.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.biz)|(\.org)|(\..{2,2}))$)\b/gi);
		if (!newString){  
   		alert(errMsg) ; // tell the user what is wrong
   		obj.focus()   ; // focus on the field with the problem
			//obj.select()  ; // select the contents of the field with the problem
			return false  ; // tell wrap around function that this value fails
		}
    return true     ; // tell wrap around function that this value passes
}


function isgood(){	
		var tmpName = document.quickForm.myName.value;
		var tmpEmail = document.quickForm.myEmail.value;
		var myReturn = true;
		alert(tmpName);
		alert(tmpEmail);
		if ( tmpName.length == 0 )
		{
			alert("Please enter your name.");
			document.quickForm.myName.focus();
			myReturn = false;
	  }			
    
		if ( tmpEmail.length == 0 )
		{
			alert("Please enter your email.");
			document.quickForm.myEmail.focus();
			myReturn = false;
	  }			
   return myReturn;
	}		

window.onload = initscripts;

