function preloadImages()
{
  if(document.images)
  {
    if(!document.imageArray) document.imageArray = new Array();
    var i,j = document.imageArray.length, args = preloadImages.arguments;
    
    for(i=0; i<args.length; i++)
    {
      if (args[i].indexOf("#")!=0)
      {
        document.imageArray[j] = new Image;
        document.imageArray[j++].src = basePath + "images/"+args[i];
      }
    }
  }
}

function openBooking(url)
{
	b=window.open(url, "buchen", "width=780, height=725, scrollbars=yes, toolbar=no, location=no, status=no, resizable=yes, top=25, left=25");
	b.focus();
}

function openNewsletter()
{
	n = window.open(basePath + "newsletter.php", "newsletter", "width=450, height=312, scrollbars=yes, toolbar=no, location=no, status=no, resizable=yes, top=80, left=80");
	n.focus();
}

function openAGB()
{
	a = window.open(basePath + "agb.php", "agb", "width=450, height=600, scrollbars=yes, toolbar=no, location=no, status=no, resizable=yes, top=80, left=80");
	a.focus();
}


function openDatenschutz()
{
	d = window.open(basePath + "datenschutz.php", "datenschutz", "width=450, height=600, scrollbars=yes, toolbar=no, location=no, status=no, resizable=yes, top=80, left=80");
	d.focus();
}


function rollOverDestination(d)
{
	d.style.backgroundPosition = "-265 0";	
}

function rollOutDestination(d)
{
	d.style.backgroundPosition = "0 0"	
}

function rollOverReise(r)
{
	r.style.backgroundColor = "#F3F6F9";	
}

function rollOutReise(r)
{
	r.style.backgroundColor = "#FFFFFF";
}


function rollOverPro(d)
{
	d.style.backgroundPosition = "-263 0";	
}

function rollOutPro(d)
{
	d.style.backgroundPosition = "0 0"	
}

function isblank(s) 
{
	for(var i = 0; i < s.length; i++) 
	{
		var c = s.charAt(i);
		if ((c != ' ') && (c != '\n') && (c != '\t'))
			return false;
	}
	return true;
}

function isEmpty(f)
{
	if (f.value == null || f.value == "" || isblank(f.value))
		return true;
	else
		return false;
}

function KFabsenden() 
{
	var vStatus = true;

	vMsg = "Bitte füllen Sie die folgenden Felder aus:\n\n";
	//Personal Data Section
	if (isEmpty(document.frm.name))
	{
		vStatus = false;
		vMsg += "- Ihr Name\n";			
	}
	if (isEmpty(document.frm.email))
	{
		vStatus = false;
		vMsg += "- Ihre E-Mail\n";			
	}
	if (isEmpty(document.frm.betreff))
	{
		vStatus = false;
		vMsg += "- Betreff\n";			
	}
	if (isEmpty(document.frm.nachricht))
	{
		vStatus = false;
		vMsg += "- Ihre Nachricht\n";			
	}
	
	if (vStatus)
		document.frm.submit();
	else
		alert (vMsg);
}


function showInfoBox()
{
	document.getElementById('infoBox').innerHTML = "Nach diesem Datum ist eine Anmeldung nur mehr nach Verfügbarkeit möglich. Bitte kontaktieren Sie uns!";
	document.getElementById('infoBox').style.visibility = "visible";
}

function getMouse(e)
{
	var x;
	var y;
	if (navigator.appName=="Microsoft Internet Explorer" || navigator.appName=="Opera"){
		x = window.event.x-110;
		y = window.event.y+5;
    }
	if (navigator.appName=="Netscape"){
		x = e.screenX-100;
		y = e.screenY-110;
    }
    x =  x + document.body.scrollLeft;
    y =  y + document.body.scrollTop;
	document.getElementById('infoBox').style.left = x;
    document.getElementById('infoBox').style.top  = y;
}

function hideInfoBox()
{
    document.getElementById('infoBox').style.visibility = "hidden";
}

