var onlayer="none";
var activelayer="none";
var lastlayer="none";
var d = "document.images";
var ie = 0;
var op = 0;
var ns6 = 0;
var samecolor = 0;
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf('gecko')!=-1){ns6=1;}
if (document.all) {
if (agt.indexOf('opera')==-1){ie=1;}
else {op=1;}
}

function fadein(what) {   
    if (document.getElementById(what).filters.blendTrans.status==0) {
        document.getElementById(what).filters.blendTrans.Apply();
        document.getElementById(what).style.visibility = "visible";
        document.getElementById(what).filters.blendTrans.Play();
    }
}

function show(what,link,MenuLeft){


if (!document.getElementById('ref').offsetLeft){
	MenuLeft += TableOffset
	if ((document.body.offsetWidth / 2) - ((TableWidth/2) - MenuLeft) > MenuLeft)
	document.getElementById(what).style.left = (document.body.offsetWidth / 2) - ((TableWidth/2) - MenuLeft) + 'px'
	else{
	document.getElementById(what).style.left = MenuLeft + 'px';}
}
else {
document.getElementById(what).style.left = document.getElementById('ref').offsetLeft + MenuLeft + 'px';
}

if(lastlayer != "none"){
eval(d + "." +lastlayer+ "Img.src='/klmp/images/s_3" + lastlayer + ".jpg'")
document.getElementById(lastlayer).style.visibility="hidden";}
if(ie){fadein(what);}
else{document.getElementById(what).style.visibility="visible";}
eval(d + "." +what+ "Img.src='/klmp/images/s_3" + what + "_r.jpg'");
activelayer=what;
}

function hide(what){
lastlayer=activelayer;
activelayer="none";
window.setTimeout("hidenow('" +what+ "')", 500);
}

function on(what){
onlayer = what;
}

function off(what){
onlayer="none";
window.setTimeout("hidenow('" +what+ "')", 250);
}

function hidenow(what){
if(onlayer != what && activelayer != what){
eval(d + "." +what+ "Img.src='/klmp/images/s_3" + what + ".jpg'")
document.getElementById(what).style.visibility="hidden";
}
}

function BuildLinks(what) {
var temp = what + "Content";
var theov = "";
var theout = "";

if (MenuOvColor != ""){
theov = theov + "this.style.backgroundColor=aaa" + MenuOvColor + "aaa;"
theout = theout + "this.style.backgroundColor=aaa" + MenuColor + "aaa;"
}


if (ns6==1)
theov = theov + "this.style.cursor=aaapointeraaa;"
else
theov = theov + "this.style.cursor=aaahandaaa;"

if (eval(what + "Linksarr.length") > 0){

eval("var " + temp + "= '<table width=150 border=0 cellpadding=0 cellspacing=0 bgcolor=#5d5d5d><tr><td align=center><table width=148 cellspacing=0 cellpadding=0 border=0 bgcolor=' + MenuColor + '>'");

for(var y = 0; y < eval(what + "arr.length"); y++){
eval(temp + "=" + temp + "+ '<tr><td height='+ MenuHeight +' width=138 align=left bgcolor=' + MenuColor + ' valign=center width=100%'")

if (theov != ""){
eval(temp + "=" + temp + "+ ' onmouseover=bbb' + theov + 'bbb'")
eval(temp + "=" + temp + "+ ' onmouseout=bbb' + theout + 'bbb'")
}

tempcode = eval(what + "Linksarr[y].toLowerCase()");
if (tempcode.indexOf("javascript:")!=-1){
tempcode = tempcode.replace("javascript:","");
eval(temp + "=" + temp + "+ ' onclick=bbb'+ tempcode +';bbb'")
} else {
eval(temp + "=" + temp + "+ ' onclick=bbbdocument.location=aaa' + " + what + "Linksarr[y] + 'aaa;bbb'")
}

if (MenuOvColor=="" && samecolor==1){
var tdcontent = "<a class=aaamenutextaaa href=aaa" + eval(what + "Linksarr[y]") + "aaa>" + eval(what + "arr[y]") + "</a>";}
else{
var tdcontent = eval(what + "arr[y]");}

eval(temp + "=" + temp + "+ 'class=menutext><img src=/klmp/images/bull.gif border=0 hspace=4 vspace=1>' + tdcontent + '</td></tr>'")
}

eval(temp + "=" + temp + "+ '</table></td></tr><tr><td height=1><img src=/klmp/images/spacer.gif border=0 height=1 width=1></td></tr></table>'")
atemp = eval(temp)

atemp = atemp.replace(/aaa/g, "'")
atemp = atemp.replace(/bbb/g, '"')
return atemp;
} else {
return "";
}
}

function BuildLayers(){
for(var x = 0; x < menuarr.length; x++){
document.write('<div id="' + menuarr[x] + '"');
document.write(' style="filter:alpha(opacity=100)blendTrans(duration=.10);z-index:100;visibility:hidden;position:absolute;top:'+ Top +';"');
document.write(" onMouseOver=on('" + menuarr[x] + "'); onMouseOut=off('" + menuarr[x] + "');>");
document.write(eval("BuildLinks('" + menuarr[x] + "')"));
document.write('</div>');
}}