var Knoten;

function createMenu(lang,src,site) {
	if (!document.getElementById("blenderLayer")) {
		var newKnoten = document.createElement("div");
		this.Knoten = newKnoten;
		var Parent = document.getElementById("navi");

		newKnoten.setAttribute("id","blenderLayer");
		newKnoten.style.position = "absolute";
		if (lang == "de"){	newKnoten.style.left = "159";}
		if (lang == "uk"){	newKnoten.style.left = "191";}
		newKnoten.style.top = "25";
		newKnoten.style.width = "140";
		newKnoten.style.backgroundColor = "#f2f7fa";
		newKnoten.style.borderStyle = "solid";
		newKnoten.style.borderWidth = "1";
		newKnoten.style.borderColor = "#6fbcf3";
		newKnoten.style.fontFamily = "Verdana";
		newKnoten.style.fontSize = "12px";
		newKnoten.style.fontWeight = "bold";
		newKnoten.style.padding = "5";
		newKnoten.style.color = "#000000";
		newKnoten.style.zIndex = "99";
		newKnoten.innerHTML = getData(lang,src,site);
		Parent.appendChild(this.Knoten);
	}
}

function getData(lang,src,site) {
	var arr = new Array(9);
	for (i=0; i < 9; i++) arr[i] = new Array(3);
	var text = "<table cellpadding='0' cellspacing='0' border='0' width='135'>";
	var status = "";



	if (site == "displex")				status = 0;
	if (site == "touchscreen")		status = 1;
	if (site == "protector")			status = 2;
	if (site == "repair")					status = 3;
	if (site == "polywatch")			status = 4;
	if (site == "xerapol")				status = 5;
	if (site == "kratzer")				status = 6;
	if (site == "wipercare")			status = 7;
	/*
	if (site == "polish")					status = 8;
	if (site == "wax")						status = 9;
	*/
	if (site == "silvex")					status = 8;
	
	arr[0][0] = "DISPLEX";												arr[0][1] = "produkteDisplex.htm";							arr[0][2] = "notActive";
	arr[1][0] = "DISPLEX Touch Screen";						arr[1][1] = "produkteDisplexTouchscreen.htm";		arr[1][2] = "notActive";
	arr[2][0] = "DISPLEX PROTECTOR";							arr[2][1] = "produkteDisplexProtector.htm";			arr[2][2] = "notActive";
	arr[3][0] = "DISC REPAIR";										arr[3][1] = "produkteDiscRepair.htm";						arr[3][2] = "notActive";
	arr[4][0] = "polyWatch";											arr[4][1] = "produktePolywatch.htm";						arr[4][2] = "notActive";
	arr[5][0] = "XERAPOL";												arr[5][1] = "produkteXerapol.htm";							arr[5][2] = "notActive";
	arr[6][0] = "QUIXX<br>Kratzer-Entferner";			arr[6][1] = "produkteQuixxKratzer.htm";					arr[6][2] = "notActive";
	arr[7][0] = "QUIXX<br>Wischerpflege";					arr[7][1] = "produkteQuixxWipercare.htm";				arr[7][2] = "notActive";
	/*
	arr[8][0] = "QUIXX POLISH";										arr[8][1] = "produkteQuixxPolish.htm";					arr[8][2] = "notActive";
	arr[9][0] = "QUIXX WAX";											arr[9][1] = "produkteQuixxWax.htm";							arr[9][2] = "notActive";
	*/
	arr[8][0] = "SILVEX";												arr[8][1] = "produkteSilvex.htm";							arr[8][2] = "notActive";

	if (lang == "uk") {
		arr[6][0] = "QUIXX<br>Scratch Remover";
		arr[7][0] = "QUIXX<br>Wiper Blade Care";
	}



	if (site != "") arr[status][2] = "active";
	for (i=0; i < arr.length; i++) {
		text = text + "<tr><td align='left'><a href='"+src+lang+"/"+arr[i][1]+"' id='"+arr[i][2]+"'>"+arr[i][0]+"</a></td></tr>";
		if ((i+1) < arr.length) {
			text = text + "<tr><td height='8'><img src='"+src+"common/img/sp.gif' width='100%' height='1' style='background-color:#6FBCF3' style='margin:0px;'></td></tr>";
		}
	}
	text = text + "</table>";
	return text;
}

function clearMenu() {
	if (document.getElementById("blenderLayer")){
		var Parent = document.getElementById("navi");
		Parent.removeChild(this.Knoten);
	}
}
