// JavaScript Document

function initRollovers() {
    if (!document.getElementById) return
      
    var aPreLoad = new Array();
    var sTempSrc;
    var aImages = document.getElementsByTagName('img');
    for (var i = 0; i < aImages.length; i++) 
	{
		
		if (aImages[i].className == 'rollover') 
		{
	    	var src = aImages[i].getAttribute('src');
	    	var ftype = src.substring(src.lastIndexOf('.'), src.length);
	    	var hsrc = src.replace(ftype, '_over'+ftype);

	   		aImages[i].setAttribute('hsrc', hsrc);
	    
	    	aPreLoad[i] = new Image();
	    	aPreLoad[i].src = hsrc;
	    
	    	aImages[i].onmouseover = function() 
			{
				sTempSrc = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('hsrc'));
	    	}
			
	    	aImages[i].onmouseout = function() 
			{
				if (!sTempSrc) sTempSrc = this.getAttribute('src').replace('_over'+ftype, ftype);
				this.setAttribute('src', sTempSrc);
	    	}
		}
    }
}

window.onload = initRollovers;

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

sfHover = function() {
	var sfEls = document.getElementById("dnn_servicesmenu").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);




function menu_goto( menuform )
{
    // see http://www.thesitewizard.com/archive/navigation.shtml
    // for an explanation of this script and how to use it on your
    // own site

    var baseurl = "http://svc012.wic796dp.server-web.com" ;
    selecteditem = menuform.newurl.selectedIndex ;
    newurl = menuform.newurl.options[ selecteditem ].value ;
    if (newurl.length != 0) {
      location.href = baseurl + newurl ;
    }
}

