  // Common Javascript function library

  // -------------------------------------------------------------------
  // Mail To .something
  
        
 	function MailTo ( name, domain, tld, label){
					
      var theString = "<a href=\"mailto:";
			
				theString += name;
				theString += "@";
				theString += domain;
				theString += ".";
				theString += tld;
				theString += "\">";
				theString += label;
				theString += "</a>";  
                      		
				document.write(theString);
				}

  //-------------------------------------------------------------------
  // Mail To2 .something .something
  
        
 	function MailTo2 ( name, domain, tld, tld2, label){
					
      var theString = "<a href=\"mailto:";
			
				theString += name;
				theString += "@";
				theString += domain;
				theString += ".";
				theString += tld;
				theString += ".";
				theString += tld2;
				theString += "\">";
				theString += label;
				theString += "</a>";  
                      		
				document.write(theString);
				}

  //-------------------------------------------------------------------
	
  // Open very small window
        
        function openVeSmWindow(theURL,winName) { 
  				window.open(theURL,winName,
       		'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=350,height=400,left=135,top=70');
				}
    
          
  //-------------------------------------------------------------------
  // Open small window
        
        function openSmWindow(theURL,winName) { 
  				window.open(theURL,winName,
       		'toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=630,height=480,left=135,top=70');
				}
 

  //-------------------------------------------------------------------
  // Open window
     
        function openWindow(theURL,winName) { 
  				window.open(theURL,winName,'toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=0,width=800,height=480,left=20,top=70');
				}            
        
        
  // ------------------------------------------------------------------
  // getElement, ...
	function getElement(obj) {
				if (document.getElementById)  { return document.getElementById(obj); }
				if (document.all) { return document.all[obj];  } 
				if (document.layers)  { return getLayer(obj, document); }
				}      
        
  // ------------------------------------------------------------------
  // check email entry
				function isEmailValid(str) {
     				var regex = /^[\w_\.]*[\w_\.]@([\w]+\.)+[\w]*[\w]$/;
     				return regex.test(str);
				}        
        
        
        

   //  -------------------------------------------------------------------
   //  Past Event Drop Down
   startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
window.onload=startList;     
        
        
// ------------------------------------------------------------------------ 