/*################################################################################
	D E B U G
################################################################################*/

var debugModus = 0	; // Debugmodus EIN = 1 || AUS = 0

function debug(txt)
{
	if(!debugModus || typeof(console) != "object") { return; }
	else { console.log(txt); }
}
debug("debugModus = true");


/*################################################################################
	$$$
################################################################################*/

// get Elements by Name

function $$$(obj)
{
	var obj = document.getElementsByName(obj);
	obj = (obj.length==1)?obj[0]:obj;
	return obj;
}


/*################################################################################
	F U N C T I O N S
################################################################################*/


function on_load(lang){
	if($('iframe_hotel')!=undefined){     
		calcHeight(lang);
	}
	
	if($('mood_Home')!=undefined){  
		$('mood_Home').setStyle('display','block');
	}
	
	if($('mood')!=undefined){  
		$('mood').setStyle('display','block');
	}
}

function calcHeight(lang){
    //find the height of the internal page
	var the_height = document.body.scrollHeight;
//	var the_height = document.body.offsetHeight;
	//console.debug(the_height);
    //change the height of the iframe
	if($('iframe_hotel')){   
    	//$('iframe_hotel').setStyle('height',the_height+'px');
//		$('iframe_hotel').src="http://hdg.vpotter.slon.xiag.ch/?l="+lang;
		$('iframe_hotel').src="http://gastrosuisse.stc.ch/?l="+lang;
    }
}


function showNavi(a,id, onimg, offimg) {
	a.image = $('link' + id);
	a.subNavi = $('subnavi' + id);
	a.subNavi.style.left = a.image.offsetLeft - 6 + "px";
	a.subNavi.root = a;
	
	a.subNavi.onmouseover = function() {
		this.style.display = "block";
		this.root.onmouseover();
	}
	
	a.subNavi.onmouseout = function() {
		this.style.display = "none";
		this.root.onmouseout();
	}
	
	a.onmouseout = function() {
		this.image.set('src',offimg);
		a.subNavi.style.display = "none";
	}
	
	a.onmouseover = function() {
		this.image.set('src',onimg);
		a.subNavi.style.display = "block";
	}
	
	a.onmouseover();	
}