﻿function init_load(){
    startList();
    var banner = document.getElementById('dnn_BannerPane');
    if ( banner && banner.className.indexOf('DNNEmptyPane') < 0 ){
        document.getElementById('dnn_ImageContainer').style.display = "block";
        try {
		$('#dnn_ImageContainer').crossSlide({
          sleep: 2,
          fade: 1
        }, [
          { src: 'Portals/_default/Skins/gac/images/fade1.jpg' },
          { src: 'Portals/_default/Skins/gac/images/fade2.jpg'   },
          { src: 'Portals/_default/Skins/gac/images/fade3.jpg'  },
          { src: 'Portals/_default/Skins/gac/images/fade4.jpg' }
        ]); 
		} catch(errgac) {}
    }
	__dnn_Page_OnLoad();	
}

function hideSearchPane(){
    var obj = document.getElementById('dnn_BannerPane');
    if ( obj.className && obj.className.indexOf( 'DNNEmptyPane' ) < 0  ){
        var searchObj = document.getElementById('dnn_SearchPane');
        searchObj.className = searchObj.className + ' DNNEmptyPane';
    }
}


function startList() { 
navRoot = document.getElementById("houseMenuH");

// Remove titles from Dropdown Menu Links because of usability reasons
links = navRoot.getElementsByTagName('A');
for ( i=0; i < links.length; i++)
    links[i].title = '';
for (i=0; i<navRoot.childNodes.length; i++) 
{
	node = navRoot.childNodes[i];
	if (node.nodeName=="LI") 
	{
		eval( "node.onmouseover=function() { this.className+=' " + navRoot.childNodes[i].id +"Snd'; }" )
		eval( "node.onmouseout=function() { this.className=this.className.replace('" + navRoot.childNodes[i].id +"Snd', ''); }" );

		navSecond = node.getElementsByTagName('UL');
		for (j=0; j<navSecond.length; j++)
		{
			for (k=0; k<navSecond[j].childNodes.length; k++) 
			{
				nodeSecond = navSecond[j].childNodes[k];
				if (nodeSecond.nodeName=="LI") 
				{
					navThird = nodeSecond.getElementsByTagName('UL');
					if(navThird.length > 0)	
					{
						eval( "nodeSecond.onmouseover=function() { document.getElementById('" + navRoot.childNodes[i].id +"').className+=' " + navRoot.childNodes[i].id +"Snd'; }" );
						eval( "nodeSecond.onmouseout=function() { document.getElementById('" + navRoot.childNodes[i].id +"').className= document.getElementById('" + navRoot.childNodes[i].id +"').className.replace('" + navRoot.childNodes[i].id +"Snd', ''); }" );
					}
				}
			}
		}
	}
}

}


