function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function check_form(theForm)
{
	if (theForm.anrede.value == "" )
  	{
 		alert("Geben Sie einen Wert in das Feld \"Anrede\" ein.");
		theForm.anrede.focus();
		return false;
  	}	

	if (theForm.name.value == "" )
  	{
  		alert("Geben Sie einen Wert in das Feld \"Name\" ein.");
		theForm.name.focus();
		return false;
  	}

	if (theForm.vorname.value == "" )
  	{
  		alert("Geben Sie einen Wert in das Feld \"Vorname\" ein.");
		theForm.vorname.focus();
		return false;
  	}	
	
	if (theForm.email.value == "" )
  	{
  		alert("Geben Sie einen Wert in das Feld \"E-Mail\" ein.");
		theForm.email.focus();
		return false;
  	}	

	if (theForm.text.value == "" )
  	{
  		alert("Geben Sie einen Wert in das Feld \"Ihre Nachricht\" ein.");
		theForm.text.focus();
		return false;
  	}		
}

function check_form_lan(theForm, ln)
{
	var a  = ln;
	var t1 = "";
	var t2 = "";
	var t3 = "";
	var t4 = "";

	if (a=="en")
	{
  		t1 = "Please enter your xxxx lastname!";
		t2 = "Please enter a way to contact you. (Email, phone, mobil or fax)";
		t3 = "There is html code in a field, this is not allowed.";
		t4 = "Please enter number of people. (Total Number of People, Adults and/or Children)";
  		t5 = "Please enter Date of Arrival!";
  		t6 = "Please enter Date of Departure!";
	}
	else
	{
  		t1 = "Bitte geben Sie Ihre Nachname ein!";
		t2 = "Bitte geben Sie eine Kontakt Möglichkeit an. (Email, Telefon, Fax oder Email)";
		t3 = "Das Feld enth&auml;lt html-Zeichen, die sind nicht erlaubt.";
		t4 = "Bitte geben Sie Anzahl Personen ein. (Gesamt Anzahl Personen, Erwachsene und /oder Kinder)";
  		t5 = "Bitte geben Sie Ankunftsdatum ein!";
  		t6 = "Bitte geben Sie Abfahrtsdatum ein!";
	}

	if (theForm.kommentar.value != "")
	{
        str=theForm.kommentar.value;
        if(str.match(/([\<])([^\>]{1,})*([\>])/i)==null)
        {
        }
        else
        {
        alert(t3);
		theForm.kommentar.focus();
		return false;
		}
  	}

	if (theForm.nachname.value == "" )
  	{
  		alert(t1);
		theForm.nachname.focus();
		return false;
  	}
  	else
  	{
        str=theForm.nachname.value;
        if(str.match(/([\<])([^\>]{1,})*([\>])/i)==null)
        {
        }
        else
        {
        alert(t3);
		theForm.nachname.focus();
		return false;
		}
  	}	

	if (theForm.email.value == "" && theForm.telefon.value == "" && theForm.handy.value == "" && theForm.fax.value == "")
  	{
  		alert(t2);
		theForm.email.focus();
		return false;
  	}

}




// non-empty textbox

function isEmpty(strng) {
var error = "";
  if (strng.length == 0) {
     error = "The mandatory text area has not been filled in.\n"
  }
return error;	  
}

// was textbox altered

function isDifferent(strng) {
var error = ""; 
  if (strng != "Can\'t touch this!") {
     error = "You altered the inviolate text area.\n";
  }
return error;
}

// exactly one radio button is chosen

function checkRadio(checkvalue) {
var error = "";
   if (!(checkvalue)) {
       error = "Please check a radio button.\n";
    }
return error;
}

// valid selector from dropdown list

function checkDropdown(choice) {
var error = "";
    if (choice == 0) {
    error = "You didn't choose an option from the drop-down list.\n";
    }    
return error;
}    

function changeimage(bild,c)
{
  counter=c;
  document.getElementById('titel').value = tit[counter];
  document.bild.src = img[counter].src;
}

function getDelayTime(dlTime)
{
   var temp = parseInt(dlTime);
   if(temp != NaN)
   delayTime = temp * 500;
   else
   delayTime = 100;
}

function anim()
{
   counter++;
   document.bild.src = img[counter].src;
   document.getElementById('titel').value = tit[counter];
   if(counter == anzahl_bilder)
    counter = 0; //sets the counter value to 0
}

function slide()
{
   with(document.form1)
   {
   start = setInterval('anim()', delayTime);
   stShow.disabled = true;
   spShow.disabled = false;
   }
}

function stopSlide()
{
   clearInterval(start);
   document.form1.stShow.disabled = false;
   document.form1.spShow.disabled = true;
}

var NN3=false;

function on3(name) {
   document[name].src=eval(name+"on.src");
}
function off3(name) {
   document[name].src=eval(name+".src");
}
NN3=true;

function on(name) {
   if (NN3) on3(name);
}
function off(name) {
   if (NN3) off3(name);
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function is_odd( $int )
{
  return( $int & 1 );
}




