function oppna(url,w,h,scrollbars,wname) {
	var fonster = new Array;
	var x = (screen.availWidth/2)-(w/2);
	var y = (screen.availHeight/2)-(h/2);
	if(wname == undefined) wname = "Apabanan";
	if(scrollbars == undefined) scrollbars = 0;
	if(scrollbars == true || scrollbars == "yes"){var scrollbars=1;} else {var scrollbars=0;}
	if(!fonster[wname] || fonster[wname].closed) {
		fonster[wname] = window.open(url, wname, 'scrollbars=' + scrollbars +  ',resizable=no,status=no,height= ' + h + ',width=' + w + ',top=' + y + ',left=' + x);
		fonster[wname].location.href = url;
		fonster[wname].focus();
	} else {
		fonster[wname].location.href = url;
		fonster[wname].focus();
	}
}


function contactlayer(action) {
	if (action == "show") {
		document.getElementById("contactlayer").style.display="block";
	} else {
		document.getElementById("contactlayer").style.display="none";
	}
}



function showcustomsubmenu(which,ifon) {
	rootcontainer = document.getElementById("customrootmenudiv");
	numberofrootitems = rootcontainer.getElementsByTagName("td");
	for (x=1;x<=numberofrootitems.length;x++){
		if (document.getElementById('customrootmenutd'+x).className!="customrootmenu-on") {
			document.getElementById('customrootmenutd'+x).className="customrootmenu";
		}
	}
	if(ifon=="-on"){
		document.getElementById('customrootmenutd'+which).className="customrootmenu-on";
	} else {
		document.getElementById('customrootmenutd'+which).className="customrootmenu-hover";
	}
	subcontainer = document.getElementById("customsubmenudiv");
	numberofsubitems = subcontainer.getElementsByTagName("div");
	for (x=1;x<=numberofsubitems.length;x++){
	document.getElementById('customsubmenu'+x).style.display="none";
	}
	document.getElementById('customsubmenu'+which).style.display="block";
}

function showcustomsubmenustart(which) {
	for (x=1;x<=20;x++){
		if (document.getElementById('customrootmenutd'+x)) document.getElementById('customrootmenutd'+x).className="rootmenu_td";
		if (document.getElementById('ah'+x)) document.getElementById('ah'+x).className="rootmenu_link";
		if (document.getElementById('customsubmenu'+x))document.getElementById('customsubmenu'+x).style.display="none";
	}

	if (document.getElementById('customrootmenutd'+which)) document.getElementById('customrootmenutd'+which).className="rootmenu_td_on";
	if (document.getElementById('ah'+which)) document.getElementById('ah'+which).className="rootmenu_link_on";
	if (document.getElementById('customsubmenu'+which))document.getElementById('customsubmenu'+which).style.display="block";
}

