var loadingGif = '<img src="http://www.ressourcen.nordseetraum.de/gfx/misc/loading.gif" width="16" height="16">';

<!-- Frameschutz -->

if (top == self) 
{
self.location.href = "index.htm"; 
}



<!-- Anti-Klau -->

function right(e){
	if ((navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) || (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) ){
		window.alert('Wenn Sie auf unserer Seite Fotos oder Clip Arts'+
		' downloaden, verletzten Sie bis auf wenige Ausnahmen'+
		' die Rechte der Zeichner und Fotografen. Diejenigen Bilder,'+
		' die frei von Copyrights sind, werden wir Ihnen gerne'+
		' zur Verfügung stellen. Wir bitten Sie aber unbedingt,'+
		' uns vor jeglichem "Leihvorgang" zu fragen.'+
		' Danke und viele Grüße vom webmaster@nordseetraum.de. ');
		return false;
	}
	return true;
}
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;



<!-- Netscape 4.7x Resize-Fix -->

function MM_reloadPage(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);



<!-- zum Rahmen um benutzte Links entfernen -->

function Deblur(mylink)
{
if (document.all)
{ 
mylink.blur();
}
}



<!-- Layer ein- und ausblenden, Grafiken austauschen und vorladen -->

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


  
<!-- Layer ein- und ausblenden in buttons.htm -->

{
var c=0;
function counter_buttons()
   {c++;  }
}

function MM_findObj_buttons(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) 
  {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj_buttons(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_showHideLayers_buttons() 
{
if (c==1) 
{
{ //v3.0
  var i,p,v,obj,args=MM_showHideLayers_buttons.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  if ((obj=MM_findObj_buttons(args[i]))!=null) 
  { v=args[i+2];
    if (obj.style) 
   { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
}
}

// Umzu für Fotoplayer
function umzubensersiel (){
   var win;
   win=window.open ("http://www.nordseetraum.de/umzu/bensersiel/ohne-kreis/umzu-index.htm","umzubensersiel","width=640,height=480,screenX=0,screenY=0, left=0,top=0,fullscreen=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0,depend=no");
}
function umzuneuharlingersiel (){
   var win;
   win=window.open ("http://www.nordseetraum.de/umzu/neuharlingersiel/ohne-kreis/umzu-index.htm","umzubensersiel","width=640,height=480,screenX=0,screenY=0, left=0,top=0,fullscreen=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0,depend=no");
}

<!-- Umzu aus buttons.htm starten -->

function umzustart ()
{
var win;
win=window.open ("umzu-index.htm","","width=640,height=480,screenX=0,screenY=0, left=0,top=0,fullscreen=0,directories=0,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0,depend=no");
}

function umzuwarten()
{
setTimeout ("umzustart()", 500);
}

function versicherung ()
{
   window.location.replace ("https://www.reiseversicherung.de/vrv/partner/ep-Assistent.html?/data/agent/hagtnr=082169&/data/agent/nagtnr=082169&/ctrl/state=dtl-start&/io/ext/response/mail=mail@nordseetraum.de");
}

function dtv_popup ()
{
   var win;
   win=window.open ("dtv_popup.htm","","top=10,left=10,width=750,height=550,resizable=yes,scrollbars=yes");
}

function dlg_popup (){
   var win;
   win=window.open ("dlg_popup.htm","","top=10,left=10,width=750,height=550,resizable=yes,scrollbars=yes");
}


function Deblur(mylink)
{
if (document.all)
  mylink.blur();
}


////////////////////////////////////
// Gästebuch
////////////////////////////////////
/* Array für Gästebuch Captcha */
ALPHABET = new Array('A', 'B', 'C', 'D', 'E', 'F', 'G',
             'H', 'Q', 'J', 'K', 'L', 'M', 'N',
             'P', 'R', 'S', 'T', 'U', 'V', 'Y',
             'W', '2', '3', '4', '5', '6');

////////////////////////////////////
// Funktionen für externe Popup-Fenster
////////////////////////////////////
function externpopup(datei,w,h,titel,posx,posy,zusatz)
{
   if(datei=="")alert("Dateiname für Popup fehlt");
   if(titel=="")titel="Popup";
   if(posx=="")posx=10;
   if(posy=="")posy=10;
   if(w=="")w=450;
   if(h=="")h=300;
   var win;
   (zusatz=="")?
   win=window.open(datei,titel,"width="+w+",height="+h+",left="+posx+",top="+posy+",location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,depend=no"):
   win=window.open(datei,titel,"width="+w+",height="+h+",left="+posx+",top="+posy+",location=no,menubar=no,resizable=yes,scrollbars=auto,status=no,toolbar=no,depend=no");
   win.focus();
}

/* Diese Funktion ist flexibler, da man die Eigenschaften des Popup-Fensters beim Aufruf angeben kann */
function externpopup2(datei,w,h,titel,posx,posy,prop){
   if(datei=="")alert("Dateiname für Popup fehlt");
   if(titel=="")titel="Popup";
   if(posx=="")posx=10;
   if(posy=="")posy=10;
   if(w=="")w=450;
   if(h=="")h=300;
   if(prop=="")prop="location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,depend=no";
   var win;
   win=window.open(datei,titel,"width="+w+",height="+h+",left="+posx+",top="+posy+","+prop);
   if(win.focus)win.focus();
}

////////////////////////////////////
// Popup-Infofenster "Meeresleuchten"
////////////////////////////////////
function meeresleuchten()
{
   externpopup2('http://www.ressourcen.nordseetraum.de/popup/meeresleuchten.htm','450','300','meeresleuchten','10','10','location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,depend=no');
   return false;
}

////////////////////////////////////
// Funktion für scrollbare Preisetabellen
////////////////////////////////////
function fscroll_table(id, single)
{
   var max_w = 575;
   var w1 = 0;
   if(typeof $('td1_' + id) != "undefined")
   {
      // Breite der 1. Spalte bestimmen
      var dimensions = $('td1_' + id).getDimensions();
      w1 = dimensions.width;
   }

   // Breite der restlichen Spalten ändern
   var dimensions = $('div_content1_' + id).getDimensions();
   var w = dimensions.width;
   if(w < max_w && w1 == 0)
   {
      $('div_content1_' + id).style.overflow = "auto";
      $('div_content1_' + id).style.width = w + "px";
   }
   else
   {
      var w = max_w - w1;
      $('div_content1_' + id).style.width = w + "px";
   }

   // restlichen Spalten um einen Pixel verschieben
   if(single != 1 && w1 != 0)
   {
      $('div_content3_' + id).style.left = "-1px";
      var dimensions = $('div_content3_' + id).getDimensions();
      var w = dimensions.width;
      w = w - 2;
      $('div_content2_' + id).style.width = w + "px";
   }
}

////////////////////////////////////
//
// Popup-Infofenster "Nationalpark Nieders&#228;chsisches Wattenmeer"
//
////////////////////////////////////
function nationalpark(obj){
   externpopup2('http://www.nordseetraum.de/nationalpark-niedersaechsisches-wattenmeer.html?ort=' + obj.ort,'600','300','nationalpark','10','10','location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,depend=no');
   return false;
}

////////////////////////////////////
// Navigationsmenü
////////////////////////////////////
function menu(obj){
   if(typeof obj.down != 'undefined'){

      (typeof obj.y != 'undefined') ?
      document.getElementById(obj.id).style.backgroundPosition='0 -' + obj.y + 'px':
      document.getElementById(obj.id).style.backgroundPosition='0 -22px';

   } else {
      document.getElementById(obj.id).style.backgroundPosition='0 0';
   }
}

////////////////////////////////////
// Counter
////////////////////////////////////
function counter(obj){
   var ts = new Date();
   var min = 0;
   var max = Date.parse(ts);
   var rand = Math.floor(Math.random() * (max - min + 1)) + min;

   var refe = '';
   if(typeof top.document.referrer != 'undefined')refe = top.document.referrer;
   document.write('<div style="position:absolute;top:0;left:50px;"><img width="1" height="1" border="0" src="http://www.nordseetraum.de/counter/counter.php?refer=' + obj.refer + '&aufl=' + screen.width + '&farbtiefe=' + screen.colorDepth + '&refe=' + refe + '&id=' + obj.counter + '&random=' + rand + '"></div>');
}

////////////////////////////////////
// logoPopup
////////////////////////////////////
function logoPopup(obj){
   switch(obj.type){
      // Service-Qualität Deutschland
      case "sqd":
         externpopup2('http://www.ressourcen.nordseetraum.de/logos/service-qualitaet-deutschland/Flyer_Endkunde.pdf','600','300','sqd','10','10','location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,depend=no');
         break;
   }
   return false;
}
////////////////////////////////////
// Ausstattung
////////////////////////////////////
function toggleAusCat(obj){
   var id = obj.id;
   if(typeof $ == "undefined")return false;
   var st = $('ul_aus_featurecat' + id).style.display;

   if(typeof addClassName != "function"){
      if(st == "none"){
         $('ul_aus_featurecat' + id).show();
         $('liFullAus' + id).style.backgroundImage = 'url(http://www.ressourcen.nordseetraum.de/tpl/nordseetraum-classic/gfx/li_aus_opened.gif)';
      } else {
         $('ul_aus_featurecat' + id).hide();
         $('liFullAus' + id).style.backgroundImage = 'url(http://www.ressourcen.nordseetraum.de/tpl/nordseetraum-classic/gfx/li_aus_closed.gif)';
      }
   } else {
      if(st == "none"){
         $('ul_aus_featurecat' + id).show();
         $('liFullAus' + id).addClassName('li_aus_opened');
      } else {
         $('ul_aus_featurecat' + id).hide();
         $('liFullAus' + id).removeClassName('li_aus_opened');
      }
   }
}

////////////////////////////////////
// Hinweis für alle iPad-Nutzer auf Preise-Seite
////////////////////////////////////
/*
var url = window.location.href;
var info2FingerScrollHTML = "Hallo, lieber iPad-Nutzer.<br>Für den Fall, dass die auf dieser Seite angezeigte Preisetabelle sehr umfangreich ist und Ihnen kein horizontaler Scrollbalken unterhalb der Preisetabelle angezeigt wird, können Sie die nicht sichtbaren Preise trotzdem zum Vorschein bringen, indem Sie mit 2 Fingern direkt auf die Preise zeigen und die Preise nach links oder rechts schieben.";
if(url.indexOf('preise') > -1 && navigator.userAgent.match(/iPad/i)){
   var newEl = document.createElement("div");
   var newElText = document.createTextNode('<div style="margin:1em 0;padding:5px;font-size:16px;">' + info2FingerScrollHTML + '</div>');
   newEl.appendChild(newElText);
   
   // direkt nach der Überschrift
   var title = document.getElementsByTagName("h1");
   alert(document.childNodes[0]);
   title.insertBefore(newEl, document.getElementsByTagName("h1").nextSibling);
}
*/

var address = window.location.href;
var resContact = address.indexOf("kontakt");
if(resContact != -1 && typeof turnDate != "undefined" && typeof visitor_holiday_start != "undefined"){
	if(typeof parent.oben.$('visitor_holiday_start') != "undefined"){
		var vhs = turnDate({d:parent.oben.$('visitor_holiday_start').value});
		var chkDate = checkDate(vhs);
		if(chkDate == true)$('visitor_holiday_start').value = vhs;
	}
	if(typeof parent.oben.$('visitor_holiday_end') != "undefined"){
		var vhe = turnDate({d:parent.oben.$('visitor_holiday_end').value});
		var chkDate = checkDate(vhe);
		if(chkDate == true)$('visitor_holiday_end').value = vhe;
	}
	if(typeof parent.oben.$('visitor_nights') != "undefined"){
		var vn = parent.oben.$('visitor_nights').value;
		$('visitor_nights').selectedIndex = vn;
	}
}
