<!--

//muuttujia
	d=document;
	ns4=d.layers&&!d.getElementById?true:false;
	ie4=d.all&&!d.getElementById?true:false;
	ie5=d.all&&d.getElementById?true:false;
	dom=d.getElementById&&!d.all?true:false;
	opera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;
	docIsReady = false; 
	onResize = initDoc;
	
//tyylimääritykset
	
	if(ns4){
		docWidth = window.innerWidth;
		var docCenter = docWidth / 2;
		
		for (var i=1; i < menus.length; i++){
			menus[i] += docCenter-(pageWidth/2)-10;
		}
	}

	document.writeln("<style type='text/css'>");
	document.writeln(".mainMenu {position:absolute;width:"+pageWidth+"px;height:0px;top:0px;left:0px;z-index:10}");
	document.writeln(".dropDown					{ "+cssMenu+"}");
	document.writeln(".menuObjBg				{ "+cssMenuObjBg+" }");
	document.writeln(".menuObj					{ "+cssMenuObj+" }");
	document.writeln("A.menuObj:link			{ "+cssMenuObjLink+" }");
	document.writeln("A.menuObj:hover			{ "+cssMenuObjLinkH+" }");
	document.writeln("A.menuObj:visited			{ "+cssMenuObjLinkV+" }");
	document.writeln("A.menuObj:visited:hover	{ "+cssMenuObjLinkHV+" }");
	document.writeln(".menuSubObj					{ "+cssMenuSubObj+" }");
	document.writeln("A.menuSubObj:link			{ "+cssMenuSubObjLink+" }");
	document.writeln("A.menuSubObj:hover			{ "+cssMenuSubObjLinkH+" }");
	document.writeln("A.menuSubObj:visited			{ "+cssMenuSubObjLinkV+" }");
	document.writeln("A.menuSubObj:visited:hover	{ "+cssMenuSubObjLinkHV+" }");
	document.writeln("</style>");
		


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function showMenu(menu){

	if(docIsReady){
	clearTimeout(timedMenus);

	for (var i=1; i < menus.length; i++){
		var menuObj = MM_findObj('L'+i);
		if(!ns4) var mainMenuObj = MM_findObj('navMenu');
		if ( menuObj ) {
		
			if(i == menu){
				
				if(!ns4){

					if((parseInt(mainMenuObj.style.left) + menus[i] + menuWidth)> docWidth){
						menuObj.style.left = (docWidth-menuWidth-3);
					}
					else{
						menuObj.style.left = menus[i];
					}
					
					menuObj.style.visibility = 'visible';
				}
				else{	
					menuObj.visibility = 'visible';
				}
			}
			else{
				if(!ns4){
					menuObj.style.visibility = 'hidden';
				}
				else{
					menuObj.visibility = 'hidden';
				}
			}
		}

	}
	}
}

function hideMenus(){
	if(docIsReady){
		timedMenus = setTimeout('hideAll()', timerLatency);
	}
}

function hideAll(){
	clearTimeout(timedMenus);
	MM_swapImgRestore();
	
	for (var i=1; i < menus.length; i++){
		var menuObj = MM_findObj('L'+i);
		if ( menuObj ) {
			if(!ns4){
				menuObj.style.visibility = 'hidden';
			}
			else{
				menuObj.visibility = 'hidden';
			}
		}
	}	
}

function showCurMenu(){
		var lName = this.id+"";
		var menuN = parseInt(lName.replace('L',''));
		showMenu(menuN);
		MM_swapImage(document.oldImg.name,'',document.oldImg.src,1);
}

function setBG(obj){
	if(menuImageOver.src != "") obj.style.backgroundImage = "url("+menuImageOver+")";
}

function restoreBG(obj){
	if(menuImageOrig.src != "") obj.style.backgroundImage = "url("+menuImageOrig+")";
}

function goToPage(pageUrl, target){
	
	if(target != "_self"){
		window.open(pageUrl,target);	
	}
	else{
		document.location.href = pageUrl;
	}
}

function initDoc(){
	
	timedMenus = setTimeout('', 0);
	
	if(ie5 || ie4) docWidth = document.body.clientWidth;
	if(dom || ns4) docWidth = window.innerWidth;
	
	if(!ns4 && docIsCentered){
		var mainMenuObj = MM_findObj('navMenu');
		
		if((docWidth <= pageWidth) || !docIsCentered){
			mainMenuObj.style.left = 0+'px';
		}
		else{
			mainMenuObj.style.left = (docWidth/2-pageWidth/2)+'px';
		}

	}

	for (var i=1; i < menus.length; i++){
		var menuObj = MM_findObj('L'+i);
		if ( menuObj ) {
			menuObj.onmouseover = showCurMenu;
			menuObj.onmouseout = hideMenus;
			
			if(!ns4){	
				menuObj.style.left = menus[i]+'px';
				menuObj.style.top = menusTop[i]+'px';
				menuObj.style.width = menuWidth+'px';
    		}	
		}
	}
	
	docIsReady = true;
}

// -->