
/*
*
*/
var dropdown_timer = 0;

function menuMouseOver(MENU, LANG, CLASSNAME, MNAME, STATUS, TEXT){
	switch(MENU){
		case('HEADER'):	if(STATUS != null) document.getElementById(MNAME).src = './pics/menu_'+LANG+'/meta/'+MNAME+STATUS+'.gif';
						window.status=TEXT; 
						return true;
						break;
		case('MAIN'):
						if(STATUS == "_on") 
						{
							document.getElementById(MNAME+"_pic").style.visibility = "visible";
							document.getElementById(MNAME+"_txt").style.visibility = "visible";
							if(typeof dropTimer != "undefined") clearTimeout(dropTimer);
						}
						else {
							if(typeof dropTimer != "undefined") clearTimeout(dropTimer);
							dropTimer = window.setTimeout(closeAll, 1500);
						}
						window.status=TEXT;
						return true;
						break;
		case('SUB2'):	if(STATUS != null) document.getElementById(MNAME).src = './pics/menu_'+LANG+'/sub2/li_sub2'+STATUS+'.gif';
						window.status=TEXT; 
						return true;
						break;
		case('DROP'):	if(STATUS != null) document.getElementById(MNAME+"['"+CLASSNAME+"']").src = './pics/menu_'+LANG+'/dropdown/'+MNAME+STATUS+'.gif';
						if(STATUS == "_on") 
						{
							if(typeof dropTimer != "undefined") clearTimeout(dropTimer);
						}
						else {
							if(typeof dropTimer != "undefined") clearTimeout(dropTimer);
							dropTimer = window.setTimeout(closeAll, 1500);
						}
						return true;
						break;
		default: 		window.status=TEXT;
						return true;
	}
}


function div_close(name,typ,left)
{
	if(typ == "txt")
	{
		var top = 96-document.body.scrollTop;
		var breite = 103;
		var hoehe  = 236;
	}
	else
	{
		var top = 96-document.body.scrollTop;
		var breite = 103;
		var hoehe  = 236;
	}

	if (window.event)
	{
		if(window.event.clientX > left+breite || window.event.clientX < left+2 || window.event.clientY > top+hoehe || window.event.clientY < top+2)
		{
			document.getElementById(name+"_txt").style.visibility = "hidden";
			document.getElementById(name+"_pic").style.visibility = "hidden";
		}
	}
}

/*
*
*/
function setPointer(tableElem,e){
	if (!document.getElementsByTagName) return;
	switch(e.type){
		case 'mouseover':	var rowCol = '#FFD8A6';
							var cellCol= '#ff9600';
							break;
		case 'mouseout':	var rowCol = '';
							var cellCol= '';
							break;
	}
	if(tableElem.parentElement) theRow = tableElem.parentElement;
	if(tableElem.parentNode) theRow = tableElem.parentNode;
	theCells = theRow.getElementsByTagName('td');
	for(i=0;i<theCells.length;i++){
		theCells[i].style.backgroundColor = rowCol;
	}
	if(tableElem.style.cursor=='pointer') tableElem.style.backgroundColor = cellCol;
}

/*
*
*/
function replayFlash(){
	if(is.ie && typeof flash != 'undefined')
	{
	flash.SetVariable("status","false");
	flash.GotoFrame(2);
	flash.Play();
	}
	//else document.embeds[0];
}

/*
* 
*/
function formFocus(obj,fvalue){
	if(is.ie||is.ns6){
	  obj.style.backgroundColor='#FFFFFF';
	}
	if(obj.value==fvalue) obj.value='';
}
function formBlur(obj){
	if(is.ie||is.ns6){
	  if(obj.value!='')	obj.style.backgroundColor='#c1d9ff';
	  else obj.style.backgroundColor='#f4f7fd';
	}
}

function open_close(url)
 {
opener.location.href = url;
  //alert("Sie wechseln jetzt in den Konfigurationsmodus");
  self.close();
 }

function set_radio(field)
{
	if(field == "intern")
		document.cmsForm.type[0].checked = true;
	if(field == "extern")
		document.cmsForm.type[1].checked = true;
	if(field == "popup")
		document.cmsForm.type[2].checked = true;
	if(field == "intern1")
		document.cmsForm.type1[0].checked = true;
	if(field == "extern1")
		document.cmsForm.type1[1].checked = true;
	if(field == "popup1")
		document.cmsForm.type1[2].checked = true;
	if(field == "intern2")
		document.cmsForm.type2[0].checked = true;
	if(field == "extern2")
		document.cmsForm.type2[1].checked = true;
	if(field == "popup2")
		document.cmsForm.type2[2].checked = true;
	/*xy.Anrede[0].checked = true */
}


function closeAll(leaveOpenName)
{
	var areaNames = new Array('dashotel', 'uebernachten', 'seminare', 'feiernevents', 'essen', 'forum', 'gaesteinfos');
	for(var i=0;i<areaNames.length;i++) {
		if(areaNames[i]!=leaveOpenName) {
			document.getElementById(areaNames[i]+'_pic').style.visibility='hidden';
			document.getElementById(areaNames[i]+'_txt').style.visibility='hidden';
		}
	}
}