// -----------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------
//
// Copyright: Grafix-House
//
// -----------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------

function MMenuChange(MMLinkLow,colour,mcol){
var dieURL  = window.location.href; // hier sind wir
var URL1	= "http://" +window.location.host+ "/gfxCMS/index.php?cid="; // die AusgangsURL
var Teil	= dieURL.substring(URL1.length,URL1.length+2);
var dlink = "";
/*
if(Teil == "" || Teil == "ho"){
dlink = "sitemap.php?cid=" +MMLinkLow+ "&colour=" +colour+ "&mcol=" +mcol;
document.getElementById("menulinks").src = dlink;
}else{
*/
dlink = "index.php?cid=" +MMLinkLow;
top.location.href = dlink;
/* } */
}

function MMenu(){
// MMenu keine Unterstriche verwenden (automatischer Layerbenennung)
var MMenu        = "Unternehmen,Leistungen,Produkte,Referenzen,Kundenlogin,Kontakt,Home";
var tcolour      = "blue,olive,orange,red,blue,grey,blue";
var thecolour	 = tcolour.split(",");
var logostyle    = "position:absolute; left:397px; top:-98px; width:285px; height:173px; z-index:1;"; // visibility: visible\"";
var killerstyle  = "position:absolute; left:0px; top:-98px; z-index:1;";
var smenustyle   = "position:absolute; left:0px; top:0px; width:470px; height=45px; z-index:2;"; //height=32px;
// SMenu kann ein Unterstrich je Element verwendet werden
var SMenu = new Array();
	SMenu[0] = "Philosophie,Freelancerlogin,Netzwerk";
	SMenu[1] = "Beratung,Konzeption,Medien_Design,Webservices,Entwicklung,Schulung";
	SMenu[2] = "Hosting,Geschaeftsausstattung,Individuelle_Dienste,Pakete,Bestellformular";
	SMenu[3] = "Online,Offline,DTP";
	SMenu[4] = " "; //Profil,Bestell_History,Projektstand,Support_Chat";
	SMenu[5] = " "; //Feedback,Support,Newsletter,Presse";
	SMenu[6] = "Impressum,Disclaimer,Datenschutz,AGBs,Sitemap";

//Deutsch,English,Francais,Tuerkce,Espanol,
var MPositionTop   = "82"; // 58px Main Menu Top Pos, Killer1 Height
var MPositionLeft  = "150"; // 150px Main Menu Left Pos, Killer2 Width
var MMenuStart     = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"1\"><tr>";
var MMenuTrenner   = "</td>";
var MMenuEnde      = "</td></tr></table></div>";
var MMzIndex       = "5";
var SMzIndex       = "4";

/*
var mmon = "";
var SMenuStart      = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" onMouseOver=\"M"+mmon+".className='Moff'\" onMouseOut=\"M"+mmon+".className=''Mon'\"><tr><td>";
*/

var SMenuTrenner    = "</td><td>&#8250;&#8250;</td><td>";
var SMenuEnde       = "</td></tr></table></div>";
document.write ("<div id=\"navi\" style=\"position:absolute; left:" +MPositionLeft+ "px; top:" +MPositionTop+ "px; z-index:" +MMzIndex+ "; visibility: visible;\">");

var dieURL  = window.location.href; // hier sind wir
var URL1	= "http://" +window.location.host+ "/gfxCMS/index.php?cid="; // die AusgangsURL Online
//var URL1	= "http://" +window.location.host+ "/grafix-house-com/html/gfxCMS/index.php?cid="; // die AusgangsURL LLocal
var Teil	= dieURL.substring(URL1.length,dieURL.length);
var undFind     = Teil.indexOf('&');

if (undFind != -1){
Teil = Teil.substring(0, undFind);
}

var Teile	= Teil.split("/");
var dasTeil	= Teil.replace(/\//," | ");
var dasTeil0	= dasTeil.replace(/\//," | ");
var dasTeil01	= dasTeil0.replace(/#/," >> ");
var dasTeil1	= dasTeil01.replace(/_/," ");
var dasTeil2	= dasTeil1.replace(/_/," ");

var MMenuAN	= Teile[0];
if (dieURL.indexOf('cid=') == -1){
MMenuAN  = "home";
dasTeil2 = "";
}
var SMenuAN	= Teile[1];
if (MMenuAN == ""){ MMenuAN = "home"; }
var MMenuTeile	= MMenu.split(",");
var hideMMLink	= "";
hideMMLink	+= "'unternehmen','','hide',";
hideMMLink	+= "'leistungen','','hide',";
hideMMLink	+= "'produkte','','hide',";
hideMMLink	+= "'referenzen','','hide',";
hideMMLink	+= "'kundenlogin','','hide',";	
hideMMLink	+= "'kontakt','','hide',";
hideMMLink	+= "'home','','hide',";

var MMon   	= "";
for (var mi=0; mi<MMenuTeile.length; mi++){
var MMLinkLow	= MMenuTeile[mi].toLowerCase();
	if (MMLinkLow == MMenuAN){
	MMon		= mi;
	}
}

for (var mm=0; mm<MMenuTeile.length; mm++){
	if (mm <= 0){
	document.write("<div id=\"mmenu\" class=\"mmenu\" style=\"position:absolute; left:0px; top:0px; z-index:" +MMzIndex+ "; visibility: visible;\">" +MMenuStart);
	}
var MMLinkLow	= MMenuTeile[mm].toLowerCase();
var MMClass		= "";
	if (MMenuAN != MMLinkLow){
	MMClass		= "Moff";
	} else {	
	MMClass		= "Mon";
	}
var MMTeiler	= "";
	if (mm < MMenuTeile.length-1){
	MMTeiler	= MMenuTrenner;
	} else {
	MMTeiler	= MMenuEnde;
	}
var colour = "";
var mcol   = "";
if (MMLinkLow == "" || MMLinkLow == "home" || MMLinkLow == "unternehmen" || MMLinkLow == "kundenlogin"){
colour = "blue";
mcol   = "6989AF";
}
if (MMLinkLow == "leistungen"){
colour = "olive";
mcol   = "5C878B";
}
if (MMLinkLow == "produkte"){
colour = "orange";
mcol   = "FCB938";
}
if (MMLinkLow == "referenzen"){
colour = "red";
mcol   = "BF807F";
}
if (MMLinkLow == "kontakt"){
colour = "grey";
mcol   = "817E7F";
}
document.write("<td nowrap=\"nowrap\"><a href=\"javascript:MMenuChange('" +MMLinkLow+ "','" +colour+ "','" +mcol+ "');\" onMouseOver=\"MM_showHideLayers(" +hideMMLink+ "'" +MMLinkLow+ "','','show','killer','','show')\" class=\"" +MMClass+ "\" id=\"M" +mm+ "\"><img src=\"gfx/clear.gif\" width=\"4\" height=\"16\" border=\"0\" align=\"absmiddle\">"+MMenuTeile[mm]+ "<img src=\"gfx/clear.gif\" width=\"4\" height=\"16\" border=\"0\" align=\"absmiddle\"></a>" +MMTeiler);
//document.write("<td><a href=\"index.php?cid=" +MMLinkLow+ "\" onMouseOver=\"MM_showHideLayers(" +hideMMLink+ "'" +MMLinkLow+ "','','show','killer','','show')\" class=\"" +MMClass+ "\" id=\"M" +mm+ "\">&nbsp;"+MMenuTeile[mm]+ "&nbsp;</a>" +MMTeiler);
}

for (var mm2=0; mm2<MMenuTeile.length; mm2++){
	var SMenuTeile	= SMenu[mm2].split(",");
	var MMLinkLow2	= MMenuTeile[mm2].toLowerCase();
	for (var sm=0; sm<SMenuTeile.length; sm++){
	var SMLinkLow	= SMenuTeile[sm].toLowerCase();

if (SMLinkLow != ""){
		if (sm <= 0){
var visibilID = "";
// welche KategorieID soll gehighlightet werden und in welcher Kategorie befinden wir uns
	if (MMenuAN != MMLinkLow2){
	visibilID	= "hidden";
	MMClass		= "Moff";
	} else {
	visibilID	= "visible";
	MMClass		= "Mon";
	}
	document.write("<div id=\"" +MMLinkLow2+ "\" onMouseOver=\"M"+mm2+".className='Mon'\" onMouseOut=\"M" +mm2+ ".className='" +MMClass+ "'\" class=\"submenu\" style=\"z-index:" +SMzIndex+ "; visibility: " +visibilID+ ";\">");
	document.write("<div onMouseOver=\"M" +MMon+ ".className='Moff'\" onMouseOut=\"M" +MMon+ ".className='Mon'\" style=\"" +killerstyle+ "\"><img src=\"gfx/clear.gif\" width=\"397\" height=\"" +MPositionTop+ "\" border=\"0\"></div>");
	// SRART:30082003

var os = navigator.platform;
if (os == "Win32") {
	document.write("<div id=\"logo" +thecolour[mm2]+ "\" onMouseOver=\"M" +MMon+ ".className='Moff'\" onMouseOut=\"M" +MMon+ ".className='Mon'\" style=\"" +logostyle+ "\">"+
					"<map name=\"LogoMap" +mm2+ "\"><area shape=\"poly\" coords=\"3,139,70,122,70,55,110,8,164,15,212,46,212,109,281,115\" href=\"index.php?cid=" +MMLinkLow2+ "\" class=\"noborder\" onMouseOver=\"writetxt('<b>Wechsel in den Bereich " +MMenuTeile[mm2]+"</b>');\" onMouseOut=\"writetxt(0)\"></map>"+
					"<img src=\"./gfx/grafix-house_logo_" +thecolour[mm2]+ ".gif\" border=\"0\" width=\"285\" height=\"173\" usemap=\"#LogoMap" +mm2+ "\"></div>");
}else{
	document.write('&nbsp;');
}

	// END:30082003
	// lowhigh des aktiven Menupunktes funktioniert nur im IE (MMon)
	document.write("<div onMouseOver=\"M" +MMon+ ".className='Moff'\" onMouseOut=\"M" +MMon+ ".className='Mon'\" style=\"" +smenustyle+ "\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>");
	}
var SMClass	= "";
	if (SMenuAN != SMLinkLow){
	SMClass		= "Soff";
	} else {
	SMClass		= "Son";
	}
var SMTeiler	= "";
	if (sm < SMenuTeile.length-1){
	SMTeiler	= SMenuTrenner;
	} else {
	SMTeiler	= SMenuEnde+"</div>";
	}
SMenuTeile[sm] = SMenuTeile[sm].replace(/_/,"&nbsp;");
SMenuTeile[sm] = SMenuTeile[sm].replace(/_/,"&nbsp;");
document.write("<a href=\"index.php?cid=" +MMLinkLow2+ "/" +SMLinkLow+ "\" class=\"" +SMClass+ "\" onMouseOver=\"sI('m" +mm2+sm+ "','','gfx/mactiv.gif',0)\" onMouseOut=\"sIR()\">&nbsp;" +SMenuTeile[sm]+ "&nbsp;</a>" +SMTeiler);
	} else { document.write("<div id=\"" +MMLinkLow2+ "\"  class=\"submenu\" style=\"z-index:5;\">&nbsp;</div>"); }
	}
}
document.write ("</div>");

// Legende
document.write("<div id=\"legende\" class=\"legende\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"15\">&nbsp;</td><td bgcolor=\"#FFFFFF\" class=\"outline\">&nbsp;<a href=\"index.php?cid=home\" class=\"noborder\"><b>home</b></a> >");
if (dasTeil2 != "home"){
document.write("&nbsp;" +dasTeil2);
}
document.write("&nbsp;</td></tr></table></div>");
/* } */
if (dasTeil2 == ""){
dasTeil2 = "Home";
}

// aktuellen Titel setzen
window.setTimeout("window.document.title = 'grafix-house --> " +dasTeil2.toUpperCase()+ "'", 9000);
// aktuellen Status setzen
window.setTimeout("window.defaultStatus = 'grafix-house --> " +dasTeil2.toUpperCase()+ "'", 10000);

// KillerMenu
document.write("<div id=\"killer\" style=\"position:absolute; left:0px; top:0px; z-index:2; visibility: hidden;\">"
		+"<a href=\"javascript:\" onMouseOver=\"MM_showHideLayers(" +hideMMLink+ "'" +MMenuAN+ "','','show',"
		+"'killer','','hide'"
		+")\" class=\"Soff\"><img src=\"gfx/clear.gif\" width=\"760\" height=\"5\" border=\"0\"><br><img src=\"gfx/clear.gif\" width=\"150\" height=\"94\" border=\"0\"><br>"
//		+")\" class=\"Soff\"><img src=\"gfx/clear.gif\" width=\"150\" height=\"" +MPositionTop+ "\" border=\"0\"><br>"
		+"<img src=\"gfx/clear.gif\" width=\"" +MPositionLeft+ "\" height=\"45\" border=\"0\"><br>"
		+"<img src=\"gfx/clear.gif\" width=\"760\" height=\"320\" border=\"0\"></a>"
		+"</div>");
}
