//Contents of this file are Copyright,loss.de - Webdesign und Programmierung / 02-10-2007
//
// 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.

/*
if(screen.width==800 && screen.height==600)
{
document.write("<style>body {font-size:50%}</style>");
}
else if(screen.width==1024 && screen.height==768)
{
document.write("<style>body {font-size:65%}</style>");
}
else if(screen.width==1280 && screen.height==1024)
{
document.write("<style>body {font-size:80%}</style>"); //80%
}
else if(screen.width==1600 && screen.height==1280)
{
document.write("<style>body {font-size:95%}</style>"); //95%
}
else
{
document.write("<style>body {font-size:50%}</style>");
}*/

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="/shiprepair/images/einstieg/"+img + ".jpg";
}


function msout(Name,img)
{
document[Name].src="/shiprepair/images/einstieg/"+img + ".jpg";
}


////////////////////////////////////////////////////////////////
//
// Beschreibung: Kontaktformular
//
////////////////////////////////////////////////////////////////

function form_test(theForm)
{

if (theForm.Name.value == "")
  {    
    alert("Bitte geben Sie Ihren Namen an!\nPlease enter your name!");    
    theForm.Name.focus();
    return (false);
  }

if (theForm.Phone.value == "")
  {    
    alert("Bitte geben Sie Ihre Telefon-Nummer an!\nPlease enter your phone number!");    
    theForm.Phone.focus();
    return (false);
  }
  
if (theForm.email.value == "")
  {    
    alert("Bitte geben Sie Ihre E-Mail-Adresse an!\nPlease enter your email address!");    
    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!");    
    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");    
    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!");
   theForm.email.select();
   theForm.email.focus();
   return (false);
  }

  return (true);
}