//Contents of this file are Copyright,loss.de - Webdesign und Programmierung / 17-02-2003
//
// 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=no,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()
}

////////////////////////////////////////////////////////////////
//
// Beschreibung: Popup 5 mit feste Breite und Höhe
//
////////////////////////////////////////////////////////////////

function openPopup5(mypage)
{
var win=null;
var scroll='no';
var w=600;
var h=520;
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=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
if (win.focus) win.focus()
}

////////////////////////////////////////////////////////////////
//
// Beschreibung: Seite nicht im Frame
//
////////////////////////////////////////////////////////////////

function ControlCheck()
{
if(top.frames.length == 0)
{
document.write('<a href="http://www.rnkeo.de" class=noFramesCheck>Homepage</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/reederei_nord/en/imprint.php" class=noFramesCheck>Imprint</a>');
}
else
{}
}

////////////////////////////////////////////////////////////////
//
// Beschreibung: Drucken
//
////////////////////////////////////////////////////////////////

var bvers=navigator.appVersion;
var buA=navigator.userAgent.toLowerCase();
var mac= buA.indexOf("mac") != -1;
var win= buA.indexOf("win") != -1;
var ie= buA.indexOf("msie") != -1;
var ie3=buA.indexOf("msie 3") != -1;
var ie4=buA.indexOf("msie 4") != -1;
var ie5=buA.indexOf("msie 5") != -1;
var ms5less=((ie5 || ie4 || ie3) && win);

if (document.all && !window.print)
document.writeln ('<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>');

function printer()
{
if (window.print)
document.write ('<a onfocus="this.blur()" href="javascript:window.print()" class=print>print</a>');
else if (document.all && win)
document.write ('<a onfocus="this.blur()" href="javascript:WebBrowser1.ExecWB(6,1);" class=print>print</a>');
else if ((mac && ie) || ms5less )
document.write ('<a onfocus="this.blur()" href="javascript:printermac()" class=print>print</a>');
}

function printermac()
{
alert("This browser doesn't support printing, you can use Apple+P to print this page!"); 
}

////////////////////////////////////////////////////////////////
//
// Beschreibung: Kontaktformular
//
////////////////////////////////////////////////////////////////

function form_test(theForm)
{

if (theForm.Nachname.value == "")
  {    
    alert("Bitte geben Sie Ihren Nachnamen an!\nPlease enter your surname!");    
    theForm.Nachname.focus();
    return (false);
  }

if (theForm.Telefon.value == "")
  {    
    alert("Bitte geben Sie Ihre Telefon-Nummer an!\nPlease enter your telephone number!");    
    theForm.Telefon.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);
}