//nothing menu basiert auf script.aculo.usRayMenu = Class.create();RayMenu.prototype = {	initialize: function(element,structure,showTimeout,hideTimeout) {		this.element = $(element);		this.structure = structure;		this.showTimeout = showTimeout;		this.hideTimeout = hideTimeout;    this.currentlyExecuting = false;    this.showHandle = null;    this.hideHandle = null;    this.showname = "";    this.newname = "";    this.self = this;	},	setSubMenu: function(name) {				var innerDiv = Builder.node('div',{id:'menu_inner'}); 		innerDiv.appendChild(this.createSpacer());		for(var i=0;i<this.structure[name].length;i++) {			innerDiv.appendChild(this.createItem(this.structure[name][i]));			innerDiv.appendChild(this.createSpacer());		}		//set aligment		if( document.all )			innerDiv.style.styleFloat = menuSettings[name].align; //ie		else			innerDiv.style.cssFloat = menuSettings[name].align; //the rest				//if menu_inner exists, delete it		var toDelete;		if(toDelete=$('menu_inner')) Element.remove(toDelete);		this.element.appendChild(innerDiv);	},		createSpacer: function() {		return Builder.node('p',{className:'menu_spacer'});	},		createItem: function(structure) {		return Builder.node('p',{className:'menu_item',onmouseover:'hoverSubMenuOn(this)',onmouseout:'hoverSubMenuOff(this)',onclick:"location.href='"+structure["link"]+"'"},[			Builder.node('nobr',[				Builder.node('a',{href:structure["link"]},structure["name"])			])		]);	},		showMenu: function() {    if (!this.currentlyExecuting) {      try {         this.currentlyExecuting = true;				for(var which in menuStructure)					document.images[which].src = menuSettings[which].imgOut.src;				if(this.showname != "" && this.showname != "undefined" )					document.images[this.showname].src = menuSettings[this.showname].imgOut.src;				this.showname = this.newname;				document.images[this.showname].src = menuSettings[this.showname].imgHover.src;				this.setSubMenu(this.showname);				if(!Element.visible(this.element)) {				  new Effect.Appear(this.element,			    { duration: 0.2, 			      transition: Effect.Transitions.linear, 			      to: 0.6 });				}      } finally {         this.currentlyExecuting = false;      }    } else {    	printfire("currently executing");    }	},		hideMenu: function() {    if (!this.currentlyExecuting) {      try {         this.currentlyExecuting = true;				//all images back to initial state				for(var which in menuStructure)					document.images[which].src = menuSettings[which].imgNorm.src;				this.showname = "";				if(Element.visible(this.element)) {				  new Effect.Fade(this.element,			    { duration: 0.2, 			      transition: Effect.Transitions.linear });				}      } finally {         this.currentlyExecuting = false;      }    }	},  	onNavOver: function(name) {		if(this.hideHandle != null) {			clearTimeout(this.hideHandle);			this.hideHandle = null;		}		this.newname = name;		if(!Element.visible(this.element)) {			this.showMenu();			return;		}		if(this.showHandle != null) {			clearTimeout(this.showHandle);			this.showHandle = null;		}				this.showHandle = setTimeout(this.showMenu.bind(this),this.showTimeout);	},		onNavOut: function() {		if(this.showHandle != null) {			clearTimeout(this.showHandle);			this.showHandle = null;		}		if(this.hideHandle != null) {			clearTimeout(this.hideHandle);			this.hideHandle = null;		}		this.hideHandle = setTimeout(this.hideMenu.bind(this),this.hideTimeout);	},		onSubnavOver: function() {		if(this.hideHandle != null) {			clearTimeout(this.hideHandle);			this.hideHandle = null;		}		if(this.showHandle != null) {			clearTimeout(this.showHandle);			this.showHandle = null;		}	},					onSubnavOut: function() {		if(this.hideHandle != null) {			clearTimeout(this.hideHandle);			this.hideHandle = null;		}		this.hideHandle = setTimeout(this.hideMenu.bind(this),this.hideTimeout);			}};function initMenu() {	//generate menu div	menuDiv = Builder.node('div',{id:'menu',style:'display:none;'});	$('shell').appendChild(menuDiv);	//init menu	mymenu = new RayMenu('menu',menuStructure,300,500);	//preload pictures	for( var subName in menuSettings ) {		menuSettings[subName]["imgNorm"] = new Image();		menuSettings[subName]["imgNorm"].src = document.images[subName].src;		menuSettings[subName]["imgHover"] = new Image();		menuSettings[subName]["imgHover"].src = menuSettings[subName].hover;		menuSettings[subName]["imgOut"] = new Image();		menuSettings[subName]["imgOut"].src = menuSettings[subName].normal;	}	menuLoaded = true;	if( showMeWhenLoaded != "" ) mymenu.onNavOver( showMeWhenLoaded );}menuLoaded = false;showMeWhenLoaded = "";function menuOver(name) {	showMeWhenLoaded = name;	if(menuLoaded) mymenu.onNavOver(name);}function menuOut(name) {	showMeWhenLoaded = "";	if(menuLoaded) mymenu.onNavOut();}	function hoverSubMenuOn(obj) {	if(!menuLoaded) return;	mymenu.onSubnavOver();	obj.style.borderBottom = "5px solid #FFCE51";	obj.firstChild.style.color = "#E50000";	obj.style.cursor = "pointer";}function hoverSubMenuOff(obj) {	if(!menuLoaded) return;	mymenu.onSubnavOut();	obj.style.borderBottom = "none";	obj.firstChild.style.color = "#620000";	obj.style.cursor = "auto";}//Structure of menumenuStructure = new Object();menuStructure["perfiles"] = new Array();menuStructure["perfiles"][0] = new Object();menuStructure["perfiles"][0]["name"] = "Sun Lu Tang";menuStructure["perfiles"][0]["link"] = "sunlutang.html";menuStructure["perfiles"][1] = new Object();menuStructure["perfiles"][1]["name"] = "Sun Cunzhou";menuStructure["perfiles"][1]["link"] = "suncunzhou.html";menuStructure["perfiles"][2] = new Object();menuStructure["perfiles"][2]["name"] = "Sun Jian Yun";menuStructure["perfiles"][2]["link"] = "sunjianyun.html";menuStructure["perfiles"][3] = new Object();menuStructure["perfiles"][3]["name"] = "Lei Shi Mo";menuStructure["perfiles"][3]["link"] = "leishimo.html";menuStructure["perfiles"][4] = new Object();menuStructure["perfiles"][4]["name"] = "Lei Shitai";menuStructure["perfiles"][4]["link"] = "leishitai.html";menuStructure["instructores"] = new Array();menuStructure["instructores"][0] = new Object();menuStructure["instructores"][0]["name"] = "Bob Melia";menuStructure["instructores"][0]["link"] = "bobmelia.html";menuStructure["instructores"][1] = new Object();menuStructure["instructores"][1]["name"] = "Joan Hernandez Serret";menuStructure["instructores"][1]["link"] = "joan_hernandez_serret.html";menuStructure["instructores"][2] = new Object();menuStructure["instructores"][2]["name"] = "Lineage";menuStructure["instructores"][2]["link"] = "lineage.html";menuStructure["estilosun"] = new Array();menuStructure["estilosun"][0] = new Object();menuStructure["estilosun"][0]["name"] = "Taiji";menuStructure["estilosun"][0]["link"] = "taiji.html";menuStructure["estilosun"][1] = new Object();menuStructure["estilosun"][1]["name"] = "Xing Yi";menuStructure["estilosun"][1]["link"] = "xingyi.html";menuStructure["estilosun"][2] = new Object();menuStructure["estilosun"][2]["name"] = "Bagua";menuStructure["estilosun"][2]["link"] = "bagua.html";menuStructure["estilosun"][3] = new Object();menuStructure["estilosun"][3]["name"] = "Tui Shou";menuStructure["estilosun"][3]["link"] = "tuishou.html";menuStructure["clubs"] = new Array();menuStructure["clubs"][0] = new Object();menuStructure["clubs"][0]["name"] = "Barcelona";menuStructure["clubs"][0]["link"] = "spain.html";menuSettings = new Object();menuSettings["perfiles"] = new Object();menuSettings["perfiles"]["align"] = "left";menuSettings["perfiles"]["normal"] = "images/bot_perfiles_1.gif";menuSettings["perfiles"]["hover"] = "images/bot_perfiles_2.gif";menuSettings["instructores"] = new Object();menuSettings["instructores"]["align"] = "left";menuSettings["instructores"]["normal"] = "images/bot_instructores_1.gif";menuSettings["instructores"]["hover"] = "images/bot_instructores_2.gif";menuSettings["estilosun"] = new Object();menuSettings["estilosun"]["align"] = "left";menuSettings["estilosun"]["normal"] = "images/bot_estilo_sun_1.gif";menuSettings["estilosun"]["hover"] = "images/bot_estilo_sun_2.gif";menuSettings["clubs"] = new Object();menuSettings["clubs"]["align"] = "right";menuSettings["clubs"]["normal"] = "images/bot_clubs_1.gif";menuSettings["clubs"]["hover"] = "images/bot_clubs_2.gif";Event.observe(window,'load',initMenu,0);