var Menus = { corporate: {name:"corporate", sub_menus:["insurance", "business", "departments"]},
private: {name: "private"},
insurance: {name: "insurance"},
business: {name: "business"},
departments: {name: "departments"}
};
function $(id){
return document.getElementById(id);
}
function nn(){
}
nn.prototype.nu=function (){this.ns=$('insurance');
this.ns.style.display="none";
}
nnn=new nn();
function Menu(elementt){
this.element=$('insurance');
this.sub_menu="";
this.status="tratata";
this.name=elementt;
}
function Enclosed(Menus){
var i=0;
this.Menu_array = new Object();
this.Menus=Menus;
for (var n in Menus){
i++;
this.Menu_array[Menus[n].name] = new Menu(Menus[n].name);
}
}
Enclosed.prototype.show= function(){
var name=arguments[0];
var odj = new this.Menu_array[name];
var menu_obj = new this.Menus[name];
if (menu_obj.sub_menus!==undefined) {
}
obj.element.style.display="block";
}
Enclosed.prototype.hide = function(){
var name=arguments[0];
/*var obj, meni_obj = new Object();
odj = this.Menu_array[name];
menu_obj = this.Menus[name];*/
/*if (this.Menus[name].sub_menus) {
for(var n in this.Menus[name].sub_menus){
this.Menu_array[this.Menus[name].sub_menus[n]].element.style.display="none";
}
}*/
//document.write(obj.toString());
document.write(this.Menu_array['insurance'].element.style.display="none");
//this.Menu_array[name].element.style.display="none";
}
function init(loc){
loc=document.location.toString();
loc_a=loc.split("/");
loc_a.pop();
this.where=loc_a[loc_a.length-1];
}
var ini=new Enclosed(Menus);
var ini2 = new Object();
ini2.prototype=ini.Menu_array; |