/*<![CDATA[*/

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Javascript Functions      														   *
 * ----------------------------------------------------------------------------------- *
 * Version:					1.0													   *
 * Author:					re-lounge (http://www.re-lounge.com)					   *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 			*/
 
/* --------------------------------------------------------------------------------------
 * FUNCTION P7_limit(a,b) 
 * --------------------------------------------------------------------------------------
 * Emulates min-width functionality in IE. (v1.1.2)
 * Author: P7, www.projectseven.com
 */
function P7_limit(a,b) {
	document.p7limit=a;
	document.p7min=b;
 	if(document.getElementById&&navigator.appVersion.indexOf("MSIE")>-1&&!window.opera){
		if(window.attachEvent){
			window.attachEvent("onresize",P7_setMinWidth);
			window.attachEvent("onload",P7_setMinWidth);
		} else {
			onload=P7_setMinWidth;
			onresize=P7_setMinWidth;
		}
	}
}
P7_limit('pageContainer',770);

/* --------------------------------------------------------------------------------------
 * FUNCTION P7_setMinWidth()
 * --------------------------------------------------------------------------------------
 * Emulates min-width functionality in IE. (v1.1.2)
 * Author: P7, www.projectseven.com
 */
function P7_setMinWidth(){
	var cw,w,pl,pr,ml,mr,br,bl,ad,theDiv=document.p7limit;
	var g=document.getElementById(theDiv);
	w=parseInt(document.p7min);
	if(g&&document.body&&document.body.clientWidth){
		gs=g.currentStyle;
		cw=parseInt(document.body.clientWidth);
		pl=parseInt(gs.paddingLeft);
		pr=parseInt(gs.paddingRight);
		ml=parseInt(gs.marginLeft);
		mr=parseInt(gs.marginRight);
		bl=parseInt(gs.borderLeftWidth);
		br=parseInt(gs.borderRightWidth);
		ml=ml?ml:0;
		mr=mr?mr:0;
		pl=pl?pl:0;
		pr=pr?pr:0;
		bl=bl?bl:0;
		br=br?br:0;
		ad=pl+pr+ml+mr+bl+br;
		if(cw<=w){
			w-=ad;
			g.style.width=w+"px";
		} else {
			g.style.width="auto";
		}
	}
}

/* --------------------------------------------------------------------------------------
 * FUNCTION openWindow(dir, name, width, height, scroll, toolbar, resizable)
 * --------------------------------------------------------------------------------------
 * used for opening big pictures and gallery in popup window
 * Author: 
 */
function openWindow(dir, name, width, height, scroll, toolbar, resizable) {
	dirName=dir
	param= "width="+width+",height="+height+",screenX=0,screenY=0, top=0, left=0, menubar=no, locationbar=no, status=no";
	
	if(toolbar)
		param+=",toolbar=yes"
	
	if(scroll)
		param+=",scrollbars=yes"
		
	if(resizable)
		param+=",resizable=yes"
	else
		param+=",resizable=no"
		
	winName= name.replace(/ /,"_")
	
	if(winName!='popup' && winName !='manager')
		winName+= Math.floor(Math.random()*100000);
	
	window.open(dirName, winName, param);
}

/* --------------------------------------------------------------------------------------
 * FUNCTION setLetterDimension()
 * --------------------------------------------------------------------------------------
 * Changes current letter dimension by increasing or decreasing by "val" and reloads page.
 * Uses minLetterSize and maxLetterSize to limit letter dimension
 * Writes an integer to the Cookie
 * Author: re-lounge, http://www.re-lounge.com
 */
var minLetterSize = 80; //for 0.65em;
var maxLetterSize = 115; //for 1.45em; 
var steps = 10; //for 0.1em;
function setLetterDimension(val) {
	var newSize = 80; //for 0.75em;
	if (GetCookie("letterSize")) {
		newSize = GetCookie("letterSize");
	}
	
	if (val==1) {
		for(i=0;i<steps;i++) {
			newSize++;
		}
	}
	
	if (val==0) {
		for(i=0;i<steps;i++) {
			newSize--;
		}	
	}
	
	// Set cookie
	SetCookie("letterSize",newSize,expdateAll,"/");
	// Reload
	window.history.go(0);
	
}
/* --------------------------------------------------------------------------------------
 * FUNCTION nextMin()
 * --------------------------------------------------------------------------------------
 * Returns true if next step of decreasing letter size is possible, else returns false
 * Author: re-lounge, http://www.re-lounge.com
 */
function nextMin() {
	var nextSize = GetCookie("letterSize");
	if (nextSize == "") nextSize=75;
	for(i=0;i<steps;i++) {
		nextSize--;
	}
	if(nextSize >= minLetterSize)
		return true;
	else
		return false;
}
/* --------------------------------------------------------------------------------------
 * FUNCTION nextMax()
 * --------------------------------------------------------------------------------------
 * Returns true if next step of increasing letter size is possible, else returns false
 * Author: re-lounge, http://www.re-lounge.com
 */
function nextMax() {
	var nextSize = GetCookie("letterSize");
	if (nextSize == "") nextSize=75;
	for(i=0;i<steps;i++) {
		nextSize++;
	}
	if(nextSize <= maxLetterSize)
		return true;
	else
		return false;	
}


/* --------------------------------------------------------------------------------------
 * FUNCTION setStylesheet()
 * --------------------------------------------------------------------------------------
 * Changes current stylesheet (to given stylesheet reference "val") and reloads page.
 * Author: re-lounge, http://www.re-lounge.com
 */
function setStylesheet(val) {
	// Set cookie
	SetCookie("style",val,expdateAll,"/");
	// Reload
	window.history.go(0);
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *																					   *
 * 	Cookie related functions														   *
 *																					   *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 			*/

/* --------------------------------------------------------------------------------------
 * FUNCTION cookiesEnabled()
 * --------------------------------------------------------------------------------------
 * Verifies if cookies are enabled and writes "true" or "false" in a global variable.
 * Author: re-lounge, http://www.re-lounge.com
 */
function cookiesEnabled(){
	var now = new Date();
	var val = String(now.getTime());
	SetCookie("cookieTest",val);
	cookiesEnabled = false;
	if (GetCookie("cookieTest")==val)
		return true;
	else
		return false;
} 
var cookiesEnabled = cookiesEnabled();
 
/* --------------------------------------------------------------------------------------
 * FUNCTION initCookieDate()
 * --------------------------------------------------------------------------------------
 * Initialises cookie expiries for new and changed cookies.
 * Author: re-lounge, http://www.re-lounge.com
 *
 * The following data is collected in cookies:
 *
 * - Current style used
 * - Current view of service elements in service area (open or closed)
 * - Current view service area (open or closed)
 *
 * The cookie expiry is 3 months for all element data.
 *
 */
function initCookieDate(){
	expdateAll = new Date ();
	expdateAll.setTime(expdateAll.getTime() + (3 * 30 * 24 * 60 * 60 * 1000));	// 3 Monate
}
initCookieDate();

// --------------------------------------------------------------------------------------
//  Cookie Functions -- "Night of the Living Cookie" Version (25-Jul-96)
// --------------------------------------------------------------------------------------
//
//  Written by:  Bill Dortch, hIdaho Design <bdortch@hidaho.com>
//  The following functions are released to the public domain.
//
//  This version takes a more aggressive approach to deleting
//  cookies.  Previous versions set the expiration date to one
//  millisecond prior to the current time; however, this method
//  did not work in Netscape 2.02 (though it does in earlier and
//  later versions), resulting in "zombie" cookies that would not
//  die.  DeleteCookie now sets the expiration date to the earliest
//  usable date (one second into 1970), and sets the cookie's value
//  to null for good measure.
//
//  Also, this version adds optional path and domain parameters to
//  the DeleteCookie function.  If you specify a path and/or domain
//  when creating (setting) a cookie**, you must specify the same
//  path/domain when deleting it, or deletion will not occur.
//
//  The FixCookieDate function must now be called explicitly to
//  correct for the 2.x Mac date bug.  This function should be
//  called *once* after a Date object is created and before it
//  is passed (as an expiration date) to SetCookie.  Because the
//  Mac date bug affects all dates, not just those passed to
//  SetCookie, you might want to make it a habit to call
//  FixCookieDate any time you create a new Date object:
//
//    var theDate = new Date();
//    FixCookieDate (theDate);
//
//  Calling FixCookieDate has no effect on platforms other than
//  the Mac, so there is no need to determine the user's platform
//  prior to calling it.
//
//  This version also incorporates several minor coding improvements.
//
//  **Note that it is possible to set multiple cookies with the same
//  name but different (nested) paths.  For example:
//
//    SetCookie ("color","red",null,"/outer");
//    SetCookie ("color","blue",null,"/outer/inner");
//
//  However, GetCookie cannot distinguish between these and will return
//  the first cookie that matches a given name.  It is therefore
//  recommended that you *not* use the same name for cookies with
//  different paths.  (Bear in mind that there is *always* a path
//  associated with a cookie; if you don't explicitly specify one,
//  the path of the setting document is used.)
//  
//  Revision History:
//
//    "Toss Your Cookies" Version (22-Mar-96)
//      - Added FixCookieDate() function to correct for Mac date bug
//
//    "Second Helping" Version (21-Jan-96)
//      - Added path, domain and secure parameters to SetCookie
//      - Replaced home-rolled encode/decode functions with Netscape's
//        new (then) escape and unescape functions
//
//    "Free Cookies" Version (December 95)
//
//
//  For information on the significance of cookie parameters, and
//  and on cookies in general, please refer to the official cookie
//  spec, at:
//
//      http://www.netscape.com/newsref/std/cookie_spec.html    
//
//******************************************************************
//
// "Internal" function to return the decoded value of a cookie
//
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}
//
//  Function to correct for 2.x Mac date bug.  Call this function to
//  fix a date object prior to passing it to SetCookie.
//  IMPORTANT:  This function should only be called *once* for
//  any given date object!  See example at the end of this document.
//
function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);
}
//
//  Function to return the value of the cookie specified by "name".
//    name - String object containing the cookie name.
//    returns - String object containing the cookie value, or null if
//      the cookie does not exist.
//
function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; 
  }
  return null;
}
//
//  Function to create or update a cookie.
//    name - String object containing the cookie name.
//    value - String object containing the cookie value.  May contain
//      any valid string characters.
//    [expires] - Date object containing the expiration data of the cookie.  If
//      omitted or null, expires the cookie at the end of the current session.
//    [path] - String object indicating the path for which the cookie is valid.
//      If omitted or null, uses the path of the calling document.
//    [domain] - String object indicating the domain for which the cookie is
//      valid.  If omitted or null, uses the domain of the calling document.
//    [secure] - Boolean (true/false) value indicating whether cookie transmission
//      requires a secure channel (HTTPS).  
//
//  The first two parameters are required.  The others, if supplied, must
//  be passed in the order listed above.  To omit an unused optional field,
//  use null as a place holder.  For example, to call SetCookie using name,
//  value and path, you would code:
//
//      SetCookie ("myCookieName", "myCookieValue", null, "/");
//
//  Note that trailing omitted parameters do not require a placeholder.
//
//  To set a secure cookie for path "/myPath", that expires after the
//  current session, you might code:
//
//      SetCookie (myCookieVar, cookieValueVar, null, "/myPath", null, true);
//
function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
}

//  Function to delete a cookie. (Sets expiration date to start of epoch)
//    name -   String object containing the cookie name
//    path -   String object containing the path of the cookie to delete.  This MUST
//             be the same as the path used to create the cookie, or null/omitted if
//             no path was specified when creating the cookie.
//    domain - String object containing the domain of the cookie to delete.  This MUST
//             be the same as the domain used to create the cookie, or null/omitted if
//             no domain was specified when creating the cookie.
//
function DeleteCookie (name,path,domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}


/* --------------------------------------------------------------------------------------
 * FUNCTION
 * --------------------------------------------------------------------------------------
 * 
 * Author: 
 */
function reload() {
	history.go(0);
}

function getHelp(){
	window.open("http://www.aquantum.net/syndicat/default.asp?id=help","syndicat_help");
}
function check_client() {      
    var client = "";
    var bName = navigator.appName;
    var bVer = parseInt(navigator.appVersion);

    if(bName == "Netscape" && bVer > 4) client = "n6";
    else if(bName == "Netscape" && bVer == 4) client = "n4";
    else if(bName == "Netscape" && bVer == 3) client = "n3";
    else if(bName == "Netscape" && bVer == 2) client = "n2";
    
    else if(bName == "Microsoft Internet Explorer" && bVer >= 4) client="e4";
    else if(bName == "Microsoft Internet Explorer" && bVer >= 2) client="e3";
    else client = "x";
    
    return client;
}

/* switch_display(id):
 *
 *	Schaltet bei dem Element mit der übergebenen ID den Display-Stil zwischen
 *	'block' und 'none' um. Falls zu dem Element auch noch ein Icon oder Link
 *	existiert (erkennbar am Anhang '_icon' oder '_link' an der ID), werden
 *	dort die Stile/Grafiken getauscht.
 */
function switch_display(id) {
	var obj = document.getElementById(id);
	var icon = document.getElementById(id+'_icon');
	var link = document.getElementById(id+'_link');
				
	if (obj.style.display == 'none') { 
		//open new
		obj.style.display = 'block';
		if (icon) 
			icon.src='media/css/icons/icon_offen.gif';
		if (link)
			link.className='subDocActive';
	} else {
		//close new
		obj.style.display = 'none';
		if (icon)
			icon.src='media/css/icons/icon_link_intern.gif';
		if (link)
			link.className='';
	}
}

/* --------------------------------------------------------------------------------------
 * FUNCTION addToFavorites()
 * --------------------------------------------------------------------------------------
 * Sets a new bookmark.
 * Author: re-lounge, http://www.re-lounge.com
 */
function addToFavorites(title,href) {
	// Get-Variable entfernen
	if (href.indexOf("?")>=0)
		href = href.substring(0,href.indexOf("?"));
	if (document.all) {
		window.external.AddFavorite(href,title);
	} else if (window.sidebar && window.sidebar.addPanel) {
		return true;
	} else if( window.opera && window.print ) {
		return true;
	} else {
		return false;
	}
	return false;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function machfenster()
{
   w = window.open('about:blank', 'MeinFenster', 'width=450,height=400');
   w.focus();
}

var today= new Date()
sec=Date.UTC(today.getYear(), today.getMonth(), today.getDate())
var tomorrow=new Date(sec+126000000)
year=today.getYear()
  if(year < 1900) year+=1900;
nextyear=tomorrow.getYear()
  if(nextyear < 1900) nextyear+=1900;
  if(nextyear < 1900) nextyear+=1900;

function Monat(m){
if (m==0) return "Jan."
if (m==1) return "Feb."
if (m==2) return "März"
if (m==3) return "Apr."
if (m==4) return "Mai"
if (m==5) return "Juni"
if (m==6) return "Juli"
if (m==7) return "Aug."
if (m==8) return "Sep."
if (m==9) return "Okt."
if (m==10) return "Nov."
if (m==11) return "Dez."
}

function Monat_en(m){
if (m==0) return "Jan."
if (m==1) return "Feb."
if (m==2) return "Mar."
if (m==3) return "Apr."
if (m==4) return "May"
if (m==5) return "June"
if (m==6) return "July"
if (m==7) return "Aug."
if (m==8) return "Sep."
if (m==9) return "Oct."
if (m==10) return "Nov."
if (m==11) return "Dec."
}

function Monat2(m){
if (m==0) return "01"
if (m==1) return "02"
if (m==2) return "03"
if (m==3) return "04"
if (m==4) return "05"
if (m==5) return "06"
if (m==6) return "07"
if (m==7) return "08"
if (m==8) return "09"
if (m==9) return "10"
if (m==10) return "11"
if (m==11) return "12"
}


function dayNr(m){
if (m==1) return "01"
if (m==2) return "02"
if (m==3) return "03"
if (m==4) return "04"
if (m==5) return "05"
if (m==6) return "06"
if (m==7) return "07"
if (m==8) return "08"
if (m==9) return "09"
if (m==10) return "10"
if (m==11) return "11"
if (m==12) return "12"
if (m==13) return "13"
if (m==14) return "14"
if (m==15) return "15"
if (m==16) return "16"
if (m==17) return "17"
if (m==18) return "18"
if (m==19) return "19"
if (m==20) return "20"
if (m==21) return "21"
if (m==22) return "22"
if (m==23) return "23"
if (m==24) return "24"
if (m==25) return "25"
if (m==26) return "26"
if (m==27) return "27"
if (m==28) return "28"
if (m==29) return "29"
if (m==30) return "30"
if (m==31) return "31"
}


function getValue()
{

var z=document.searchForm.dday.value;
var q=document.searchForm.dmonth.value;

var x=document.searchForm.rday.value;
var y=document.searchForm.rmonth.value;

var l="2008";
//var l= getFullYear();
var m="2009";
//var m= getFullYear()+1;

var current_m=1;

if((q<current_m)&&(y<current_m))
{
document.searchForm.arrival.value=z+"."+q+"."+m;
document.searchForm.departure.value=x+"."+y+"."+m;
}
else if((q<current_m)&&(y>=current_m))
{
document.searchForm.arrival.value=z+"."+q+"."+m;
document.searchForm.departure.value=x+"."+y+"."+l;
}
else if((q>=current_m)&&(y>=current_m))
{
document.searchForm.arrival.value=z+"."+q+"."+l;
document.searchForm.departure.value=x+"."+y+"."+l;
}
else if((q>=current_m)&&(y<current_m))
{
document.searchForm.arrival.value=z+"."+q+"."+l;
document.searchForm.departure.value=x+"."+y+"."+m;
}

}

            var alert1="Please enter a valid date.";
            var alert2="The date selected is invalid, please check the dates.";
            var alert3="Please enter a valid departure date.";
            var alert4="Please enter or select a departure / arrival";
            var ord="312999138";
            var month1="Jan";var month2="Feb";var month3="Mar";var month4="Apr";var month5="Mai";var month6="Jun";var month7="Jul";var month8="Aug";var month9="Sep";var month10="Okt";var month11="Nov";var month12="Dez";var day1="S";var day2="M";var day3="T";var day4="W";var day5="T";var day6="F";var day7="S";
            var todayLabel="Today";
            var Sun="Sun";
            var Mon="Mon";
            var Tue="Tue";
            var Wed="Wed";
            var Thu="Thu";
            var Fri="Fri";
            var Sat="Sat";

DayName = new Array("Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag");


function setdatum () {

Berechnen();
if (document.schnellreservierung.anreise.value == "") {
	document.schnellreservierung.anreise.value = DateString;
	document.schnellreservierung.abreise.value = DateStringTommorow;
  }
}

function Berechnen()
{
 var SystemDate = new Date();
 var Day = SystemDate.getDate();
 var MonthNow = SystemDate.getMonth() + 1;
 var YearNow = SystemDate.getFullYear();
 var HoursNow = SystemDate.getHours();
 var MinuteNow = SystemDate.getMinutes();
 var Seconds = SystemDate.getSeconds();
 var DayOfWeek = SystemDate.getDay();
 DOW = SystemDate.getDay();
 var Day2;
 var MonthNow2;
 var YearNow2;
 var setDateVar = 0;

 // für zweistellige Anzeige
 var firstDay  = ((Day < 10) ? "0" : "");
 var firstMonth  = ((MonthNow < 10) ? ".0" : ".");
 var firstHour  = ((HoursNow < 10) ? "0" : "");
 var firstMinute  = ((MinuteNow < 10) ? ":0" : ":");
 var firstSecond  = ((Seconds < 10) ? ":0" : ":");

 // aktuelles Datum
 DateString= firstDay + Day + firstMonth + MonthNow  + "." + YearNow;
if(Day == '31' && MonthNow == '01') {Day2 = '01'; MonthNow2 = '02'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '28' && MonthNow == '02') {Day2 = '01'; MonthNow2 = '03'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '31' && MonthNow == '03') {Day2 = '01'; MonthNow2 = '04'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '30' && MonthNow == '04') {Day2 = '01'; MonthNow2 = '05'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '31' && MonthNow == '05') {Day2 = '01'; MonthNow2 = '06'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '30' && MonthNow == '06') {Day2 = '01'; MonthNow2 = '07'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '31' && MonthNow == '07') {Day2 = '01'; MonthNow2 = '08'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '31' && MonthNow == '08') {Day2 = '01'; MonthNow2 = '09'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '30' && MonthNow == '09') {Day2 = '01'; MonthNow2 = '10'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '31' && MonthNow == '10') {Day2 = '01'; MonthNow2 = '11'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '30' && MonthNow == '11') {Day2 = '01'; MonthNow2 = '12'; YearNow2 = YearNow;  setDateVar = 1}
if(Day == '31' && MonthNow == '12') {Day2 = '01'; MonthNow2 = '01'; YearNow2 = (YearNow + 1);  setDateVar = 1}
 
 if(setDateVar == 0) DateStringTommorow = DateStringTommorow= firstDay + (Day +1) + firstMonth + MonthNow  + "." + YearNow;
 else DateStringTommorow= firstDay + Day2 + firstMonth + MonthNow2  + "." + YearNow2;
 // aktuelle Zeit
 TimeString= firstHour + HoursNow + firstMinute + MinuteNow + firstSecond + Seconds;
 // Wochentag Datum Zeit
 WholeString = DayName[DayOfWeek] + " " + DateString + " &nbsp;" + TimeString;
}


function check2(anreise, abreise, personen, zimmer, lang) {
	 
	 anreise=anreise.toString();
	 abreise=abreise.toString();
	  
	 anreise=anreise.split(".");
	 abreise=abreise.split(".");
     
	 if (!anreise[0] || !anreise[1] || !anreise[2]) {
	 	var erroranreise = true;
	 }
	 
	 else if (!abreise[0] || !abreise[1] || !abreise[2]) {
	 	var errorabreise = true;
	 }
	 else {
		 if (anreise[0].length==1) anreise[0]="0"+anreise[0];
		 if (abreise[0].length==1) abreise[0]="0"+abreise[0];
		 
		 if (anreise[1].length==1) anreise[1]="0"+anreise[1];
		 if (abreise[1].length==1) abreise[1]="0"+abreise[1];
		 
		 if (anreise[2].length==2) anreise[2]="20"+anreise[2];
		 if (abreise[2].length==2) abreise[2]="20"+abreise[2];
		 
		 anreisestring = anreise[2]+anreise[1]+anreise[0];
		 abreisestring = abreise[2]+abreise[1]+abreise[0];
	
		 var heute = new Date();
		 heutetag = heute.getDate();
		 heutetag = heutetag.toString();
		 if (heutetag.length==1) heutetag="0"+heutetag;
		 heutemonat = heute.getMonth() + 1;
		 heutemonat = heutemonat.toString();
		 if (heutemonat.length==1) heutemonat="0"+heutemonat;
		 kontrolldatum = heute.getFullYear().toString()+heutemonat+heutetag;
		
		 if (anreisestring < kontrolldatum) {
			var erroranreise = true;
		 }
		 
		 if (abreisestring < kontrolldatum || abreisestring <= anreisestring) {
			var errorabreise = true;
		 }
		 
		 if (anreisestring.length != 8) {
		 	var erroranreise = true;
		 }
		 
		 if (abreisestring.length != 8) {
		 	var errorabreise = true;
		 }
	 }
	 
	 if (erroranreise == true) {
	 	
		// alert('Bitte überprüfen Sie Ihr Anreisedatum');
		document.getElementById('f_date_c1').className = 'select1';
		document.getElementById('pfeilf_date_c1').style.visibility = 'visible';
		document.getElementById('f_date_c1').focus();
	 }
	 
	 else if (errorabreise == true) {
	 	
		// alert('Bitte überprüfen Sie Ihr Abreisedatum');
		document.getElementById('f_date_c2').className = 'select1';
		document.getElementById('pfeilf_date_c2').style.visibility = 'visible';
		document.getElementById('f_date_c2').focus();
	 }
	 else {
	 	 
		 document.getElementById('f_date_c1').className = 'select1';
		 document.getElementById('pfeilf_date_c1').style.visibility = 'hidden';
		 document.getElementById('f_date_c2').className = 'select1';
		 document.getElementById('pfeilf_date_c2').style.visibility = 'hidden';
		 
		 anreisestring = anreise[0]+anreise[1]+anreise[2];
		 abreisestring = abreise[0]+abreise[1]+abreise[2];
		 
		 if (lang == 'en') window.open(zielurl = 'https://secure.webres.net/webres/zimmer4/default.asp?LANG=GB&HID=7483&WDBL='+anreisestring+'x'+abreisestring+'x'+zimmer+'x'+personen+'','webres',"screenY=210,screenX=640,width=780px,height=549px,left=100,top=100,toolbar=no,status=yes,scrollbars=no,resizable=no");
		 else window.open(zielurl = 'https://secure.webres.net/webres/zimmer4/default.asp?LANG=D&HID=7483&WDBL='+anreisestring+'x'+abreisestring+'x'+zimmer+'x'+personen+'','webres',"screenY=210,screenX=640,width=780px,height=549px,left=100,top=100,toolbar=no,status=yes,scrollbars=no,resizable=no");
	}
}

/*]]*/
