<!--
// Script by JAKOTA Design Group (c) 1997-2004


// FUNCTIONS START HERE

//Highlight form element- 
// use in forms like <FORM onClick="highlight(event)">
var highlightcolor="#99CCFF"
var normalcolor="#e5e5e5"
var ns6=document.getElementById&&!document.all
var previous=''
var eventobj

//Regular expression to highlight only form elements
var intended=/INPUT|TEXTAREA|SELECT|OPTION/

//Function to check whether element clicked is form element
function checkel(which){
	if (which.style&&intended.test(which.tagName)){
		if (ns6&&eventobj.nodeType==3)	eventobj=eventobj.parentNode.parentNode
		return true
	} else	return false
}  // end function

//Function to highlight form element
function highlight(e){
	eventobj=ns6? e.target : event.srcElement
	if (previous!=''){
		if (checkel(previous)) previous.style.backgroundColor=normalcolor
			previous=eventobj
		if (checkel(eventobj)) eventobj.style.backgroundColor=highlightcolor
	} else {
	if (checkel(eventobj)) eventobj.style.backgroundColor=highlightcolor
	previous=eventobj
	}
}  // end function

// open new link window
function PartmasterWindow()
{
	self.name="main";
	transpo_fenster=window.open('link','part_window','');
	transpo_fenster.focus();
}


function PortWindow() {
  var newWin = window.open('http://www.rostock-port.de/fileadmin/tpl/startkfsaison07.html', 'ROSTOCK-PORT', 'left=0, top=0, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no, width=964, height=580');
  newWin.focus();
}


function popUp(URL) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=964,height=580,left = 20,top = 20');");
}

function popUpPortview(URL) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=964,height=728,left = 20,top = 20');");
}


function UnCryptMailto(s) {	//
	var n=0;
	var r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(5));
	}
	return r;
}

 // JS function for uncrypting spam-protected emails:
function linkTo_UnCryptMailto(s)	{	//
	location.href=UnCryptMailto(s);
}
		
function openPic(url,winName,winParams)	{	//
	var theWindow = window.open(url,winName,winParams);
	if (theWindow)	{theWindow.focus();}
}


/*
* FlashObject embed
*
* v1.5 - 03-30-2005
*
* Create and write a flash movie to the page, includes detection
*
* Usage:
*
*	myFlash = new FlashObject("path/to/swf.swf", "swfid", "width", "height", flashversion, "backgroundcolor");
*	myFlash.altTxt = "Upgrade your Flash Player!";                // optional
*	myFlash.addParam("wmode", "transparent");                     // optional
*	myFlash.addVariable("varname1", "varvalue");                  // optional
*	myFlash.addVariable("varname2", getQueryParamValue("myvar")); // optional
*	myFlash.write();
*
*/
    
FlashObject = function(swf, id, w, h, ver, c) {
  this.swf = swf;
  this.id = id;
  this.width = w;
  this.height = h;
  this.version = ver || 6; // default to 6
  this.align = "middle"; // default to middle
  this.redirect = "";
  this.sq = document.location.search.split("?")[1] || "";
  this.altTxt = "Please <a href=\"http://www.macromedia.com/go/getflashplayer\">upgrade your Flash Player<\/a>.";
  this.bypassTxt = "<p>Already have Flash Player? <a href=\"?detectflash=false&"+ this.sq +"\">Click here if you have Flash Player "+ this.version +" stalled<\/a>.<\/p>";
  this.params = new Object();
  this.variables = new Object();
  if (c) this.color = this.addParam('bgcolor', c);
  this.addParam('quality', 'high'); // default to high
  this.doDetect = getQueryParamValue('detectflash');
}

FlashObject.prototype.addParam = function(name, value) {
  this.params[name] = value;
}

FlashObject.prototype.getParams = function() {
  return this.params;
}

FlashObject.prototype.getParam = function(name) {
  return this.params[name];
}

FlashObject.prototype.addVariable = function(name, value) {
  this.variables[name] = value;
}

FlashObject.prototype.getVariable = function(name) {
  return this.variables[name];
}

FlashObject.prototype.getVariables = function() {
  return this.variables;
}

FlashObject.prototype.getParamTags = function() {
  var paramTags = "";
  for (var param in this.getParams()) {
    paramTags += '<param name="' + param + '" value="' + this.getParam(param) + '" />';
  }
  if (paramTags == "") {
    paramTags = null;
  }
  return paramTags;
}
    
FlashObject.prototype.getHTML = function() {
  var flashHTML = "";
  if (window.ActiveXObject && navigator.userAgent.indexOf('Mac') == -1) { // PC IE

    flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="' + this.id + '" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ this.version +',0,0,0" width="' + this.width + '" height="' + this.height + '" align="' + this.align + '">';
    flashHTML += '<param name="movie" value="' + this.swf + '" />';
    if (this.getParamTags() != null) {
      flashHTML += this.getParamTags();
    }
    if (this.getVariablePairs() != null) {
      flashHTML += '<param name="flashVars" value="' + this.getVariablePairs() + '" />';
    }
    flashHTML += '<\/object>';
  } else {
    if (navigator.userAgent.indexOf('Gecko') && navigator.appVersion.substring(0, 1) >= 5) { // Mozilla
      flashHTML += ' <object type="application/x-shockwave-flash" data="' + this.swf + '" width="' + this.width + '" height="' + this.height + '"> <param name="movie" value="' + this.swf + '" />';
      flashHTML += '<param name="movie" value="' + this.swf + '" />';
      if (this.getParamTags() != null) {
        flashHTML += this.getParamTags();
      }
      if (this.getVariablePairs() != null) {
        flashHTML += '<param name="flashVars" value="' + this.getVariablePairs() + '" />';
      }
      flashHTML += '><\/object>';
    } else { // Everyone else
      flashHTML += '<embed type="application/x-shockwave-flash" src="' + this.swf + '" width="' + this.width + '" height="' + this.height + '" id="' + this.id + '" align="' + this.align + '"';
      for (var param in this.getParams()) {
        flashHTML += ' ' + param + '="' + this.getParam(param) + '"';
      }
      if (this.getVariablePairs() != null) {
        flashHTML += ' flashVars="' + this.getVariablePairs() + '"';
      }
      flashHTML += '><\/embed>';
    }
  }
  return flashHTML;	
  
}

FlashObject.prototype.getVariablePairs = function() {
  var variablePairs = new Array();
  for (var name in this.getVariables()) {
    variablePairs.push(name + "=" + escape(this.getVariable(name)));
  }
  if (variablePairs.length > 0) {
    return variablePairs.join("&");
  } else {
    return null;
  }
}

FlashObject.prototype.write = function(elementId) {
  if(detectFlash(this.version) || this.doDetect=='false') {
    if (elementId) {
      document.getElementById(elementId).innerHTML = this.getHTML();
    } else {
      document.write(this.getHTML());
    }
  } else {
    if (this.redirect != "") {
      document.location.replace(this.redirect);
    } else {
      if (elementId) {
        document.getElementById(elementId).innerHTML = this.altTxt +""+ this.bypassTxt;
      } else {
        document.write(this.altTxt +""+ this.bypassTxt);
      }
    }
  }
}

function getFlashVersion() {
  var flashversion = 0;
  if (navigator.plugins && navigator.plugins.length) {
    var x = navigator.plugins["Shockwave Flash"];
    if(x){
      if (x.description) {
        var y = x.description;
        flashversion = y.charAt(y.indexOf('.')-1);
      }
    }
  } else {
    result = false;
    for(var i = 15; i >= 3 && result != true; i--){
      execScript('on error resume next: result = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'"))','VBScript');
      flashversion = i;
    }
  }
  return flashversion;
}

function detectFlash(ver) {	
  if (getFlashVersion() >= ver) {
    return true;
  } else {
    return false;
  }
}

// get value of querystring param
function getQueryParamValue(param) {
  var q = document.location.search;
  var detectIndex = q.indexOf(param);
  var endIndex = (q.indexOf("&", detectIndex) != -1) ? q.indexOf("&", detectIndex) : q.length;
  if(q.length > 1 && detectIndex != -1) {
    return q.substring(q.indexOf("=", detectIndex)+1, endIndex);
  } else {
    return "";
  }
}

/* add Array.push if needed */
if(Array.prototype.push == null){
  Array.prototype.push = function(item){
    this[this.length] = item;
    return this.length;
  }
}

// Webcam-Popup aus Flash heraus
function webcamPopup ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_de.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}
function webcamPopupNah ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_nah_de.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}

function webcamPopupEn ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_en.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}
function webcamPopupNahEn ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_nah_en.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}

function webcamPopupKai ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_kai.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}
function webcamPopupKaiEn ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_kai_en.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}

function webcamPopupKaiS ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_kai_s.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}
function webcamPopupKaiSEn ()
{
	window.open ('http://webcam.jakota.de/webcam_hero_kai_s_en.html', 'zeitraffer', 'width=800,height=540,scrollbars=no,toolbar=no,status=no,left=0,top=0');
}

// -->

