<!--
function visit(newURL) {
  //--Function to enable the drop down menu for navigation
  if (newURL != "") {
    location.href=newURL
  }
}
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="ATTENTION: SCF logos and images are the copyrighted legal property of the College. The right-click function is disabled to prevent unauthorized use for any purpose without the express prior approval of Public Affairs & Marketing, 941-752-5320 or images@scf.edu. This restriction applies to all internal and external uses and affiliates, partners and vendors."
///////////////////////////////////
//function clickIE4(){
//if (event.button==2){
//alert(message);
//return false;
//}
//}
//function clickNS4(e){
//if (document.layers||document.getElementById&&!document.all){
//if (e.which==2||e.which==3){
//alert(message);
//return false;
//}
//}
//}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
//document.oncontextmenu=new Function("alert(message);return false")

// Highlights the current page on the left navigation
function highlightNavItems( nodeClass ) {
	var documentHREF = document.location.href;
	var navlist = getElementsByClass( nodeClass );
        var navitems = navlist[0].children;
	
	if( navitems ) {
		for( idx = 0; idx < navitems.length; idx++ ) {
if(navitems[idx].childNodes[0] != undefined) {
			if( navitems[idx].childNodes[0].href == documentHREF ) {
				navitems[idx].childNodes[0].className = "selected";
			}
		}
}
	}
}

function highlightCurrentPage() {
      highlightNavItems( "navlist" );
}

// Returns an array of elements that match a particular class
function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if ( node == null )
		node = document;
	if ( tag == null )
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			j++;
		}
	}
	return classElements;
}

function makeLinksActive() {
           if( document.getElementById("homenewscontent") ) {
		var haystackText = document.getElementById("homenewscontent").innerHTML;
		var needle = " (www.scf.edu/[/a-zA-Z0-9_-]*(\.[a-zA-Z0-9_-]+)?)";
		var replacement = ' <a href="http://$1">$1</a>';
		var match = new RegExp(needle, "ig");     
		var replaced = "";
		if (replacement.length > 0) {
			replaced = haystackText.replace(match, replacement);
		}
		document.getElementById("homenewscontent").innerHTML = replaced;
           }
}

window.onload = function(){
highlightCurrentPage();
makeLinksActive();
}

//-->
