<!--
//----------------------------------------------------------------------------------------------------------------------
// Autor:				Hans Gerber
// Erstellt am:			21.09.2005
// Letzte Aenderung am:		
// Kurzbeschreibung:	JavaScript-Datei für index.asp
//----------------------------------------------------------------------------------------------------------------------
// Korrekturen / Aenderungen (wer, wann, was)
//----------------------------------------------------------------------------------------------------------------------
// Bemerkung:             
//----------------------------------------------------------------------------------------------------------------------

function UpdateAction(nummer)
{
if(nummer == 1)
	{ 
	if(((document.selektion.housesearch[document.selektion.housesearch.selectedIndex].value)=='0')||((document.selektion.housesearch[document.selektion.housesearch.selectedIndex].value)==''))
		{
		alert(id2742);
		document.selektion.housesearch.focus();
		document.selektion.housesearch.selectedIndex=0;
		}
	else
		{	
		document.selektion.countrycode.value = document.selektion.housesearch[document.selektion.housesearch.selectedIndex].value.substring(0,1);
		document.selektion.housesearch.value = (document.selektion.housesearch[document.selektion.housesearch.selectedIndex].value);
		document.selektion.anzeigetyp.value = '';
		document.selektion.action = '/buchung/residenzdetail.asp';
		document.selektion.submit();
		}
	}
if(nummer == 2)
	{
	document.selektionresidenzen.submit();
	}
if(nummer == 3)
	{
	document.selektionlastminute.submit();
	}

if(nummer == 4)
	{
	document.winterresidenzen.anzeigetyp.value = 'wibe';
	document.winterresidenzen.submit();
	}

if(nummer == 5)
	{
	document.sommerresidenzen.anzeigetyp.value = 'sobe';
	document.sommerresidenzen.submit();
	}

if(nummer == 6)
	{
	document.selektionanzeigetyp.anzeigetyp.value = 'soso';
	document.selektionanzeigetyp.submit();
	}

if(nummer == 7)
	{
	document.selektionanzeigetyp.anzeigetyp.value = 'sobe';
	document.selektionanzeigetyp.submit();
	}

if(nummer == 8)
	{
	document.selektionanzeigetyp.anzeigetyp.value = 'wibe';
	document.selektionanzeigetyp.submit();
	}

if(nummer == 9)
	{
	document.printresidenzen.submit();
	}
}

function ExpWindow(pikto, winwidth, winheight)
{
if(winwidth=='')
	{
	winwidth = '200';
	}
if(winheight=='')
	{
	winheight = '200';
	}
neu = window.open("http://www.interhome.ch/buchung/pikto_explain.asp" + baselink + "&pikto=" + pikto,"ExpWindow","width=" + winwidth + ",height=" + winheight);
neu.focus();
}

function WindowSkiKarte(countrycode,doc3,ortsname)
{
winwidth = '520';
winheight = '510';
neu = window.open("/buchung/window_skikarte.asp" + baselink + "&countrycode=" + countrycode + "&doc3=" + doc3 + "&place=" + ortsname,"WindowSkiKarte","width=" + winwidth + ",height=" + winheight);
neu.focus();
}

function pruefen()
{
test = document.viaMfrm1.strStartCity.value; 
size = test.length;
while (test.slice(0,1) == " ") //wenn erstes Zeichen leer
	{
	test = test.substr(1,size-1);
	size = test.length;
	}
while(test.slice(size-1,size) == " ") //wenn letztes Zeichen leer
	{
	test = test.substr(0,size-1);
	size = test.length;
	}
if(test == 0)
	{
	alert(id1551);
	document.viaMfrm1.strStartCity.focus();
	return false;
	}
}

function ResiDetail(housesearch,countrycode,regioncode)
	{
	countryregioncode = countrycode + regioncode
	if(countryregioncode == 'C50')
		{
		document.residenzenDetail.anzeigetyp.value = 'soso';
		}
	else
		{
		document.residenzenDetail.anzeigetyp.value = 'sobe';
		}
	document.residenzenDetail.countrycode.value = countrycode;
	document.residenzenDetail.housesearch.value = housesearch;
	document.residenzenDetail.submit();
	}

function WohnungenToCatalog(room)
	{
	document.selektionresidenzenwohnung.vonroom.value = room;
	document.selektionresidenzenwohnung.bisroom.value = room;
	document.selektionresidenzenwohnung.submit();
	}

function openMenuHotel()
	{
	showlayerHotel('cMenuHotel');
	EinnerHTMLHotel('cMenuHotel',MenuHotel());
	hidelayerHotel('hideme');
	}

function closeMenuHotel()
	{
	hidelayerHotel('cMenuHotel');
	showlayerHotel('hideme');
	}

function MenuHotel()
	{
	y='<div id="HotelServiceResidenzListe">';
	y+='<div>' + id2773 + '</div>';
	y+='<div id="ListeZelleResidenzenTextRechts"><a href="javascript:closeMenuHotel();" onfocus="if(this.blur)this.blur();">' + id169 + ' X</a></div>';
	y+='</div>';
	return y;
	}

function showlayerHotel(name)
	{
	obj=document.getElementsByTagName("div");
	if(obj[name])
		{
		obj[name].style.display = "block";
		}
	}

function hidelayerHotel(name)
	{
	obj=document.getElementsByTagName("div");
	if(obj[name])
		{
		obj[name].style.display = "none";
		}
	}

function EinnerHTMLHotel(name,html)
	{
	if(temp=document.getElementById(name))
		{
		temp.innerHTML=html;
		}
	}

function OutputHotel(posleft,postop)
	{
	document.write('<div id="cMenuHotel" style="position:absolute; left:' + posleft + '; top:'+ postop +';"></div>');
	}

function UpdateSonderAngebot(datebegin,duration)
	{
	document.selektionresidenzensonderangebot.datebegin.value = datebegin;
	document.selektionresidenzensonderangebot.duration.value = duration;
	document.selektionresidenzensonderangebot.submit();
	}

//-->