// JavaScript Document

/////////////////////////////////////////////////// Navigation ////////////////////////////////////////////////////////////////////////

/////////// Unavi Hover funktion ////////////

// ndern der Farbe bei Hover
function navi(id,nmaxanz,idactive){
	//alert("id="+id+"nmaxanz="+nmaxanz+"idactive="+idactive);
	if( (idactive != "") && (idactive == (id+1)) ) {
		if(id < nmaxanz){
			document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_button_active.gif)";
		}
		else{
			document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_lastbutton_hov.gif)";
		}
		document.getElementById("navi"+id).style.backgroundColor = "#cc0000";
	}
	else{
		if(id < nmaxanz){
			document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_button_after.gif)";
		}
		else{
			document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_lastbutton_hov.gif)";
		}
		document.getElementById("navi"+id).style.backgroundColor = "#cc0000";
	}
	if( (id > 1) ){
		document.getElementById("navi"+id).style.backgroundColor = "#cc0000";
		if( (idactive != "") && (idactive == (id-1)) )
		{
			 document.getElementById("img"+(id-1)).style.backgroundImage = "url(/img/hg_navi_button_active.gif)";	
		}
		else{
			document.getElementById("img"+(id-1)).style.backgroundImage = "url(/img/hg_navi_button_bev.gif)";
		
		}
	}
	if(id == 1){
		document.getElementById("navi_firstbutton").style.backgroundImage = "url(/img/hg_navi_firstbutton_hov.gif)";
		document.getElementById("navi"+id).style.backgroundColor = "#cc0000";
	}
	
}

// Zurcksetzen der Farbe bei Verlassen
function naviout(id,nmaxanz,idactive){
	
	
	if( (id > 1) ){
		document.getElementById("navi"+id).style.backgroundColor = "#8090a7";
		if( (idactive != "") && (idactive == (id+1)) ) {	
			if(id < nmaxanz){
					document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_button_bev.gif)";
				}
				else{
					document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_lastbutton.gif)";	
				}
				document.getElementById("img"+(id-1)).style.backgroundImage = "url(/img/hg_navi_button.gif)";
			}
		else if( (idactive != "") && (idactive == (id-1)) )
		{
			 document.getElementById("img"+(id-1)).style.backgroundImage = "url(/img/hg_navi_button_after.gif)";
			if(id < nmaxanz){
				document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_button.gif)";
			}
			else{
				document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_lastbutton.gif)";	
			}
		}
		else if ( (idactive != "") && (idactive != (id-1)) && (idactive != (id+1)) )
		{															
			document.getElementById("img"+(id-1)).style.backgroundImage = "url(/img/hg_navi_button.gif)";
			if(id < nmaxanz){
				document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_button.gif)";
			}
			else{
				document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_lastbutton.gif)";	
			}
		}
	}
	if(id == 1){

		document.getElementById("navi"+id).style.backgroundColor = "#8090a7";
		document.getElementById("navi_firstbutton").style.backgroundImage = "url(/img/hg_navi_firstbutton.gif)";
		if((idactive != "") && (idactive == (id+1)) ) {
			document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_button_bev.gif)";
		}
		else{
			if(id < nmaxanz)
			{
				document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_button.gif)";
			}
			else
			{
				document.getElementById("img"+id).style.backgroundImage = "url(/img/hg_navi_lastbutton.gif)";
			}
		}
	}
}



////////// Unter-Unavi Hover funktion ////////////

// ndern der Farbe bei Hover
function unavi(id,maxanz,uidactive){

	

	if( (uidactive != "") && (uidactive == (id+1)) ) {
		document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_active.gif)";
		document.getElementById("unavi"+id).style.backgroundColor = "#ffffff";
	}
	else{
		document.getElementById("unavi"+id).style.backgroundColor = "#ffffff";
		if(id < maxanz){
			document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_after.gif)";
			
		}
		else{
			
			document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton_hov.gif)";
			
		}
	}
	if(id > 1){
		 document.getElementById("unavi"+id).style.backgroundColor = "#ffffff";
		if( (uidactive != "") && (uidactive == (id-1)) )
		{
			 document.getElementById("uimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button_active.gif)";
		}
		else{
			document.getElementById("uimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button_bev.gif)";
		}
	}
	if(id == 1){
		document.getElementById("unavi_firstbutton").style.backgroundImage = "url(/img/hg_unavi_firstbutton_hov.gif)";
		document.getElementById("unavi"+id).style.backgroundColor = "#ffffff";
	}
}

// Zurcksetzen der Farbe bei Verlassen
function unaviout(id,maxanz,uidactive){
	
	if( (id > 1) ){
		document.getElementById("unavi"+id).style.backgroundColor = "#8090a7";
		if( (uidactive != "") && (uidactive == (id+1)) ) {	
			document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_bev.gif)";
			document.getElementById("uimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
		}
		else if( (uidactive != "") && (uidactive == (id-1)) )
		{
			 document.getElementById("uimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button_after.gif)";
			 document.getElementById("unavi"+id).style.backgroundColor = "#8090a7";
			 if(id < maxanz){
			 	document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
			 }
			 else{
			 	document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton.gif)";
			 }
		}
		else if ( (uidactive != "") && (uidactive != (id-1)) && (uidactive != (id+1)) ){
			if(uidactive == id)
			{
				document.getElementById("uimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button_bev.gif)";
				document.getElementById("unavi"+id).style.backgroundColor = "#ffffff";
				if(id != maxanz){
					document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_active.gif)";
				 }
				 else{
					
					document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton_hov.gif)";
				 }
			}
			else
			{
				document.getElementById("uimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
				document.getElementById("unavi"+id).style.backgroundColor = "#8090a7";
				if(id != maxanz){
					document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
				 }
				 else{
					
					document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton.gif)";
				 }
			}
		}
	}
	if(id == 1){
		
		if((uidactive != "") && (uidactive == (id+1)) ) {
			document.getElementById("unavi_firstbutton").style.backgroundImage = "url(/img/hg_unavi_firstbutton.gif)";
			document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_bev.gif)";
			document.getElementById("unavi"+id).style.backgroundColor = "#8090a7";
		}
		else{
			if(uidactive == id)
			{
				document.getElementById("unavi_firstbutton").style.backgroundImage = "url(/img/hg_unavi_firstbutton_hov.gif)";
				document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_after.gif)";
				document.getElementById("unavi"+id).style.backgroundColor = "#ffffff";
				if(id == maxanz){
					document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton_hov.gif)";
				}
			}
			else
			{
				document.getElementById("unavi_firstbutton").style.backgroundImage = "url(/img/hg_unavi_firstbutton.gif)";
				document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
				document.getElementById("unavi"+id).style.backgroundColor = "#8090a7";
				if(id == maxanz){
					document.getElementById("uimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton.gif)";
				}
			}
		}
	}
}


////////// Typnavi bei Area suche Hover funktion ////////////

// ndern der Farbe bei Hover
function uunavi(id,maxanz,uidactive){

	

	if( (uidactive != "") && (uidactive == (id+1)) ) {
		document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_active.gif)";
		document.getElementById("uunavi"+id).style.backgroundColor = "#ffffff";
	}
	else{
		document.getElementById("uunavi"+id).style.backgroundColor = "#ffffff";
		if(id < maxanz){
			document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_after.gif)";
			
		}
		else{
			
			document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton_hov.gif)";
			
		}
	}
	if(id > 1){
		 document.getElementById("uunavi"+id).style.backgroundColor = "#ffffff";
		if( (uidactive != "") && (uidactive == (id-1)) )
		{
			 document.getElementById("uuimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button_active.gif)";
		}
		else{
			document.getElementById("uuimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button_bev.gif)";
		}
	}
	if(id == 1){
		document.getElementById("uunavi_firstbutton").style.backgroundImage = "url(/img/hg_unavi_firstbutton_hov.gif)";
		document.getElementById("uunavi"+id).style.backgroundColor = "#ffffff";
	}
}

// Zurcksetzen der Farbe bei Verlassen
function uunaviout(id,maxanz,uidactive){
	
	if( (id > 1) ){
		document.getElementById("uunavi"+id).style.backgroundColor = "#8090a7";
		if( (uidactive != "") && (uidactive == (id+1)) ) {	
			document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_bev.gif)";
			document.getElementById("uuimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
		}
		else if( (uidactive != "") && (uidactive == (id-1)) )
		{
			 document.getElementById("uuimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button_after.gif)";
			 document.getElementById("uunavi"+id).style.backgroundColor = "#8090a7";
			 if(id < maxanz){
			 	document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
			 }
			 else{
			 	document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton.gif)";
			 }
		}
		else if ( (uidactive != "") && (uidactive != (id-1)) && (uidactive != (id+1)) ){
			document.getElementById("uuimg"+(id-1)).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
			document.getElementById("uunavi"+id).style.backgroundColor = "#8090a7";
			if(id != maxanz){
			 	document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
			 }
			 else{
			 	document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton.gif)";
			 }
		}
	}
	if(id == 1){
		document.getElementById("uunavi_firstbutton").style.backgroundImage = "url(/img/hg_unavi_firstbutton.gif)";
		if((uidactive != "") && (uidactive == (id+1)) ) {
			document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_button_bev.gif)";
			document.getElementById("uunavi"+id).style.backgroundColor = "#8090a7";
		}
		else{
			document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_button.gif)";
			document.getElementById("uunavi"+id).style.backgroundColor = "#8090a7";
			if(id == maxanz){
				document.getElementById("uuimg"+id).style.backgroundImage = "url(/img/hg_unavi_lastbutton.gif)";
			}
		}
	}
}


/////////// Contentnavi hover funktion ////////////

// ndern der Farbe bei Hover
function contentnavi(id,cmaxanz,cidactive){
	
	
	if( (cidactive != "") && (cidactive == (id+1)) ) {
		document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_active.gif)";
		document.getElementById("cnavi"+id).style.backgroundColor = "#ffffff";
	}
	else{
		document.getElementById("cnavi"+id).style.backgroundColor = "#ffffff";
		if(id < cmaxanz){
			document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_after.gif)";	
		}
		else{
			document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton_hov.gif)";
		}
	}
	if(id > 1){
		 document.getElementById("cnavi"+id).style.backgroundColor = "#ffffff";
		if( (cidactive != "") && (cidactive == (id-1)) )
		{
			 document.getElementById("cimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button_active.gif)";
		}
		else{
			document.getElementById("cimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button_bev.gif)";
		}
	}
	if(id == 1){
		document.getElementById("cnavi_firstbutton").style.backgroundImage = "url(/img/hg_cnavi_fistbutton_hov.gif)";
		document.getElementById("cnavi"+id).style.backgroundColor = "#ffffff";
	}
}
	

// Zurcksetzen der Farbe bei Verlassen
function contentnaviout(id,cmaxanz,cidactive){
if( (id > 1) ){
		document.getElementById("cnavi"+id).style.backgroundColor = "#8090a7";
		if( (cidactive != "") && (cidactive == (id+1)) ) {	
			if(id < cmaxanz){
				document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_bev.gif)";
			}
			else{
				document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton.gif)";
			}
			document.getElementById("cimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
		}
		else if( (cidactive != "") && (cidactive == (id-1)) )
		{
			document.getElementById("cimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button_after.gif)";
			document.getElementById("cnavi"+id).style.backgroundColor = "#8090a7";
			if(id < cmaxanz){
				document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			}
			else{
				document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton.gif)";
			}
		}
		else if ( (cidactive != "") && (cidactive != (id-1)) && (cidactive != (id+1)) ){
			document.getElementById("cimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			document.getElementById("cnavi"+id).style.backgroundColor = "#8090a7";
			if(id < cmaxanz){
				document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			}
			else{
				document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton.gif)";
			}
		}
	}
	if(id == 1){
		document.getElementById("cnavi_firstbutton").style.backgroundImage = "url(/img/hg_cnavi_fistbutton.gif)";
		if((cidactive != "") && (cidactive == (id+1)) ) {
			document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_bev.gif)";
			document.getElementById("cnavi"+id).style.backgroundColor = "#8090a7";
		}
		else{
			document.getElementById("cimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			document.getElementById("cnavi"+id).style.backgroundColor = "#8090a7";
		}
	}
}

/////////// IMGnavi hover funktion ////////////

// ndern der Farbe bei Hover
function imgnavi(id,imaxanz,iidactive){
	
	
	if( (iidactive != "") && (iidactive == (id+1)) ) {
		document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_active.gif)";
		document.getElementById("inavi"+id).style.backgroundColor = "#ffffff";
	}
	else{
		document.getElementById("inavi"+id).style.backgroundColor = "#ffffff";
		if(id < imaxanz){
			document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_after.gif)";	
		}
		else{
			document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton_hov.gif)";
		}
	}
	if(id > 1){
		 document.getElementById("inavi"+id).style.backgroundColor = "#ffffff";
		if( (iidactive != "") && (iidactive == (id-1)) )
		{
			 document.getElementById("iimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button_active.gif)";
		}
		else{
			document.getElementById("iimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button_bev.gif)";
		}
	}
	if(id == 1){
		document.getElementById("inavi_firstbutton").style.backgroundImage = "url(/img/hg_cnavi_fistbutton_hov.gif)";
		document.getElementById("inavi"+id).style.backgroundColor = "#ffffff";
	}
}
	

// Zurcksetzen der Farbe bei Verlassen
function imgnaviout(id,imaxanz,iidactive){
if( (id > 1) ){
		document.getElementById("inavi"+id).style.backgroundColor = "#8090a7";
		if( (iidactive != "") && (iidactive == (id+1)) ) {	
			if(id < cmaxanz){
				document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_bev.gif)";
			}
			else{
				document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton.gif)";
			}
			document.getElementById("iimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
		}
		else if( (iidactive != "") && (iidactive == (id-1)) )
		{
			document.getElementById("iimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button_after.gif)";
			document.getElementById("inavi"+id).style.backgroundColor = "#8090a7";
			if(id < imaxanz){
				document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			}
			else{
				document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton.gif)";
			}
		}
		else if ( (iidactive != "") && (iidactive != (id-1)) && (iidactive != (id+1)) ){
			document.getElementById("iimg"+(id-1)).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			document.getElementById("inavi"+id).style.backgroundColor = "#8090a7";
			if(id < imaxanz){
				document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			}
			else{
				document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_lastbutton.gif)";
			}
		}
	}
	if(id == 1){
		document.getElementById("inavi_firstbutton").style.backgroundImage = "url(/img/hg_cnavi_fistbutton.gif)";
		if((iidactive != "") && (iidactive == (id+1)) ) {
			document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button_bev.gif)";
			document.getElementById("inavi"+id).style.backgroundColor = "#8090a7";
		}
		else{
			document.getElementById("iimg"+id).style.backgroundImage = "url(/img/hg_cnavi_button.gif)";
			document.getElementById("inavi"+id).style.backgroundColor = "#8090a7";
		}
	}
}
///////////////////////////////////////////////////// Navigation Ende /////////////////////////////////////////////////////////////////
													  

//////// Preisberechner öffnen /////////


function pwalid(boat){
window.open('/preisvalidator.php?boat='+boat,'edit','scrollbars=no,location=no,menubar=yes,resizable=yes,width=450,height=480');	
}

// Validate funktionen /////////////

// Email-Adresse berprfung
function echeck(str) {
		
	var falschemail = "Bitte eine gltige Email-Adresse eingeben."
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1){
	   document.getElementById("info").innerHTML = falschemail;
	   return false
	}

	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
	   document.getElementById("info").innerHTML = falschemail;
	   return false
	}

	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		 document.getElementById("info").innerHTML = falschemail;
		return false
	}

	 if (str.indexOf(at,(lat+1))!=-1){
		document.getElementById("info").innerHTML = falschemail;
		return false
	 }

	 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		document.getElementById("info").innerHTML = falschemail;
		return false
	 }

	 if (str.indexOf(dot,(lat+2))==-1){
		document.getElementById("info").innerHTML = falschemail;
		return false
	 }
	
	 if (str.indexOf(" ")!=-1){
		document.getElementById("info").innerHTML = falschemail;
		return false
	 }

	 return true					
}
	
	
// Telefonnummerberprfung

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()-/ ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

// öffent hilfepopup
function open_window(file)
{
	window.open('/'+file,'edit','scrollbars=yes,location=no,menubar=no,resizable=yes,width=600,height=500');	
}

// booking auswahl raidobutton mit extraanzeige
function extraon(boot){
	document.getElementById("extra_"+boot).style.display = "block";
}

function extraoff(boot,jahr){

	do_off = true;
	for(x=1; x<53; x++)
	{
		if(x<10)
		{
			woche = "0"+x;
		}else
		{
			woche = x;
		}
		
		var element = document.getElementsByName(boot+"_"+woche+"_"+jahr)[0];

		if(element)
		{
			if(element.checked == true)
			{
				do_off = false;
			}
		}
	}
	if(do_off == true)
	{
		document.getElementById("extra_"+boot).style.display = "none";
	}
}

// zeige dateum wenn kunde genaues start/end datum angeben will
function showdate(boot)
{
	document.getElementById("selectdate_"+boot).style.display = "block";
}
function selectday(day,art,boot)
{
	for(x=1;x<8;x++)
	{
		
		element = document.getElementById("w"+art+"_"+boot+"_"+x);
		if(element)
		{
			element.style.color = "#009933";
		}
	}
	document.getElementById("w"+art+"_"+boot+"_"+day).style.color = "#990000";
	if(art == "s")
	{
		inpname = "newstart";	
	}
	else if(art == "e")
	{
		inpname = "newend";	
	}

	document.bookart.elements[inpname+"_"+boot].value = day;
}

function close_selday(boot){
	document.getElementById("selectdate_"+boot).style.display = "none";
}
function rank(id){

		if(document.getElementById("ranking_"+id).src.indexOf("ranking_star_empty.gif") > -1)
		{
			document.getElementById("ranking_"+id).src = "/img/ranking_star.gif";
			document.ranking.rank.value++;
		}
		else
		{
			document.getElementById("ranking_"+id).src = "/img/ranking_star_empty.gif";
			document.ranking.rank.value--;
		}
	}
function titletag(tag) {
	document.title= "SOLsailing Charter - "+tag;
}

var ipos=0;
var spos=0;
var ipos2=0;
var spos2=0;
var max = 1500; // 2000-500 

function uscroll(dir) {
    if (dir == 'l') {
    	spos-=180; if (spos < 0) { spos=0; }
    }
    else if (dir == 'r') {
    	spos += 180;
    	if (spos > max) { spos = max; }
    }
    act = window.setInterval("douscroll()",50);
}

function u2scroll(dir) {
    if (dir == 'l') {
    	spos2-=180; if (spos2 < 0) { spos2=0; }
    }
    else if (dir == 'r') {
    	spos2 += 180;
    	if (spos2 > max) { spos2 = max; }
    }    
    act2 = window.setInterval("dou2scroll()",50);
}

function douscroll() {
if (ipos < spos) {
	if ((ipos+20) < spos) { ipos+=20; }
	else { ipos++; }
}
else if (ipos > spos) {
	if ((ipos-20) > spos) { ipos-=20; }
	else { ipos--; }
}
else { window.clearInterval(act); }
document.getElementById("uunavi").scrollLeft=ipos;
}


function dou2scroll() {
if (ipos2 < spos2) {
	if ((ipos2+20) < spos2) { ipos2+=20; }
	else { ipos++; }
}
else if (ipos2 > spos2) {
	if ((ipos2-20) > spos2) { ipos2-=20; }
	else { ipos2--; }
}
else { window.clearInterval(act2); }
document.getElementById("uu2navi").scrollLeft=ipos2;
}



