<!--
var ActiveRatingClassNames = new Array('neutral01_lo', 'neutral01_l', 'neutral01_l', 'neutral01_l', 'neutral01_l', 'neutral01_l', 'neutral01_l');
var InactiveRatingClassNames = new Array('neutral02_lo', 'neutral02_l', 'neutral02_l', 'neutral02_l', 'neutral02_l', 'neutral02_l', 'neutral02_l');
function CheckCookiePermission()
{
	if (navigator.cookieEnabled == true)
		return true;
	else {
		alert("You have to configure your web browser to accept cookies.");
		return false;
	}
}
function setCookie(name, value, expires, domain, path, secure)
{
	var browser = navigator.appName;
	version = parseFloat(navigator.appVersion.split("MSIE")[1]);
	//Special treatment for IE8, because of a security issue, the cookie would be blocked with this domain-attribute value
	if(browser != null && version != null)
		if(browser == "Microsoft Internet Explorer" && (version == 8) && (domain == ".travel.ch" || domain == ".travel.at" || domain == ".travel.se"))
			domain = "";
	var curCookie = name + "=" + escape(value) +
	((expires) ? "; expires=" + expires.toGMTString() : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
	document.cookie = curCookie;
	if(domain != null && domain != "" && browser == "Microsoft Internet Explorer")
	{
		if(getCookie(name) == null || getCookie(name) != value)
		{
			var curCookie = name + "=" + escape(value) +
			((expires) ? "; expires=" + expires.toGMTString() : "") +
			((path) ? "; path=" + path : "") +
			((secure) ? "; secure" : "");
			document.cookie = curCookie;
		}
	}
}
function getCookie( check_name ) {
	var a_all_cookies = document.cookie.split( ';' );
	var a_temp_cookie = '';
	var cookie_name = '';
	var cookie_value = '';
	var b_cookie_found = false; // set boolean t/f default f
	for ( i = 0; i < a_all_cookies.length; i++ )
	{
		a_temp_cookie = a_all_cookies[i].split( '=' );
		cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, '');
		if ( cookie_name == check_name )
		{
			b_cookie_found = true;
			if ( a_temp_cookie.length > 1 )
			{
				cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') );
			}
			return cookie_value;
			break;
		}
		a_temp_cookie = null;
		cookie_name = '';
	}
	if ( !b_cookie_found )
	{
		return null;
	}
}
function SetLanguage(Domain, Cookievalue)
{
	if(CheckCookiePermission() == true) {
		var Lang_ID;
		var ExpireDate = new Date();
		var FivtyDays = ExpireDate.getTime() + (50 * 24 * 60 * 60 * 1000);
		if(Cookievalue == 'de')
			Lang_ID = 1;
		else if(Cookievalue == 'en')
			Lang_ID = 2;
		else if(Cookievalue == 'fr')
			Lang_ID = 3;
		else if(Cookievalue == 'se')
			Lang_ID = 10;
		else if(Cookievalue == 'it')
			Lang_ID = 4;
		ExpireDate.setTime(FivtyDays);
		setCookie('Lang_ID', Lang_ID, ExpireDate, '', '');
		location.reload();
	}
}
function SetLanguageTravel(Domain, Cookievalue)
{
	if(CheckCookiePermission() == true) {
		var Lang_ID;
		var ExpireDate = new Date();
		var FivtyDays = ExpireDate.getTime() + (50 * 24 * 60 * 60 * 1000);
		if(Cookievalue == 'de')
			Lang_ID = 1;
		else if(Cookievalue == 'en')
			Lang_ID = 2;
		else if(Cookievalue == 'fr')
			Lang_ID = 3;
		else if(Cookievalue == 'se')
			Lang_ID = 10;
		else if(Cookievalue == 'it')
			Lang_ID = 4;
		ExpireDate.setTime(FivtyDays);
		setCookie('Lang_ID', Lang_ID, ExpireDate, '.' + Domain, '');
		location.reload();
	}
}
function SetBranchTransfer(Domain, Branch)
{
	if(CheckCookiePermission() == true) {
		var ExpireDate = new Date();
		var FivtyDays = ExpireDate.getTime() + (50 * 24 * 60 * 60 * 1000);
		ExpireDate.setTime(FivtyDays);
		if(Domain == '')
			setCookie('BranchTransfer', Branch, ExpireDate, '', '/');
		else
			setCookie('BranchTransfer', Branch, ExpireDate, '.' + Domain, '/');
	}
	return true;
}
function expandCollapseAddinional ( elementToShow, elementToHide, additionalElementToShow, additionalElementToHide  )
{
	document.getElementById( elementToShow ).style.display = "block";
	document.getElementById( elementToHide ).style.display = "none";
	if(additionalElementToShow != '')
	    document.getElementById( additionalElementToShow ).style.display = "block";
	else if(additionalElementToHide != '')
	    document.getElementById( additionalElementToHide ).style.display = "none";
}

function expandCollapse ( elementname,elementname1 )
{
	var curElement = document.getElementById ( elementname );
	if (curElement.style.display == "block")
		curElement.style.display = "none";
	else
		curElement.style.display = "block";
	if (elementname1 != "") {
		var curElement1 = document.getElementById ( elementname1 );
		if (curElement.style.display == "block")
			curElement1.style.display = "none";
		else
			curElement1.style.display = "block";
	}
}
function ShowHideAdditionalData ( elementname,mode )
{
	var curElement = document.getElementById ( elementname );
	if (mode == "hide")
		curElement.style.display = "none";
	else
		curElement.style.display = "block";
}
function ShowHideTRBrowserSwitch ( elementname )
{
	var isIE = false;
	var isFF = false;
	var isOP = false;
	var show = "table-row";
	var hide = "none";
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1) isOP = true;
	if (agt.indexOf("firefox") != -1) isFF = true;
	if (agt.indexOf("msie") != -1) isIE = true;
	if(isIE) {
		show = "block";
		hide = "none";
	}
	else if(isFF) {
		show = "table-row";
		hide = "none";
	}
	else if(isOP) {
		show = "table-row";
		hide = "none";
	}
	var curElement = document.getElementById ( elementname );
	if (curElement.style.display == "none") {
		curElement.style.display = show;
		curElement = document.getElementById ( elementname + '_Hide' );
		curElement.style.display = show;
		curElement = document.getElementById ( elementname + '_Show' );
		curElement.style.display = hide;
	}
	else {
		curElement.style.display = hide;
		curElement = document.getElementById ( elementname + '_Show' );
		curElement.style.display = show;
		curElement = document.getElementById ( elementname + '_Hide' );
		curElement.style.display = hide;
	}
}
function ShowHideRating ( prefix, CurrentRatingIndex )
{	
	var curElement;
	var foundError = false;
	var PreviousRatingIndex = document.Hotel_Rating_Form.CurrentElementRating.value;
	curElement = document.getElementById ( 'textarea_' + PreviousRatingIndex );
	if(PreviousRatingIndex < 7) {
		if(curElement.value != null) {
			if(curElement.value.length > 0) {
				if((document.getElementById ( 'hotel_rating_points_' + PreviousRatingIndex ).value == "0") || (document.getElementById ( 'hotel_rating_points_' + PreviousRatingIndex ).value == "-1")) {
					alert(document.getElementById ( 'RateWhenUsingText' ).value);
					foundError = true;
				}
			}
		}
	}
	if(!foundError) {
		if(CurrentRatingIndex == 'next') {
			if(PreviousRatingIndex == '7')
				CurrentRatingIndex = '1';
			else
				CurrentRatingIndex = Number(PreviousRatingIndex) + 1;
			curElement = document.getElementById ( 'radio_ID_' + CurrentRatingIndex );
			curElement.checked = true;
		}
		if(CurrentRatingIndex == 'back') {
			if(PreviousRatingIndex == '1')
				CurrentRatingIndex = '7';
			else
				CurrentRatingIndex = PreviousRatingIndex - 1;
			curElement = document.getElementById ( 'radio_ID_' + CurrentRatingIndex );
			curElement.checked = true;
		}
		if(CurrentRatingIndex != PreviousRatingIndex) {	
			if(CurrentRatingIndex != "") {
				//display the current element
				curElement = document.getElementById ( 'show_content_' + CurrentRatingIndex );
				curElement.style.display = "block";
				//mark the current element
				curElement = document.getElementById ( 'div_ID_' + CurrentRatingIndex );
				if(prefix == '')
					curElement.className = ActiveRatingClassNames[CurrentRatingIndex - 1];
				else
					curElement.className = "neutral01_l";
			}
			if(PreviousRatingIndex != "") {
				//hide the previous element
				curElement = document.getElementById ( 'show_content_' + PreviousRatingIndex );
				curElement.style.display = "none";
				//mark the previous element
				curElement = document.getElementById ( 'div_ID_' + PreviousRatingIndex );
				if(prefix == '')
					curElement.className = InactiveRatingClassNames[PreviousRatingIndex - 1];
				else
					curElement.className = "neutral02_l";
			}
			document.Hotel_Rating_Form.CurrentElementRating.value = CurrentRatingIndex;
		}
	}
}
function ShowHidePicture ( CurrentPictureIndex )
{	
	var curElement;
	var PreviousPictureIndex = document.Hotel_Rating_Form.CurrentElementPicture.value;
	if(CurrentPictureIndex != PreviousPictureIndex) {	
		if(CurrentPictureIndex != "") {
			//display the current element
			curElement = document.getElementById ( 'show_content_' + CurrentPictureIndex );
			curElement.style.display = "block";
			//mark the current element
			curElement = document.getElementById ( 'div_ID_' + CurrentPictureIndex );
			curElement.className = ActiveRatingClassNames[CurrentPictureIndex - 7];
		}
		if(PreviousPictureIndex != "") {
			//hide the previous element
			curElement = document.getElementById ( 'show_content_' + PreviousPictureIndex );
			curElement.style.display = "none";
			//mark the previous element
			curElement = document.getElementById ( 'div_ID_' + PreviousPictureIndex );
			curElement.className = InactiveRatingClassNames[PreviousPictureIndex - 7];
		}
		document.Hotel_Rating_Form.CurrentElementPicture.value = CurrentPictureIndex;
	}
}
function SetInitialElementPosition ( prefix )
{	
	var curElement;
	var RatingPoint1 = document.Hotel_Rating_Form.hotel_rating_points_1.value;
	var RatingPoint2 = document.Hotel_Rating_Form.hotel_rating_points_2.value;
	var RatingPoint3 = document.Hotel_Rating_Form.hotel_rating_points_3.value;
	var RatingPoint4 = document.Hotel_Rating_Form.hotel_rating_points_4.value;
	var RatingPoint5 = document.Hotel_Rating_Form.hotel_rating_points_5.value;
	var RatingPoint6 = document.Hotel_Rating_Form.hotel_rating_points_6.value;
	var RatingIndex = document.Hotel_Rating_Form.CurrentElementRating.value;
	var ButtonID = document.Hotel_Rating_Form.CurrentButtonID.value;
	curElement = document.getElementById ( prefix + 'TravelerType' );
	if(curElement.selectedIndex != 0) {
		curElement = document.getElementById ( prefix + 'traveler_ok' );
		curElement.style.display = 'block';
	}
	curElement = document.getElementById ( prefix + 'HolidayType' );
	if(curElement.selectedIndex != 0) {
		curElement = document.getElementById ( prefix + 'holiday_ok' );
		curElement.style.display = 'block';
	}
	curElement = document.getElementById ( prefix + 'Recommend_Hotel_Yes' );
	if(curElement.checked == true) {
		curElement = document.getElementById ( prefix + 'recommend_ok' );
		curElement.style.display = 'block';
	}
	else {
		curElement = document.getElementById ( prefix + 'Recommend_Hotel_No' );
		if(curElement.checked == true) {
			curElement = document.getElementById ( prefix + 'recommend_ok' );
			curElement.style.display = 'block';
		}
	}
	if(RatingPoint1 > 0) {
		curElement = document.getElementById ( prefix + 'rating_ok_1' );
		curElement.style.display = 'block';
	}
	if(RatingPoint2 > 0) {
		curElement = document.getElementById ( prefix + 'rating_ok_2' );
		curElement.style.display = 'block';
	}
	if(RatingPoint3 > 0) {
		curElement = document.getElementById ( prefix + 'rating_ok_3' );
		curElement.style.display = 'block';
	}
	if(RatingPoint4 > 0) {
		curElement = document.getElementById ( prefix + 'rating_ok_4' );
		curElement.style.display = 'block';
	}
	if(RatingPoint5 > 0) {
		curElement = document.getElementById ( prefix + 'rating_ok_5' );
		curElement.style.display = 'block';
	}
	if(RatingPoint6 > 0) {
		curElement = document.getElementById ( prefix + 'rating_ok_6' );
		curElement.style.display = 'block';
	}
	if(RatingIndex != "") {
		//display the current element
		curElement = document.getElementById ( 'show_content_' + RatingIndex );
		curElement.style.display = "block";
		//mark the current rating element
		curElement = document.getElementById ( 'div_ID_' + RatingIndex );
		if(prefix == '')
			curElement.className = ActiveRatingClassNames[RatingIndex - 1];
		else
			curElement.className = 'neutral01_l';
		curElement = document.getElementById ( 'radio_ID_' + RatingIndex );
		curElement.checked = true;
	}
	if(ButtonID != "") {
		var FocusElement = document.getElementById( ButtonID );
		if((FocusElement) && (FocusElement.style.display != 'block'))
			FocusElement.focus();
	}
}
function ShowHideElement(elementname, style)
{
	var curElement = document.getElementById ( elementname );
	curElement.style.display = style;
}
function ShowHideBlock(elementname)
{
	var curElement = document.getElementById ( elementname );
		
	if (curElement.style.display == "block")
		curElement.style.display = "none";
	else
		curElement.style.display = "block";
}
function SetOKPicture (elementname)
{
	var curElement = document.getElementById ( elementname );
	curElement.style.display = "block";
	curElement.src = "/images/symb_rating_ok.gif";
}
function ShowHideHotelDetail( elementname )
{
	var curElement = document.getElementById ( elementname );
	if (curElement.className == "hotel_detail_on")
		curElement.className = "hotel_detail_off";
	else
		curElement.className = "hotel_detail_on";
}
function ShowHideFlightDetail( elementname )
{
	var curElement = document.getElementById ( elementname );
	if (curElement.className == "flight_detail_on")
		curElement.className = "flight_detail_off";
	else
		curElement.className = "flight_detail_on";
}
function ShowHideHolidayHomeDetail( elementname )
{
	var curElement = document.getElementById ( elementname );
	if (curElement.className == "holiday_home_detail_on")
		curElement.className = "holiday_home_detail_off";
	else
		curElement.className = "holiday_home_detail_on";
}
function ShowHideFlightOptions( elementname, elementname2 )
{
	var curElement = document.getElementById ( elementname );
	var curElement2 = document.getElementById ( elementname2 );
	if(curElement != null)
	{
		curElement.className = "flight_detail_on";		
		if(curElement2 != null)
			curElement2.className = "flight_detail_off";
	}
}
function ShowHideAllHotelDetail( start, stop, name )
{
	var i = start;
	for(i = start; i < stop; i++)
	{
		var curElement = document.getElementById ( 'hotel_detail_' + i );
		curElement.className = name;
	}
	var curElementOn = document.getElementById ( 'hotel_detail_all_on_top' );
	if (curElementOn.className == "hotel_detail_on")
		curElementOn.className = "hotel_detail_off";
	else
		curElementOn.className = "hotel_detail_on";
	var curElementOff = document.getElementById ( 'hotel_detail_all_off_top' );		
	if (curElementOff.className == "hotel_detail_on")
		curElementOff.className = "hotel_detail_off";
	else
		curElementOff.className = "hotel_detail_on";
	curElementOn = document.getElementById ( 'hotel_detail_all_on_bottom' );
	if (curElementOn.className == "hotel_detail_on")
		curElementOn.className = "hotel_detail_off";
	else
		curElementOn.className = "hotel_detail_on";
	curElementOff = document.getElementById ( 'hotel_detail_all_off_bottom' );		
	if (curElementOff.className == "hotel_detail_on")
		curElementOff.className = "hotel_detail_off";
	else
		curElementOff.className = "hotel_detail_on";
}

function ChangeBackgroundImageType ( elementname )
{
	var curElement = document.getElementById ( elementname );
	var curTypeOptionChoose = document.getElementById ( prefix + 'cc_type_option_choose' );
	var curTypeOptionMaster = document.getElementById ( prefix + 'cc_type_option_master' );
	var curTypeOptionVisa = document.getElementById ( prefix + 'cc_type_option_visa' );
	if(curTypeOptionChoose.selected == true)
		curElement.className = "cc_type";
	if(curTypeOptionMaster.selected == true)
		curElement.className = "cc_type_Mastercard2";
	if(curTypeOptionVisa.selected == true)
		curElement.className = "cc_type_Visa2";
}
function ShowHideAboutUsCenterContent ( elementname, elementname1, elementname2, elementname3, elementname4, elementname5, elementname6 )
{
    var curElement = document.getElementById(elementname);
    if (curElement.style.display == "block")
        curElement.style.display = "block";
    else
        curElement.style.display = "block";
    if (elementname1 != "") {
        var curElement1 = document.getElementById(elementname1);
        if (curElement.style.display == "block")
            curElement1.style.display = "none";
        else
            curElement1.style.display = "none";
    }
    if (elementname2 != "") {
        var curElement2 = document.getElementById(elementname2);
        if (curElement.style.display == "block")
            curElement2.style.display = "none";
        else
            curElement2.style.display = "none";
    }
    if (elementname3 != "") {
        var curElement3 = document.getElementById(elementname3);
        if (curElement.style.display == "block")
            curElement3.style.display = "none";
        else
            curElement3.style.display = "none";
    }
    if (elementname4 != "") {
        var curElement4 = document.getElementById(elementname4);
        if (curElement.style.display == "block")
            curElement4.style.display = "none";
        else
            curElement4.style.display = "none";
    }
    if (elementname5 != "") {
        var curElement5 = document.getElementById(elementname5);
        if (curElement.style.display == "block")
            curElement5.style.display = "none";
        else
            curElement5.style.display = "none";
    }
    if (elementname6 != "") {
        var curElement6 = document.getElementById(elementname6);
        if (curElement.style.display == "block")
            curElement6.style.display = "none";
        else
            curElement6.style.display = "none";
    }
}
function GetPriceTextFromPriceCurrency( price, price_currency, showtail )
{
	var PriceNumber = parseFloat(price);
	if(PriceNumber.toFixed) {
		if(showtail)
			PriceNumber = PriceNumber.toFixed(0);
		else
			PriceNumber = PriceNumber.toFixed(2);
	}
	else {
		if(showtail)
			PriceNumber = (Math.round(PriceNumber)).toString();
		else
			PriceNumber = (Math.round(PriceNumber * 100) / 100).toString();
	}
	var PriceText;
	if(price_currency == 'CHF') {
		PriceText = 'Fr. ' + PriceNumber;
		if(showtail)
			PriceText += '.-';
	}
	else if(price_currency == 'EUR') {
		PriceText = String.fromCharCode(8364) + ' ' + PriceNumber;
		if(showtail)
			PriceText += ',-';
	}
	else if(price_currency == 'USD')
		PriceText = 'US $' + PriceNumber;
	else if(price_currency == 'SEK')
		PriceText = PriceNumber + ' SEK';
	else if(price_currency == 'GBP')
		PriceText = '£' + PriceNumber;
	else if(price_currency == 'AUD')
		PriceText = 'AU $' + PriceNumber;
	else if(price_currency == 'CAD')
		PriceText = 'CND $' + PriceNumber;
	else
		PriceText = PriceNumber + ' ' + price_currency;		
	return PriceText;
}
function keyPressed(Event)
{
	if(FormHasButton)
	{
		var KeyCode = 0;
		if(!Event)
			Event = window.event;
		if(Event.which)
		{
			KeyCode = Event.which;
		}
		else if(Event.keyCode)
		{
			KeyCode = Event.keyCode;
		}
		if(KeyCode == 13)
		{
		    var FocusElement = document.getElementById(DefaultButtonID);
		    if (FocusElement) {
		        FocusElement.focus();
		    }
			return true;
		}
		else
			return true;
	}
	else
		return true;
}
-->

