
if (parent.frames.length>=1) {
	window.top.location.href="http://www.surfshopfehmarn.de";
}

var width = screen.availWidth;
var height = screen.availHeight;
self.resizeTo(width,height);
self.moveTo(0,0);

function centerpopup(Link,name,hoehe,breite,scroll){
	var iMyWidth = (window.screen.width/2) - (breite/2 + 10);
	var iMyHeight = (window.screen.height/2) - (hoehe/2 + 50);
	var centerpopup = window.open(Link ,name,"toolbar=no,location=no,status=no,menubar=no,scrollbars=" + scroll + ",resizable=no,width=" + breite + ",height=" + hoehe + ",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight);
	centerpopup.focus();
}


function setSiteHeight (){
	if(document.getElementById("mitte").clientHeight){
	  if(document.getElementById("mitte").clientHeight > document.getElementById("rightarea").clientHeight){
      document.getElementById("content").style.height = document.getElementById("mitte").clientHeight+50;
		}else if((document.getElementById("mitte").clientHeight < document.getElementById("rightarea").clientHeight) && (document.getElementById("leftarea").clientHeight < document.getElementById("rightarea").clientHeight) ){
      document.getElementById("content").style.height = document.getElementById("rightarea").clientHeight+50;
    }else if(document.getElementById("rightarea").clientHeight < document.getElementById("leftarea").clientHeight){
		  document.getElementById("content").style.height = document.getElementById("leftarea").clientHeight+350;
    }
	}
}


// Version: 1.0
//Flash-Abfrage

// Bsp.:
// flashCheck ('flash_seite.htm', 'noflash_seite.htm');

var MM_contentVersion = 7; // gewünschte version

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if (plugin){
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
    for (var i = 0; i < words.length; ++i){
		if (isNaN(parseInt(words[i]))){
			continue;
		}
		var MM_PluginVersion = words[i];
    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;

} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >=0  && (navigator.appVersion.indexOf("Win") != -1)){
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function flashCheck(flash, noflash, win){
	if (!win)
		win = window;
		
	if (MM_FlashCanPlay) {
		win.location.replace(flash);
	} else {
		win.location.replace(noflash);
	}
}


function replaceToFlash(divId,flashName,id,color,width,height,flashVars){
		if (MM_FlashCanPlay) {
			inhalt  = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+width+'" height="'+height+'" id="'+id+'">';
			inhalt += '<param name="movie" value="'+flashName+'" />';
			inhalt += '<param name="quality" value="high" />';
			inhalt += '<param name="bgcolor" value="#ffffff" />';
			inhalt += '<param name="wmode" value="transparent" />';
			inhalt += '<param name="swliveconnect" value="false" />';
			inhalt += '<param name="FlashVars" value="headline='+document.getElementById(divId).firstChild.data+'&'+flashVars+'" />';
			inhalt += '<embed src="'+flashName+'" FlashVars="headline='+document.getElementById(divId).firstChild.data+'&'+flashVars+'" wmode="transparent" swliveconnect="false" quality="high" bgcolor="#ffffff" width="'+width+'" id="'+id+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; 
			inhalt += '</object><br />';
			document.getElementById(divId).innerHTML = inhalt;
		}
		document.getElementById(divId).style.visibility = "visible";
}

