	var items = 0;

	var counter = 0;

	var loaded = false;

	var timer1 = false;

	var p_top = 1;

	var p_left = 3;

	var table = "";

	

	function sayNo(){

		return true;

	}

	window.onerror=sayNo;	



	function browserCheck() {

		var agt = navigator.userAgent.toLowerCase();

		this.major=parseInt(navigator.appVersion);

		this.minor=parseFloat(navigator.appVersion);

		this.nav=((agt.indexOf('mozilla')!=-1)&&((agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1)));

		this.dom=(document.all?3:(document.getElementById?1:(document.layers?2:0)));	

		this.mac = (agt.indexOf('mac') != -1) ? 1 : 0;

		this.ie = (document.all||(document.all&&document.getElementById));

	}

	

	var is = new browserCheck();

	

	var menu = new Array();	

	menu[0] = new Array();

	//Absolute Links sind notwedig da sonst Links nicht funktionieren

	// wenn man sich in einer tieferen Ebene befindet - menü ist für alle Seiten gleich

	//menu[0][0] = new Array("news.htm","News");	

	menu[0][0] = new Array("http://www.shoplab.info/project_overview.htm","Short Overview");

	menu[0][1] = new Array("http://www.shoplab.info/shoplab_members.htm","Project Members");

	menu[0][2] = new Array("http://www.shoplab.info/flyer/flyer.htm","Flyer");

	menu[0][3] = new Array("http://www.shoplab.info/pictures.htm","Gallery");

	menu[0][4] = new Array("http://www.shoplab.info/modelshops.htm","Model Shops");

	menu[0][5] = new Array("http://www.shoplab.info/contact.htm","Contact");



	menu[1] = new Array();

	menu[1][0] = new Array("http://www.shoplab.info/tech_mpeg.htm","MPEG 4");

	menu[1][1] = new Array("http://www.shoplab.info/tech_xml.htm","XML");
	menu[1][2] = new Array("http://www.shoplab.info/tech_ejb.htm","EJB");

	

	menu[2] = new Array();
	
	menu[2][0] = new Array("http://www.shoplab.info/publications.htm","Papers");

	menu[2][1] = new Array("http://www.shoplab.info/press_clipping.htm","Press Clipping");

	menu[2][2] = new Array("http://www.shoplab.info/press_releases.htm","Press Releases");

	menu[2][3] = new Array("http://www.shoplab.info/events.htm","Events");

	menu[2][4] = new Array("http://www.shoplab.info/media_kit/media_kit.htm","Media Kit");

	menu[2][5] = new Array("http://www.shoplab.info/logos.htm","Logos");

	menu[2][6] = new Array("http://www.shoplab.info/contact.htm","Contact");

	

	//Misc

	menu[3] = new Array();

	menu[3][0] = new Array("http://www.shoplab.info/links.htm","Links");

	menu[3][1] = new Array("http://www.shoplab.info/glossary.htm","Glossary");

	menu[3][2] = new Array("http://www.eu-train.net/cgi-bin/shoplab/chat/chat.cgi","Chatroom");

	

	var m_pos = new Array();

	// Positionen der einzelnen Klappmenues	

	m_pos[0] = new Array(0,42);

	m_pos[1] = new Array(108,42);

	m_pos[2] = new Array(230,42);

	m_pos[3] = new Array(343,42);

	

	

	function activateMenu(id) {

		var obj = "";

		if (!loaded) return;		

		obj  = (is.dom==2) ? eval("document.container" + id) : ((is.dom==1) ? eval("document.getElementById('container"+id+"')"): eval("document.all.container" + id));		

		clearTimeout(timer1);

		hideMenu();

		if (is.dom!=2)

			obj.style.visibility = "visible";

		else if (is.dom==2)

			obj.visibility = "show";

	}

	

	function inactivateMenu() {

		if (!loaded) return;

		timer1 = setTimeout("hideMenu()",30);		 

	}

	

	function init() {

		var height = 19;

		var width = 125;

		var xpos = 0;		

		var ypos = 0;

		var m_len = menu.length;

		var rows = 0;

		var id = "";

		for (var i=0; i<m_len; i++) {

			var cheight = 0;			

			rows = 0;

			id = "container" + i;

			if (is.dom!=2) {

				if (is.dom==3&&is.dom!=1) {

					var HTML = "<div id=" + id + " class='vis'></div>";

					window.document.body.insertAdjacentHTML("BeforeEnd", HTML);

				}

				else if (is.dom==1) {

					var el = document.createElement("div");

					el.id = id;

					el.className = "vis";

					document.body.appendChild(el);

				}

			}			

			for (var k=0; k<menu[i].length; k++) {

				rows++;

			}			

			xpos = m_pos[i][0];

			ypos = m_pos[i][1];

			cheight = parseInt(rows * height);

		

			id.createMenu = createMenu(id, null,null, null, xpos, ypos, cheight+1, width, "", "#FFFFFF", "hidden", 1);						

			ypos = 0;			

			for (var j=0; j<menu[i].length; j++) {				

				item_id = "item" + items++;

				menu_url = menu[i][j][0];

				menu_link = menu[i][j][1];

				if (is.dom!=2) {

					if (is.dom==3&&is.dom!=1) {

						var HTML = "<div id=" + item_id + " class='linkout'>" + menu_link + "</div>";

						document.all[id].insertAdjacentHTML("BeforeEnd", HTML);

					}					

					else if (is.dom==1) {

						var el = document.createElement("div");

						el.id = item_id;

						el.className = "linkout";

						el.innerHTML = menu[i][j][1];

						document.getElementById(id).appendChild(el);							

					}

				item_id.createMenu = createMenu(item_id, j, id, menu_url, 0, ypos, height+1, width, null, "#FFFFFF", "inherit", 0);														

				}

				if(is.dom==2){

					item_id.createMenu = createMenu(item_id, j, id, menu_url, xpos, ypos+1, height-1, width-2, menu_link, "#03015F", "inherit", 0);

				}				

			ypos += height;

			}									

		}

		loaded = true;				

	}

	function createMenu(id, arraycounter, nestref, url, left, top, height, width, content, bgColor, visibility, zIndex) {

	if(is.dom==2){

		if(nestref){

			var elm = eval("document."+nestref+".document."+id+" = new Layer(width, document."+nestref+")");

		}

		else{

			var elm = document.layers[id] = new Layer(width);

			eval("document."+id+" = elm");

		}

		elm.name = id;

		

		if(!nestref) elm.left = left;

		if( nestref) elm.left = 1;



		elm.top = top;



		elm.clip.top = 0;

		elm.clip.right = width;

		elm.clip.bottom = height;

		elm.clip.left = 0;



		elm.bgColor = bgColor;

		if (visibility.indexOf("hidden")!=-1) visibility = "hide";

		elm.visibility = visibility;



		if(nestref){

			if(id.indexOf("item")!=-1){

			elm.parent = document.layers[nestref];

			celm = new Layer(width,elm);

			celm.top = p_top;

			celm.left = p_left;

			celm.clip.top = elm.clip.top;

			celm.clip.right = elm.clip.right;

			celm.clip.bottom = elm.clip.bottom;

			celm.clip.left = elm.clip.left;			

			celm.visibility = "inherit";

			celm.display = menu_link;



			table = "<table cellpadding='0' cellspacing='0' border='0'><tr><td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#FFFFFF'>" + content + "</font></td></tr></table>";



			celm.document.open();

			celm.document.write (table);

			celm.document.close();



			dummy = new Layer(width,elm);

			dummy.clip.top = elm.clip.top;

			dummy.clip.right = elm.clip.right;

			dummy.clip.bottom = elm.clip.bottom;

			dummy.clip.left = elm.clip.left;

			dummy.visibility = "show";

			dummy.item = celm;

			dummy.bgelm = elm;

			dummy.url = url;

			dummy.captureEvents(Event.MOUSEUP | Event.MOUSEDOWN | Event.MOUSEOVER |Event.MOUSEOUT);

			dummy.onmouseover = menuOver;

			dummy.onmouseout = menuOut;

			dummy.onmouseup = getLink;

			}

			}

	}		

		if (is.dom!=2) {

			if (is.dom==1) 

					elm = this.document.getElementById(id);

				else if (is.dom==3)

					elm = this.document.all[id];

				elm.style.left = left;			

				elm.style.top = top;

				elm.style.width = width;

				elm.style.height = height;

				elm.style.visibility = visibility;			

				elm.url = url;	

				if (id.indexOf("item")!=-1) {			

					elm.onmouseover = menuOver;

					elm.onmouseout = menuOut;

					elm.onmouseup = getLink;

				}

			}

		}

	

	function hideMenu() {

		for (i=0; i<menu.length; i++) {

			id = (is.dom==2) ? eval("document.container" + i) : ((is.dom==1) ? eval("document.getElementById('container"+i+"')"): eval("document.all.container" + i));

			if (is.dom==2)

				id.visibility = "hide";

			if (is.dom==1||is.dom==3)	

				id.style.visibility = "hidden";

		}

	}		

	

	function menuOver() {

		clearTimeout(timer1);

		window.status = this.url;

		if (is.dom==2)

			changeLayer(this.bgelm,this.item,this.item.display,"#03015F");

		if (is.dom!=2)

			this.className = "linkover";

	}

	

	function menuOut() {

		timer1 = setTimeout("hideMenu()", 30);

		if (is.dom==2)

			changeLayer(this.bgelm,this.item,this.item.display,"#03015F");

		else if (is.dom!=2)		

			this.className = "linkout";	

	}

	

	function getLink() {

		window.location.href = this.url;	

	}

	

	function changeLayer(id1,id2,content,bgcolor){

		id1.document.bgColor = bgcolor;

		elm = id2.document;	

		table = "<table cellpadding='0' cellspacing='0' border='0'><tr><td><font face='Verdana, Arial, Helvetica, sans-serif' size='2' color='#FFFFFF'>" + content + "</font></td></tr></table>";

		elm.open ();

		elm.write (table);

		elm.close ();

	}





