var active=null,_oE=null;
var subMenus=[
["sub1","cat","web"],
["sub2","cat","about"],
["sub3","cat","place"],
["sub4","cat","script"],
["sub5","cat","linkz"],
["sub6","cat","fun"],
["sub7","cat","layout"]
];
function getElm(e){
switch(true){
case typeof(document.all)=="object":
return document.all[e];
case typeof(document.getElementById)=="function":
return document.getElementById(e);
default:
return null;
}
};
function showHide(s){
var e=getElm(s);
if(!e){
return true;
}
if(active&&active!=e.id){
var oE=getElm(active);
if(document.all){
oE.nextSibling.style.display=(window.opera)?"table-row":"block";
} else {
oE.nextSibling.nextSibling.style.display="table-row";
}
oE.style.display="none";
}
else if(!active&&find()){
var i=subMenus.length;
while(i--\>0){
if(e==getElm(subMenus*\[0\])){
if(document.all){
\_oE.nextSibling.style.display=(window.opera)?"table-row":"block";
} else {
\_oE.nextSibling.nextSibling.style.display="table-row";
}
continue;
} else {
getElm(subMenus*\[0\]).style.display="none";
}
}
}
if(e.style.display==""\|\|e.style.display=="none"){
if(document.all){
e.style.display=(window.opera)?"table-row":"block";
e.nextSibling.style.display="none";
} else {
e.style.display="table-row";
e.nextSibling.nextSibling.style.display="none";
}
} else {
if(document.all){
e.nextSibling.style.display=(window.opera)?"table-row":"block";
} else {
e.nextSibling.nextSibling.style.display="table-row";
}
e.style.display="none";
}
active=e.id;
return false;
};
function find(){
if(subMenus.length<1 || location.search.indexOf("cat=")<1 || location.search.indexOf("cat=pics")>0){
return 0;
}
var
o=subMenus,
i=o.length,
l=location.search;
while(i--\>0){
if(l.indexOf(o*\[1\])\>0){
if(l.split(o*\[1\])\[1\].indexOf(o*\[2\])\>0){
\_oE=getElm(o*\[0\]);
if(document.all){
\_oE.style.display=(window.opera)?"table-row":"block";
\_oE.nextSibling.style.display="none";
} else {
\_oE.style.display="table-row";
\_oE.nextSibling.nextSibling.style.display="none";
}
continue;
}
}
getElm(o*\[0\]).style.display="none";
}
return 1;
};
window.onload=function(){
find();
};
Det var js koden..
behövs den andra koden, dvs meny.asp?*******