function headerDate()
{

      var now = new Date();
      var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
      var date = now.getDate();
      var month = months[now.getMonth()];
      var year = now.getFullYear();
      document.write(date + ' | ' + month + ' | ' + year);
}

 /* The following scripts are Dreamweaver-generated scripts, used for image rollovers on the Real Time Traffic Information page in the Traffic Info section. They were used in code provided by Datafin, an outside agency who developed some functionality for original versions of these pages.*/

        function MM_findObj(n, d) { //v4.0
            var p,i,x;    if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
            d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
            if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
            for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
            if(!x && document.getElementById) x=document.getElementById(n); return x;
        }

        function MM_swapImgRestore() { //v3.0
            var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
        }

        function MM_swapImage() { //v3.0
            var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
            if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
        }

//open in new windows class="new-window", class="video-window", class="pop-window", class="pdf-window"
/*article from http://www.456bereastreet.com/archive/200605/using_javascript_instead_of_target_to_open_new_windows/*/
/*addEvent function from http://www.quirksmode.org/blog/archives/2005/10/_and_the_winner_1.html*/
function addEvent( obj, type, fn )
{
	if (obj.addEventListener)
		obj.addEventListener( type, fn, false );
	else if (obj.attachEvent)
	{
		obj["e"+type+fn] = fn;
		obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
		obj.attachEvent( "on"+type, obj[type+fn] );
	}
}

function removeEvent( obj, type, fn )
{
	if (obj.removeEventListener)
		obj.removeEventListener( type, fn, false );
	else if (obj.detachEvent)
	{
		obj.detachEvent( "on"+type, obj[type+fn] );
		obj[type+fn] = null;
		obj["e"+type+fn] = null;
	}
}

function externalLinks() {
	try {
	    $("a[href$=pdf]").each(function(){
	        $(this).attr('target','_blank');
	        $(this).attr('title', 'PDF opens in a new window"');
	    });
	    $("a[href$=doc]").each(function(){
	        $(this).attr('target','_blank');
	        $(this).attr('title', 'DOC opens in a new window"');
	    });
	    $("a[href$=xls]").each(function(){
	        $(this).attr('target','_blank');
	        $(this).attr('title', 'XLS opens in a new window"');
	    });	    	    
	    $("a[href$=ppt]").each(function(){
	        $(this).attr('target','_blank');
	        $(this).attr('title', 'PPT opens in a new window"');
	    });	    
	    $("a[href^=http]").each(function(){
	        if(this.href.indexOf(location.hostname) == -1) {
	            $(this).attr('target', '_blank');
	            $(this).attr('title', 'Link opens in a new window"');
	        }
	    });
	    $("a[href^=https]").each(function(){
	        if(this.href.indexOf(location.hostname) == -1) {
	            $(this).attr('target', '_blank');
	            $(this).attr('title', 'Link opens in a new window"');
	        };
	    });	    
	}
	catch(e) {};
};

addEvent(window, 'load', externalLinks);
