// Flash header Script
/******************** Event registration ********************/
if(window.attachEvent) //IE
{
	window.attachEvent("onload", _initPageFunction);
}
else if(window.addEventListener) //DOM
{
	window.addEventListener("load", _initPageFunction, false);
}


function _initPageFunction()
{
	_initDashboardTop()
	_initFlashHeader()
}

function _initDashboardTop()
{
	oFormAction = document.Form1.action;
	oDivContentPageContent = document.getElementById('contentPageContent');
	sCurrentPage = '';

	if(oFormAction.indexOf('?') > -1)
	{
		sCurrentPage = oFormAction.substring(0, oFormAction.indexOf('?'));	
	}
	else
	{
		sCurrentPage = oFormAction;
	}
			
	if(sCurrentPage.indexOf('/Dashboard.aspx') > -1)
	{
		if(oDivContentPageContent)
		{
			oDivContentPageContent.style.backgroundImage = "url('/kcentric_theme/img/top-page.gif')"; 
			oDivContentPageContent.style.backgroundRepeat = 'no-repeat';
			oDivContentPageContent.style.backgroundPoistion = 'left top';
		}
	}
}

function _initFlashHeader()
{

	var fo = new FlashObject("/kcentric_theme/img/medias/header/loader.swf", "oFlashHeader", "246", "90", "6", "FFFFFF");
	fo.addParam("wmode", "transparent");
	fo.addParam("menu", "false");
	fo.addVariable("clip", "/kcentric_theme/img/medias/header/header_flash.swf");
	fo.addVariable("images", "ac610m-630m.jpg,action-drilling.jpg,ALUMINIUM-MILLING.jpg,ANGLEHEADKEYCUTTER.jpg,CBN-2.jpg,COPY-MILL.jpg,EcoCut.jpg,efficiency1.jpg,millingchips2.jpg,PROFILEMASTER.jpg,quatromill2.jpg,smd-drills.jpg,solidcarbide_img3.jpg,test_ROTA_S_Plus.jpg,threadmills-solid.jpg,TMILLING.jpg,wem-mills.jpg,high_performance_milling_cu.jpg,metalcutting01.jpg,metalcutting02.jpg,metalcutting03.jpg");
	fo.write("contentHeader");
	
}
