var fontsize1 = 12;
var fontsize2= 12;

var main_height=18;
var main_width=115;
var main_left = 18;
var main_top = 59;
$main = new Array("Allgemein","Winter", "Sommer");
$main_link = new Array("sub_allgemein","sub_winter", "sub_sommer");

var sub_height=20;
var sub_width=95;
var sub_left = 27;
var sub_top = 45;
$sub_allgemein = new Array("");
$sub_allgemein_link = new Array("");
$sub_winter = new Array("Skiverleih","Alpinski","Langlauf","Skischuhe","Skitour","Bekleidung","Service");
$sub_winter_link = new Array("skiverleih.php", "alpinski.php", "langlauf.php", "skischuhe.php", "skitour.php", "wintermode.php", "winterservice.php");
$sub_sommer = new Array("Rad und Bike","Bergsport","Fischerei","Tennis","Sommermode","Schuhe");
$sub_sommer_link = new Array("rad_und_bike.php","bergsport.php","fischerei.php","tennis.php","sommermode.php","schuhe.php");



// Funktion zur Referenzierung von Div-Layern mit Zugriff auf CSS-Eigenschaften
function div_ref_style ($id) {
   if      (document.layers)         return document.layers[$id];
   else if (document.all)            return document.all[$id].style;
   else if (document.getElementById) return document.getElementById($id).style;
   else                              return null;
}

function show_submenu($id){
	
	for (var i=0; i<$main_link.length; i++){
		var $divname = eval("$"+$main_link[i]);
		for (var j=0; j<$divname.length; j++){
		  div_ref_style($main_link[i] + j).visibility = 'hidden';
		}
		div_ref_style("submenu_container"+i).visibility = 'hidden';
		
	}
	
	$tmp = eval("$"+$main_link[$id]);
	var $anzahl = $tmp.length;
	for (var i=0; i<$anzahl; i++){
	  div_ref_style($main_link[$id] + i).visibility = 'visible';
	}
		div_ref_style("submenu_container"+$id).visibility = 'visible';

}


function main_winter_active(){
	document.getElementById('MAIN_Winter').style.visibility='visible'; 
}
function main_winter_inactive(){
	document.getElementById('MAIN_Winter').style.visibility='hidden';
}

function main_button_exit(){
	if ($actmain == 1){
		document.getElementById('MAIN_Winter').style.visibility='visible';
		document.getElementById('MAIN_Sommer').style.visibility='hidden';
	}
	else if ($actmain == 2){
		document.getElementById('MAIN_Winter').style.visibility='hidden';
		document.getElementById('MAIN_Sommer').style.visibility='visible';
	}
	else{
		document.getElementById('MAIN_Winter').style.visibility='hidden';
		document.getElementById('MAIN_Sommer').style.visibility='hidden';
	}
}
function main_sommer_active(){
	document.getElementById('MAIN_Sommer').style.visibility='visible'; 
}
function main_sommer_inactive(){
	document.getElementById('MAIN_Sommer').style.visibility='hidden';
}


//Main NAVI Geschichte

document.writeln ('<div id="MAIN_Winter" style="margin:0px; border:0px; padding:0px; visibility:hidden; height:243px; width:198px; top:41px; left:16px; position:absolute; z-index:100;">');
document.writeln ('<IMG SRC="./images/main_menu_winter_aktiv.gif" ALT="Winter Seiten" BORDER="0">');
document.writeln ('</div>');
document.writeln ('<div id="MAIN_Sommer" style="margin:0px; border:0px; padding:0px; visibility:hidden; height:253px; width:215px; top:8px; left:217px; position:absolute; z-index:100;">');
document.writeln ('<IMG SRC="./images/main_menu_sommer_aktiv.gif" ALT="Winter Seiten" BORDER="0">');
document.writeln ('</div>');



document.writeln ('<div id="MAINNAVI" style="margin:0px; border:0px; padding:0px; visibility:visible; height:326px; width:440px; top:0px; left:0px; position:absolute; z-index:200;">');

document.writeln ('<IMG SRC="./spacer.gif" ALT="Clickable Image" USEMAP="#main_navi" width="440" height="326" BORDER="0">');

document.writeln ('<MAP NAME="main_navi">');
document.writeln ('<AREA SHAPE=POLYGON COORDS="329,293 440,93 428,84 428,73 256,11 253,19 240,17 205,198" HREF="./'+$sub_sommer_link[0]+'" ALT="Sommer" onMouseOver="main_sommer_active(); main_winter_inactive();" onMouseOut="main_button_exit();"></AREA>');
document.writeln ('<AREA SHAPE=POLYGON COORDS="79,326 227,252 218,208 203,193 211,131 199,53 188,49 185,43 17,46 15,56 3,59" HREF="./'+$sub_winter_link[0]+'" ALT="Winter" onMouseOver="main_winter_active(); main_sommer_inactive();" onMouseOut="main_button_exit();"></AREA>');
document.writeln ('</MAP>');

document.writeln ('</div>');


if ($actmain == 1){
	$navi_bg="./images/hg_menue_winter.jpg";
	main_winter_active();
}
else if ($actmain == 2){
	$navi_bg="./images/hg_menue_sommer.jpg";
	main_sommer_active();
}


if ($actmain > 0){

document.writeln ('<div id="NAVI" style="background-image: url(' + $navi_bg + '); margin:0px; border:0px; padding:0px; visibility:visible; height:290px; width:123px; top:338px; left:150px; position:absolute; z-index:200;">');

// Mainmenu

for (var $k=0; $k<$main_link.length; $k++){

	var $actvar=eval("$"+$main_link[$k]);

var sub_top_real = sub_top;
	var $sichtbar = "hidden";

	if ( typeof ($actmain) != "undefined"){
		if ($k==$actmain){
			$sichtbar = "visible";
		}
	}

document.writeln ('<div id="submenu_container'+$k+'" style="text-align: left; text-align:left; overflow: hidden; margin:0px; border:0px; padding:0px; visibility:'+$sichtbar+'; width:'+sub_width+'px; top:' + sub_top + 'px; left:' + sub_left + 'px; position:absolute; z-index:200;" >');


for (var $i=0; $i<$actvar.length; $i++){
	var $link=eval("$"+$main_link[$k]+"_link");
	
	var $sichtbar = "hidden";
	var $bgcolor="";
	if ($actmain == 1){
		var $color="#FFFFFF";
	}
	else{
		var $color="#FFFFFF";
	}
	var $bordercolor="";
	if ( typeof ($actmain) != "undefined"){
		if ($k==$actmain){
			$sichtbar = "visible";
		}
	}
	if ( typeof ($actsub) != "undefined"){
		if ($i==$actsub && $k==$actmain){
			$bgcolor="#ffffff";
			$color="#000000";
			$bordercolor="#FFFFFF";
			$subborder_width="0px 0px 0px 0px";
		}
		else{
			$subborder_width="0px 0px 0px 0px";
			
		}
	}

	var $linktext = "#";	
	if ( (typeof ($link[$i]) != "undefined") && $link[$i]!=""  ){
		$linktext = $link[$i];
	}
	document.writeln ('<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="middle">'); 
	
	document.writeln ('<a class="navsubtopic" href="'+$linktext+'"><span class="navsubtopic"><div id="'+$main_link[$k]+$i+'" style="text-align: left; ');
	if ($color != "") document.writeln ('color:'+$color+'; ');
	if ($bordercolor != "") document.writeln ('border-color:'+$bordercolor+'; ');
	if ($subborder_width != "") document.writeln ('border-style:dotted; border-width:' + $subborder_width + '; ');
	if ($bgcolor != "") document.writeln ('background-color:'+$bgcolor+'; ');
	document.writeln ('margin-bottom:0px; padding-left:4px; padding-right:2px; padding-top:0px; padding-bottom:0px; visibility:'+$sichtbar+'; height:' + sub_height + 'px; width:' + sub_width + 'px; z-index:200;" onmouseover="this.style.backgroundColor=\'#FFFFFF\'; this.style.color=\'#000000\'; this.style.cursor=\'pointer\';" onmouseout="this.style.backgroundColor=\''+$bgcolor+'\';this.style.color=\''+$color+'\';" >');
	document.writeln ('<img src="./spacer.gif" height="1" width="10" border="0"><br>');
	document.writeln (''+$actvar[$i]+''); 
	document.writeln ('</div></span></a>'); 

	document.writeln ('</td></tr></table>'); 

	document.writeln ('<img src="./spacer.gif" height="13" width="'+sub_width+'" border="0"><br>');
}
document.writeln ('</div>'); 

}
	
document.writeln ('</div>'); // Ende des NAVI divs


}


document.writeln ('<div id="Copyright">');
if ($actmain == 1) document.writeln ('<img src="./images/copyright_winter.gif" border="0">');
else if ($actmain == 2) document.writeln ('<img src="./images/copyright_sommer.gif" border="0">');
else document.writeln ('<img src="./images/copyright_allgemein.gif" border="0">');
//document.writeln ('&nbsp;'); 
document.writeln ('</div>'); 

/*
// Erstelle Werbung
document.writeln ('<div id="Werbung" style="">');
document.writeln ('</div>'); 
*/

// Erstelle Submenue am Footer
document.writeln ('<div id="NAV_Balken1">&nbsp;</div>');
document.writeln ('<div id="NAV_Balken2">&nbsp;</div>');
document.writeln ('<div id="NAV_Balken3">&nbsp;</div>');
document.writeln ('<div id="NAV_Balken4">&nbsp;</div>');
document.writeln ('<div id="NAV_Balken5">&nbsp;</div>');
document.writeln ('<div id="NAV_Balken6">&nbsp;</div>');
document.writeln ('<div id="NAV_Balken7">&nbsp;</div>');


document.writeln ('<div id="NAV_Deutsch"><a class="NAV_Sprachlink" href="./index.php">Deutsch</a></div>');
document.writeln ('<div id="NAV_English"><a class="NAV_Sprachlink" href="./index_uk.php">English</a></div>');

document.writeln ('<div id="NAV_Item3"><a class="NAV_Link" href="./index.php">&Uuml;ber uns</a></div>');
document.writeln ('<div id="NAV_Item4"><a class="NAV_Link" href="./wissenswertes.php">Wissenswertes</a></div>');
document.writeln ('<div id="NAV_Item5"><a class="NAV_Link" href="./oeffnungszeiten.php">&Ouml;ffnungszeiten</a></div>');
document.writeln ('<div id="NAV_Item6"><a class="NAV_Link" href="./kontakt.php">Kontakt</a></div>');
document.writeln ('<div id="NAV_Item7"><a class="NAV_Link" href="./links.php">Links</a></div>');
document.writeln ('<div id="NAV_Item8"><a class="NAV_Link" href="./impressum.php">Impressum</a></div>');
