function loadFunction(){
	loadImage();
	//showBottomPageNav();
//	fixHeight();
//	ifIE6();
}

function loadImage() {
  if(document.images){ 
	if(!document.picture){
		document.picture=new Array();
	}
	var i,j=document.picture.length;

	for(i=0; i<loadImage.arguments.length; i++)
		if (loadImage.arguments[i].indexOf("#")!=0){ 
			document.picture[j]=new Image; 
			document.picture[j++].src=loadImage.arguments[i];
		}
	}
}

function fixHeight(){
	var h = 0;
	var div1 = document.getElementById("top_menu_layout");
	var div2 = document.getElementById("top_banner_layout");
	var div3 = document.getElementById("top_none_layout");
	if(h<div1.offsetHeight){
		h = div1.offsetHeight;
	}
	if (h<div2.offsetHeight){
		h = div2.offsetHeight;
	}
	if(h<div3.offsetHeight){
		h = div3.offsetHeight;
	}

	div1.style.height = h+"px";
	div2.style.height = h+"px";
	div3.style.height = h+"px";
}

function ifIE6(){
	bName = navigator.appName; //1
	bVer = parseInt(navigator.appVersion); //2
	aVer= navigator.appVersion.substring(1,0);

	//if (bName == "Microsoft Internet Explorer" && aVer >= "4"){ 
	if (bName == "Microsoft Internet Explorer" && aVer < "4"){
		document.getElementById("sisu_layout").innerHTML = 'Please upgrade your <A HREF="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx">Internet Explorer version</A> to view webpage correctly!';
	} 
}

function showBottomPageNav(){
	var i;
	var nav_nr_2 = document.getElementsByName('navigation_layout');
	var content = document.getElementById("sisu");
	// nav_nr_2.length

	if(content != null){
		if(content.offsetHeight>'750'){
			nav_nr_2[1].style.display = "";
		}
	}
}

function clicker(pic_file,w,h,close){
	var thediv=document.getElementById('displaybox');
	if(thediv.style.display == "none"){
		thediv.style.display = "";
		thediv.innerHTML = "<div id='displaybox_open'><table><tr><td align='center' valign='middle'> <IMG SRC="+pic_file+" width="+w+" height="+h+"> <br><br><a href='#' onclick='return clicker();'>"+close+"</a></td></tr></table></div>";
	}else{
		thediv.style.display = "none";
		thediv.innerHTML = '';
	}
	return false;
}
