/*
J  a  v  a  c  a  t  z

Description: bodyOnLoader.js

Tel: (852)29877951
Fax: (852)29879294
Email: office@javacatz.com
Website: www.javacatz.com

Created: 2006-11-02
*/

/* *** IE Update for ActiveX click to activate *** */
function ieupdate() {
	objects = document.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++)
	{
		objects[i].outerHTML = objects[i].outerHTML;
	}
}

/* *** onLoad function *** */
function bodyOnLoader(id, pageLength) {	// id = filename normally; pageLength = short / medium / long

	changeSideNavPic(id);
	if($('nav_'+id)) {
		
		$('nav_'+id).className = "selected";	// select the current pageSideNav section
	}
	/*
	if(pageLength == "short" || pageLength == "medium") {
		$('pageFooterContentClass').className = "shortContents";
	} else {
		$('pageFooterContentClass').className = "contents";
	}
	*/
	
	/* *** Hide pop-out div boxes *** */
	if($('timelineLoading')) {
		new Effect.Fade($('timelineLoading'), {duration: 0});
		new Effect.Fade($('timelineBox'), {duration: 0});
	}
	if($('onTopBox')) {
		new Effect.Fade($('onTopBox'), {duration: 0});
	}
	if($('glossaryContents')) {
		ajaxGlossary('trahk');
	}
	if($('faqContents')) {
		ajaxFaq('general_questions');
	}
	//new Effect.Fade($('whatsNewBox'), {duration: 0, afterFinish: function() { whatsNewBoxStatus = true; } });
	//new Effect.Fade($('whatsNewBoxLoading'), {duration: 0});
	// new Effect.Fade($('indexDisclaimer'), {duration: 0});
	whatsNewBoxStatus = false;
	/* *** end of Hide pop-out div boxes *** */

	/* *** Hide sliding div boxes *** */
	if( historyLinks = $$('.history_links') ) {
		// historyLinks.each(function(node){ $(node).style.display="none"; });
		historyLinks.each( function(node) {
				new Effect.BlindUp($(node), {duration: 0});
		});
		timelineYear = $$('.timeline_year');
	}
	if( slideContainerItems = $$('.slideContents') ) {
		slideContainerItems.each( function(node) {
				new Effect.BlindUp($(node), {duration: 0});
		});
		slideContainerTitles = $$('.slideTitle');
	}
	setTimeout("if($('desc_0001')) openSlideContainer('0001');", 200);
	/* *** end of Hide sliding div boxes *** */
	
	setTimeout('ieupdate();', 200);	// IE Flash Fix
	setTimeout('pageLoadStatus = true;', 200);	// indicate page is fully loaded
	
	/* from sidenav.js */
	changeSideNavPic(id);

	/* from topbanner js */
	//writeSsgaImageMap();


}
/* *** end of onLoad function *** */

