// JavaScript Document


//js write email addresses
//prefix = before the @ symbol
//suffix = after the @ symbol
//alt = alternative text—leave null if the email should be displayed as an email address
//classname = class to apply to the A tag
function write_email(prefix, suffix, alt, classname){

 if(alt){
  	var address_hold ="<a href='mailto:" + prefix + "@" + suffix +"' target='_blank' class='"+ classname +"' >"+ alt +"</a>";
 		}else{
 
		var address_hold ="<a href='mailto:" + prefix + "@" + suffix +"' target='_blank' class='"+ classname +"' >" + prefix + "@" + suffix +"</a>";
 	}
	address=document.write(address_hold);
 return address;
 
}


/*IE6 dropdown hover fix */
sfHover = function() {
	var sfEls = document.getElementById("topNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

var pr = function ( o )
{
  if( typeof console == 'object' )
  {
    for( i in o )
    {
      console.log( i + ' is: ' + o[i] );	    
    }
  }
}
var cl = function ( m )
{
  if( typeof console == 'object' )
  {
    console.log( m );	  
  }
}
var id = function ( el )
{
  return document.getElementById( el );	
}
