//Contents of this file are Copyright,loss.de - Webdesign und Programmierung / 02-07-2008
//
// Diese Software ist urheberrechtlich geschützt. 
// Es ist verboten, den Source Code zu veränden,
// sowie die Software mehr als lizensiert zu nutzen. 
// Zuwiderhandlungen werden strafrechtlich verfolgt.

////////////////////////////////////////////////////////////////
//
// Beschreibung: Popup 3 mit feste Breite und Höhe
//
////////////////////////////////////////////////////////////////

function openPopup3(mypage)
{
var win=null;
var scroll='yes';
var w=800;
var h=500;
var myname='printing';

breite=screen.width;
hoehe=screen.height;
LeftPosition=breite/2-w/2;
TopPosition=hoehe/2-h/2;

settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
if (win.focus) win.focus()
}

////////////////////////////////////////////////////////////////
//
// Beschreibung: Popup 4 mit Breiten und Höhen Angabe
//
////////////////////////////////////////////////////////////////

function openPopup4(mysite,wi,he,scrollen)
{
breite1=screen.width;
hoehe1=screen.height;
LeftPosition1=breite1/2-wi/2;
TopPosition1=hoehe1/2-he/2;

setting='width='+wi+',height='+he+',top='+TopPosition1+',left='+LeftPosition1+',scrollbars='+scrollen+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
openwin=window.open(mysite,'popup4',setting);
if (openwin.focus) openwin.focus()
}



var noflashtext = "Für diesen Flash-Film ist eine<br> neuere Version des Flash Players erforderlich.<br> Möchten Sie den Flash Player jetzt herunterladen?<br><br><a href='http://www.macromedia.com/go/getflashplayer'>Download</a>";

function MM_preloadImages() 
{ //v1.2
  if (document.images)
 {
    var imgFiles = MM_preloadImages.arguments;
    var preloadArray = new Array();
    for (var i=0; i<imgFiles.length; i++)
   {
      preloadArray[i] = new Image;
      preloadArray[i].src = imgFiles[i];
    }
  }
}



function msover(Name,img)
{
document[Name].src="/tilse/images/"+img + ".jpg";
}


function msout(Name,img)
{
document[Name].src="/tilse/images/"+img + ".jpg";
}


////////////////////////////////////////////////////////////////
//
// Beschreibung: Kontaktformular
//
////////////////////////////////////////////////////////////////

function form_test(theForm)
{

if (theForm.Nachname.value == "")
  {    
    alert("Bitte geben Sie Ihren Namen an!\nPlease enter your surname!\n¡Indique su nombre!");    
    theForm.Nachname.focus();
    return (false);
  }

if (theForm.Telefon.value == "")
  {    
    alert("Bitte geben Sie Ihre Telefon-Nummer an!\nPlease enter your phone number!\n¡Indique su número de teléfono!");    
    theForm.Telefon.focus();
    return (false);
  }
  
if (theForm.email.value == "")
  {    
    alert("Bitte geben Sie Ihre E-Mail-Adresse an!\nPlease enter your email address!\n¡Indique su dirección E-Mail!");    
    theForm.email.focus();
    return (false);
  }
else if (theForm.email.value.search(/ /)!= '-1')
  {    
    alert("Bitte geben Sie Ihre E-Mail-Adresse ohne Leerzeichen an!\nPlease enter your email address without spaces!\n¡Indique su dirección E-Mail sin espacios!");    
    theForm.email.focus();
    return (false);
  }

s=theForm.email.value.split(/@/);

if((s.length !=2) || s[0]=='' || s[1]=='')
  {    
    alert("E-Mail-Adressen haben das Format \"Benutzername@Domainname\"\nEmail addresses should have the following format: username@domainname\nLas direcciones E-Mail deben presentar el formato Nombre de usuario@Nombre de dominio");    
    theForm.email.focus();
    return (false);
  }

if
   (theForm.email.value.indexOf('@')=='-1' || theForm.email.value.indexOf('.')=='-1')
  {
   alert("Bitte überprüfen Sie Ihre E-Mail-Adresse!\nPlease check your email address!\n¡Compruebe su dirección E-Mail!");
   theForm.email.select();
   theForm.email.focus();
   return (false);
  }

  return (true);
}