
//++++++++++++++++++++++++++++//
//Printlink
//++++++++++++++++++++++++++++//
function createPrintLink(){
      printLink = document.createElement("a");
      printLink.setAttribute('href',window.location.href+'?print=1');
      printLink.setAttribute('id','printLink');
      printLink.setAttribute('title','Diese Seite ausdrucken');
      printLink.setAttribute('class','printlink');
      var txt = document.createTextNode("Seite Drucken");
      printLink.appendChild(txt);
      //document.getElementById("centerfooter").insertBefore(printLink, document.getElementById("tipafriendfooter")); 
  
      var pos = window.location.search.indexOf("print=1");
  
      if(pos != -1 ){
         var backurl = window.location.href.replace(/\?print=1/g,"");
        
        Check = confirm("Wollen Sie diese Seite ausdrucken?");
        
        if (Check == true){
            window.print();
        }else{
          self.location.href = backurl;
        }
       }
      }

//++++++++++++++++++++++++++++//
//crossbrowser add eventloader
//++++++++++++++++++++++++++++//

function addLoadEvent(func){   
    var oldonload = window.onload;
    if (typeof window.onload != 'function'){
        window.onload = func;
    } else {
        window.onload = function(){
        oldonload();
        func();
        }
    }
}

//+++++++++++++++++++++++++++++++++//
//litle helper functions searchform
//+++++++++++++++++++++++++++++++++//

function clear(){
   this.value="";
   }

function initAbyss(){
   if(document.getElementById("sword")!= null){
      document.getElementById("sword").value="Suchbegriff";
      document.getElementById("sword").onfocus=clear;
      }
   }

//finaly fire up the scripts
addLoadEvent(initAbyss);




function pushFlashLogo(){
  if(swfobject.hasFlashPlayerVersion("9")) {
    var att = { data:"fileadmin/flash/abyss-logo-animation.swf", width:"302", height:"162" };
    var par = { menu:"false" };
    var id = "flash-logo";
    swfobject.createSWF(att, par, id);
  } else {
    $('#flash-logo').empty().append('<p><img src="fileadmin/images/layout/logo.gif" width="302" height="162" alt="Abyss Tauchsport Logo" title="Zur Abyss Tauchsport Startseite" /></p>');
  }
  /*
  var flashblock = '';
  flashblock += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="302" height="162" id="abyss-logo-animation-v1" align="middle">';
  flashblock += '<param name="allowScriptAccess" value="sameDomain" />';
  flashblock += '<param name="allowFullScreen" value="false" />';
  flashblock += '<param name="movie" value="fileadmin/flash/abyss-logo-animation.swf" />';
  flashblock += '<param name="quality" value="high" />';
  flashblock += '<param name="bgcolor" value="#ffffff" />';
  flashblock += '<param name="wmmode" value="transparent" />';
  flashblock += '<embed src="fileadmin/flash/abyss-logo-animation.swf" quality="high" bgcolor="#ffffff" width="302" height="162" name="abyss-logo-animation-v1" align="middle" allowScriptAccess="sameDomain" wmode="transparent" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
  flashblock += '</object>';
  document.write(flashblock);
  */
  }

