
		spnetENV_SERVER = window.location.protocol + '//www.manager-magazin.de';
	


/* # AdServer: #------------------------------------------------------------------------------------------------------------------ */
var mmOasShowPos = 0;
function mmShowOASPos(pos) {
	if(spnetENV_SERVER != '') {
		return;
	}
	var color='red';
	if (typeof OAS_listpos != 'undefined' && typeof OAS_allposlist != 'undefined') {
		var searchpos = new RegExp('(^|,)'+pos+'(,|$)');
		if (searchpos.exec(OAS_listpos)) {
			color='lightgreen';
		} else if (searchpos.exec(OAS_allposlist)) {
			color='yellow';
		}
	}
	document.write('<div style="display:inline; border:1px solid black; background-color:'+color+'; text-decoration:blink;  margin:1px; padding:1px; font-size:12px; font-family: Arial; font-weight:bold">Ad: ' + pos + '</div>');
}
function OAS_RICH(pos) {
	mmShowOASPos(pos);
}

/* # HASH-Parameter auslesen: #---------------------------------------------------------------------------------------------------- */
function mmGetHashParams() {
	var loc=(document.location.href+""); 
	var pos=loc.indexOf("#");
	if (pos == -1) 
		return [];
	var hashQs=loc.substring(pos+1, loc.length);
	return mmSplitParams(hashQs);
}
function spGetHashParams() {
	/* wird benoetigt von flash/ce/sendform */
	return mmGetHashParams();
}
function mmSplitParams(params) {
	var result=[];
	var pairs=params.split("&");
	for (var i=0; i < pairs.length; i++) {
		var kv=pairs[i].split("=");
		if (kv.length == 2)
			result[kv[0]]=kv[1];
	}
	return result;
}

/* # Cookies auslesen: #------------------------------------------------------------------------------------------------------------ */
function mmGetCookie (cookieName) {
	function getCookieValue (position) 	{
		var endpos = document.cookie.indexOf(";", position);
		if (endpos == -1)
			endpos = document.cookie.length;
		return unescape(document.cookie.substring(position, endpos));
	}
	var cookieString       = cookieName + "=";
	var cookieStringLength = cookieString.length;
	var allCookieLength    = document.cookie.length;
	var n = 0;
	while (n < allCookieLength) {
		var m = n + cookieStringLength;
		if (document.cookie.substring(n, m) == cookieString)
			return getCookieValue(m);
		n = document.cookie.indexOf(" ", n) + 1;
		if (n == 0) break;
	}
	return null;
}
function getCookieContent( cookieName ) {
	/* legacy: */
	return mmGetCookie(cookieName);
}
function mmSetCookie(name, value, daystoexpire, path, domain, secure) {
	var expires = new Date();
	expires.setTime(expires.getTime() + (daystoexpire * 86400000));
	document.cookie= name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
} 

/* # Suchformulare Backgroundimage #------------------------------------------------------------------------------------------------ */
function mmSearchImageWissen(){
	if (document.mmSearchWissen.suchbegriff) {
		var el = document.mmSearchWissen.suchbegriff;
		if (el.value == '' || el.value == undefined) {
			//el.style.backgroundImage="url('[SHOW MAIN_SERVER]/static/te/backgrounds/bg_wissensearch.gif')";
			el.className = 'mmTextField mmWissenSearch';
		}
		else {
			//el.style.backgroundImage='';
			el.className = 'mmTextField mmWissenSearchWhite';
		}
	}
}
function mmSearchImageKurse(){
	if (document.mmSearchKurse.suchbegriff) {
		var el = document.mmSearchKurse.suchbegriff;
		if (el.value == '' || el.value == undefined) {
			//el.style.backgroundImage="url('[SHOW MAIN_SERVER]/static/te/backgrounds/bg_aktiensearch.gif')";
			el.className = 'mmTextField mmShareSearch';
		}
		else {
			//el.style.backgroundImage='';
			el.className = 'mmTextField mmShareSearchWhite';
		}
	}
}
/* # Social-Bookmark (bookmark-link am artikel): #---------------------------------------------------------------------------------------------------- */
/******* Social Bookmarking functions ******/
/**
* toggles SocialBookmark-Box on and off
* @param mmDisplay - ture=on, false=off
*/
function mmSocialBookmarkSetDisplay(mmDisplay) {
mmSocialBookmarkElement = document.getElementById("mmSocialBookmark").style;
mmSocialBookmarkElement.visibility = (mmDisplay ? "visible" : "hidden");
mmSocialBookmarkState=mmDisplay;
}
/**
* toggle function called form Bookmark Link
* served mmSocialBookmarkSetDisplay() and starts EventHandler
*/
function mmSocialBookmarkToggle() {
if (!mmSocialBookmarkState) {
mmSocialBookmarkSetDisplay(true);
mmStartMouseEvent();
}
else 
mmSocialBookmarkSetDisplay(false);
}
/**
* Event handler function tests where the user clicked
* and acts	according to this (switch SocialBookmark-Box off 
* stops EventHandler)
*/
function mmSocialBookmarkToggleDisplay(e) {
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
if (targ.nodeType == 3) // defeat Safari bug
targ = targ.parentNode;
if (targ.id == "mmSocialBookmarkLink") {
mmStopMouseEvent();
return false;
}
var isInDiv = false;
while(targ != null) {
if (targ.id == "mmSocialBookmark") {
isInDiv=true;
break;
}
if (targ.id == "mmSocialBookmarkClose")
break;
targ = targ.parentNode;
}
if (!isInDiv) {
mmSocialBookmarkSetDisplay(false);
mmStopMouseEvent();
}
return false;
}
/**
* starts EventHandling
*/
function mmStartMouseEvent(){
if (document.addEventListener) { // DOM Level 2 Event Model
document.addEventListener("mouseup", mmSocialBookmarkToggleDisplay, true);
}
else if (document.attachEvent) { // IE 5+ Event Model
document.attachEvent("onmouseup", mmSocialBookmarkToggleDisplay);
}
else { // IE 4 Event Model
document.onmouseup=mmSocialBookmarkToggleDisplay;
}
}
/**
* stops EventHandling
* mmOldHandler is a hack for EI4 Event Model
*/
var mmOldHandler = document.onmouseup;	// Eventhandler for EI 4 StopEvent
function mmStopMouseEvent() {
// Unregister the capturing event handlers.
if (document.removeEventListener) { // DOM Event Model
document.removeEventListener("mouseup", mmSocialBookmarkToggleDisplay, true);
}
else if (document.detachEvent) { // IE 5+ Event Model
document.detachEvent("onmouseup", mmSocialBookmarkToggleDisplay);
}
else { // IE 4 Event Model
document.onmouseup = mmOldHandler;
}
}
/* # Redirects für mobile Clients #------------------------------------------------------------------------------------------------ */
var mmMobileClients=[
      "midp",
      "240x320",
      "blackberry",
      "netfront",
      "nokia",
      "panasonic",
      "portalmmm",
      "sharp",
      "sie-",
      "sonyericsson",
      "symbian",
      "windows ce",
      "benq",
      "mda",
      "mot-",
      "opera mini",
      "philips",
      "pocket pc",
      "sagem",
      "samsung",
      "sda",
      "sgh-",
      "vodafone",
      "xda"
];
	
function mmIsMobileClient(userAgent) {
      try {
            userAgent=userAgent.toLowerCase();
            for (var i=0; i < mmMobileClients.length; i++)
                  if (userAgent.indexOf(mmMobileClients[i]) != -1)
                        return true;
      }
      catch (e) { // pssst.
      }
      return false;
}
		
function mmIsThisBrowserMobileClient() {
      return mmoIsMobileClient(navigator.userAgent);
}

function mmRedirectIfMobileClient() {
	try {
		if (mmIsThisBrowserMobileClient()) {
			if (document.location.href.indexOf('#nomobile') != -1) {
				document.cookie='nomobile';
				return;
			}	

			if (document.cookie && document.cookie.indexOf('nomobile') != -1) 
				return;
				
			document.location.href="http://mobil.manager-magazin.de?redirect=1";
		}
	}
	catch (e) { 
	}
}

/* ------------------------------------------------------------------------------------------------ */
/**
* spFontSizer increase/decrease font size inside "spEmStep"
*
* use: spFontSizer(1, false), spFontSizer(-1, false) or spFontSizer(0, true)
* @param spInc set to 1 or -1
* @param spReset set to true to get initial font size
*/
var mmEmStepWidth 	= 0.125;	// increase/decrease font every step by spEmStepWidth
var mmEmBasis 		= 1.125;		// font size of mmArticleBody at startup
var mmEmStep 		= -1;		// counter for current step (leave as 0)
var mmEmMaxSteps 	= 1;		// maximum steps alowed

function mmFontSizer(mmInc, mmReset) {
	// reset font size
	if (mmReset) 
		mmEmStep = -1;
	// inside allowed steps?
	if (Math.abs(mmEmStep + mmInc) <= mmEmMaxSteps) {
		// increase/decrease spEmStep
		mmEmStep += mmInc;
		// set new font size for every tag inside "spEmStep"
		mmEmFontSize = mmEmStep * mmEmStepWidth + mmEmBasis;
		//get spArticleBody
		mmEmBody = document.getElementById('mmMainContent');
		// set new fot size
		mmEmBody.style.fontSize = mmEmFontSize + "em";
	}

	if (mmReset) {
		document.getElementById("mmFontsizePlus").src = "/static/te/icons/ic_fontsize_plus.gif";
		document.getElementById("mmFontsizeMinus").src = "/static/te/icons/ic_fontsize_minus_lo.gif";
	}
	else {
		if (mmEmStep == -mmEmMaxSteps) {
			document.getElementById("mmFontsizeMinus").src = "/static/te/icons/ic_fontsize_minus_lo.gif";
		}
		else if (mmEmStep == mmEmMaxSteps) {
			document.getElementById("mmFontsizePlus").src = "/static/te/icons/ic_fontsize_plus_lo.gif";
		}
		else {
			document.getElementById("mmFontsizePlus").src = "/static/te/icons/ic_fontsize_plus.gif";
			document.getElementById("mmFontsizeMinus").src = "/static/te/icons/ic_fontsize_minus.gif";
		}
	}
}

function mmOAS_reminder(html) { 
	if( html == null || html == "null" ) {
		html = '';
	}
	document.getElementById('mmOASreminder').innerHTML = html;
}
/* ------------------------------------------------------------------------------------------------ */
function showReiter (name, id) 
{
	for (i=1;i<=10;i++){
		var name2 = name + i ;
		if (document.getElementById(name2)){
			if (id == i){
				document.getElementById(name2).style.background = '#ffffff';
			}
			else {
				document.getElementById(name2).style.background = '#f4f4f4';			
			}	
		}
	} 
}
/* ------------------------------------------------------------------------------------------------ */
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
	Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
	This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();// NaviInit IE6 


/* -------------------- */
/* sp prefix for flash: */
function spCounterFlash(flashid) {
	spCounter('/flash/flash-' + flashid + '-count.html');
}
function spCounter(url) {
	if (typeof(vdz_countframe) != 'undefined') vdz_countframe.location.href = 'http://www.manager-magazin.de' + url;
}

function mmFramebuster() {
	if (top!=self) {
		top.location.href=self.location.href;
	}
}

/* -------------------- */
/* iphone: */
function mmClientIsIPhone() {
	return navigator.userAgent.indexOf('iPhone') > -1;
}
function mmClientIsIPad() {
	return navigator.userAgent.indexOf('iPad') > -1;
}
function mmClientIsIPod() {
	return navigator.userAgent.indexOf('iPod') > -1;
}
function mmClientIsIDevice() {
	return mmClientIsIPhone() || mmClientIsIPad() || mmClientIsIPod();
}
function mmHideIPhoneMessage() {
	mmSetCookie('mmIPhoneMessage','seen',1);
	if(document.getElementById('mmIPhoneMessage')) {
	    document.getElementById('mmIPhoneMessage').style.display  = 'none';
	}
	return false;
}
function mmIPhoneMessage() {
	if (mmClientIsIPhone() || mmClientIsIPod()) {
		var cookie = SPONgetCookie('mmIPhoneMessage');
		if (cookie != 'seen') {
			document.write('<div id="mmIPhoneMessage"><a onclick="mmHideIPhoneMessage(); return false;" href="#" style="float:right;margin:-14px -14px 0 0;"><img src="/static/te/buttons/schliessen.jpg" width="20" height="20" alt="schließen" /><\/a><a href="http://mobil.manager-magazin.de/">Hier geht es zur iPhone-optimierten Mobil-Seite<\/a><\/div>');
		}
	}
}



function mmToggleMPC(cid,nr) {
	for (i=1;i<=50;i++) {
		var mytab = document.getElementById('mmMPCTab-'+cid+'-'+i);
		if (mytab) {
			if (nr == i) {
				mytab.className = 'mmMPCTab mmMPCTabAktiv';
				document.getElementById('mmMPCContent-'+cid+'-'+i).style.display = 'block';
				mmCounterContentainer(cid);
			} else {
				mytab.className = 'mmMPCTab';
				document.getElementById('mmMPCContent-'+cid+'-'+i).style.display = 'none';
			}
		} else {
			break;
		}
	}
}
function mmCounterContentainer(contentainerid) {
	mmCounter('/count/contentainer/0,,' + contentainerid + ',00.html');
}
function mmCounter(url) {
	if (typeof(vdz_countframe) != 'undefined') vdz_countframe.location.href = 'http://www.manager-magazin.de' + url;
}

function mmoInArray(haystack, needle) {
	for (var i in haystack) {
		if (haystack[i] == needle)
			return true;
	}
	return false;
}

// NaviInit IE6 
function mmMainNaviInit() {
	var divNames = new Array("mmChannel", "mmSpecialChannel");
	for (var divCount = 0; divCount < 2; ++divCount) {
		var divName = divNames[divCount];
		if (document.all && document.getElementById) {
			var mmNavContainer = document.getElementById(divName);
			var mmNavis = mmNavContainer.getElementsByTagName('ul');
			for (var i in mmNavis) {
				var ul = mmNavis[i];
	//			wenn 2. Ebene, ...
				if (ul.nodeName == 'UL') {
					var mmNavItems = mmNavContainer.getElementsByTagName('li');
					for (var j in mmNavItems) {
						var li = mmNavItems[j];
	//					...dann 3. Ebene einblenden, falls vorhanden
						if (li.nodeName == 'LI') {
							li.onmouseover = function() {
	//							lazy initialization
								if (! this.mmSubNav) {
									var mmSubNavTmp = this.getElementsByTagName('ul')[0];
									if (mmSubNavTmp && mmSubNavTmp.nodeName == 'UL' && mmSubNavTmp.className == 'mmNaviLevel2')
										this.mmSubNav = mmSubNavTmp;
								}
								if (this.mmSubNav) {
									this.mmSubNav.style.display = "block";
								}
							}
							li.onmouseout = function() {
	//							lazy initialization
								if (! this.mmSubNav) {
									var mmSubNavTmp = this.getElementsByTagName('ul')[0];
									if (mmSubNavTmp && mmSubNavTmp.nodeName == 'UL' && mmSubNavTmp.className == 'mmNaviLevel2')
										this.mmSubNav = mmSubNavTmp;
								}
								if (this.mmSubNav)
									this.mmSubNav.style.display = "none";
							}
						}
					}
				}
			}
		}
	}
}
function mmSynchDatumBis(FORM)
{
    if (FORM.suchzeitraum.selectedIndex == 0)
    {
        // Nichts tun
    }
    else
    {                            // - Bis-Datum aus Rollo-Wert errechnen
        FORM.mmSearchFromDate.value = getDatumFromKey(FORM.suchzeitraum.options[FORM.suchzeitraum.selectedIndex].value);
        FORM.mmSearchToDate.value = getDatumBisKey(FORM.suchzeitraum.options[FORM.suchzeitraum.selectedIndex].value);
        if (FORM.suchzeitraum.options[FORM.suchzeitraum.selectedIndex].value == "all")
        {
            FORM.mmSearchToDate.value = "";
        }
    }
}



function getDatumBisKey(key)
{
    var ret = "";

    switch (key)
            {
        case ""           : ret = "";             break;
        case "all"      : ret = "";             break;
        case "2005"      : ret = "31.12.2004";     break;
        case "2000"       : ret = "31.12.1999";     break;
        case "1995"     : ret = "31.12.1994";     break;
        case "1990"     : ret = "31.12.1989";     break;
        case "1980"     : ret = "31.12.1979";     break;
        case "1970"     : ret = "31.12.1969";     break;
        case "1960"     : ret = "31.12.1959";     break;
        default           : ret = "";             break; // tt.mm.jjjj
    }

    return ret;
}

function getDatumBisKeyInternational(key)
{
    var ret = "";

    switch (key)
            {
        case ""           : ret = "";             break;
        case "all"      : ret = "";             break;
        case "2005"      : ret = "12/31/2004";     break;
        case "2000"       : ret = "12/31/1999";     break;
        case "1995"     : ret = "12/31/1994";     break;
        case "1990"     : ret = "12/31/1989";     break;
        case "1980"     : ret = "12/31/1979";     break;
        case "1970"     : ret = "12/31/1969";     break;
        case "1960"     : ret = "12/31/1959";     break;
        default           : ret = "";             break; // tt.mm.jjjj
    }

    return ret;
}

function getDatumFromKey(key)
{
    var ret = "";

    switch (key)
            {
        case ""           : ret = "";             break;
        case "week"   : ret = datum7Tage;     break;
        case "month"   : ret = datum30Tage;     break;
        case "year"      : ret = datum1Jahr;     break;
        case "ab2005"      : ret = "01.01.2005";     break;
        default           : ret = "";         break; // tt.mm.jjjj
    }

    return ret;
}

function getDatumFromKeyInternational(key)
{
    var ret = "";

    switch (key)
            {
        case ""           : ret = "";             break;
        case "week"   : ret = datum7TageInternational;     break;
        case "month"   : ret = datum30TageInternational;     break;
        case "year"      : ret = datum1JahrInternational;     break;
        case "ab2005"      : ret = "01/01/2005";     break;
        default           : ret = "";         break; // tt.mm.jjjj
    }

    return ret;
}

//-------------------------------------
//value-Werte fuer DATUM_ROLLO-Optionen
var datumHeute = "";
var datumGestern = "";
var datum7Tage = "";
var datum7TageInternational = "";
var datum30Tage = "";
var datum30TageInternational = "";
var datum90Tage = "";
var datum1Jahr = "";
var datum1JahrInternational = "";
var datum2Jahre = "";
var datum3Jahre = "";

makeValues_Datum_Rollo();
//-------------------------------------


function makeValues_Datum_Rollo()
{
    //      --- option-value-Werte fuer Rollo vb bzw. DATUM_ROLLO
    var dateNow = new Date();                  // Datum-heute, Typ Date
    var milliNow = dateNow.getTime();           // Datum-heute in Millisek. seit Computers Geburt

    var dateX = new Date();                  // Hilfsvar., Typ Date
    var milliX = 0;

    milliX = milliNow - 1000 * 60 * 60 * 24;    // vor 1 Tag: 7Tage*24Std*60min*60sec*1000ms
    dateX.setTime(milliX);                  // Date-Objekt
    datumGestern = date2datumAnzeige(dateX); // 'tt.mm.iijj'

    milliX = milliNow - 1000 * 60 * 60 * 24 * 7;    // vor 7 Tagen: 7Tage*24Std*60min*60sec*1000ms
    dateX.setTime(milliX);                  // Date-Objekt
    datum7Tage = date2datumAnzeige(dateX); // 'tt.mm.iijj'
    datum7TageInternational = date2datumAnzeigeInternational(dateX); // 'tt.mm.iijj'

    milliX = milliNow - 1000 * 60 * 60 * 24 * 30;   // vor 30 Tagen
    dateX.setTime(milliX);                  // Date-Objekt
    datum30Tage = date2datumAnzeige(dateX); // 'tt.mm.iijj'
    datum30TageInternational = date2datumAnzeigeInternational(dateX); // 'tt.mm.iijj'

    milliX = milliNow - 1000 * 60 * 60 * 24 * 90;   // vor 90 Tagen
    dateX.setTime(milliX);                  // Date-Objekt
    datum90Tage = date2datumAnzeige(dateX); // 'tt.mm.iijj'

    var yearNow = dateNow.getYear();    // numer. iijj oder jj
    if (yearNow < 1900)
        yearNow += 1900;                  // num iijj

    var monthNow = dateNow.getMonth() + 1;
    if (monthNow < 10)
        monthNow = "0" + monthNow;        // mm

    var dayNow = dateNow.getDate();
    if (dayNow < 10)
        dayNow = "0" + dayNow;            // tt

    var monthLastYear = "" + monthNow;
    var dayLastYear = "" + dayNow;

    if (monthNow == "02" && dayNow == "29")
    {
        monthLastYear = "03";
        dayLastYear = "01";
    }

    datumHeute = dayNow + "." + monthNow + "." + yearNow;
    datum1Jahr = dayLastYear + "." + monthLastYear + "." + (yearNow - 1);
    datum1JahrInternational = monthLastYear + "/" + dayLastYear + "/" + (yearNow - 1);
    datum2Jahre = dayLastYear + "." + monthLastYear + "." + (yearNow - 2);
    datum3Jahre = dayLastYear + "." + monthLastYear + "." + (yearNow - 3);
}

function date2datumAnzeige(dateObj)

    //      // Rein: Objekt, das mit dateObj = new Date(); def. wurde
    //      // Raus: String 'tt.mm.iijj' fuer FROM/TO_DATE_DISPLAY
{
    var yearDisplay = dateObj.getYear();
    if (yearDisplay < 1900) yearDisplay += 1900;

    var monthDisplay = dateObj.getMonth() + 1;
    if (monthDisplay < 10) monthDisplay = "0" + monthDisplay;

    var dayDisplay = dateObj.getDate();
    if (dayDisplay < 10) dayDisplay = "0" + dayDisplay;

    var dateDisplay = dayDisplay + "." + monthDisplay + "." + yearDisplay;
    return dateDisplay;
}

function date2datumAnzeigeInternational(dateObj)

    //      // Rein: Objekt, das mit dateObj = new Date(); def. wurde
    //      // Raus: String 'tt.mm.iijj' fuer FROM/TO_DATE_DISPLAY
{
    var yearDisplay = dateObj.getYear();
    if (yearDisplay < 1900) yearDisplay += 1900;

    var monthDisplay = dateObj.getMonth() + 1;
    if (monthDisplay < 10) monthDisplay = "0" + monthDisplay;

    var dayDisplay = dateObj.getDate();
    if (dayDisplay < 10) dayDisplay = "0" + dayDisplay;

    var dateDisplay = monthDisplay + "/" + dayDisplay + "/" + yearDisplay;
    return dateDisplay;
}



	var mmTmpImgSetToLoad;
	// Muss ausserhalb des spEnhPaginators stehen, da per timeout aufgerufen...
	function mmLoadDeferImgSet(prefix) {
	        for (var i=0; i < mmTmpImgSetToLoad.length; i++) {
	                var imgElement=document.getElementById(prefix + i);
	                if (imgElement != null)
	                        imgElement.src = mmTmpImgSetToLoad[i];
	        }
	}


	var mmEnhPaginator = function(paginatorId, imageSets) {
		this.pages=[];
		this.imageSets=imageSets;
		this.completedImageSets=(imageSets != null) ? new Array(imageSets.length) : null;
		this.index=0;
		this.paginatorId=paginatorId;
		this.imageSetToLoad=null;
		this.currentPage=null;
		this.initDone=false;
		this.onChangePage=null;
	}

	mmEnhPaginator.prototype = {
		checkInit: function() {
			if (!this.initDone) {
				
				var container=document.getElementById(this.paginatorId);
				var pagesTmp=container.getElementsByTagName('DIV');
				for (key=0; key < pagesTmp.length; key++)
					if (pagesTmp[key].className == 'mmPaginatorPage') {
						this.pages.push(pagesTmp[key]);
					}
	
				this.currentPage=this.pages[this.index];
				this.initDone=true;
			}
		},
		showNext: function(element) {
			this.checkInit();
			var oldIndex = this.index++;
			if (this.index >= this.pages.length)
				this.index = 0;
	
			if (this.onChangePage != null)
				this.onChangePage(this.pages[oldIndex]);
			this.switchToNewIndex();
		},
		showPrev: function(element) {
			this.checkInit();
			var oldIndex = this.index--;
			if (this.index < 0)
				this.index = this.pages.length - 1;
	
			if (this.onChangePage != null)
				this.onChangePage(this.pages[oldIndex]);
	
			this.switchToNewIndex();
		},
		showNum: function(element) {
			this.checkInit();
			var oldIndex = this.index;
			this.index = arguments[0];
			if (this.index < 0)
				this.index = this.pages.length - 1;
			if (this.onChangePage != null)
				this.onChangePage(this.pages[oldIndex]);
			this.switchToNewIndex();
		},		
		switchToNewIndex: function(newPage) {
			this.currentPage.style.display='none';
			this.currentPage=this.pages[this.index];
			this.currentPage.style.display='block';
			this.checkLoadImages();
		},
		checkLoadImages: function() {
			if (this.imageSets != null) {
				var imageSetIndex=this.index-1;
				if (this.imageSets[imageSetIndex] != null && !this.completedImageSets[imageSetIndex]) {
					mmTmpImgSetToLoad=this.imageSets[imageSetIndex];
					window.setTimeout("mmLoadDeferImgSet('" + this.paginatorId + imageSetIndex + "')", 20);
					this.completedImageSets[imageSetIndex]=true;
				}
			}
		}
	}


Mm_FlashvideoPopupParams = 'width=769,height=489,scrollbars=no,resizable=no,screenX=150,screenY=100';

	
			function mmDetectFlashVerInit(){
				if(!document.getElementById('swfversionscript')){
					var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
					var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
					var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
					
					if(isIE && isWin && !isOpera){
						document.write('<scr'+'ipt id="swfversionscript" type="text/vbscript">\n');
document.write('Function mmGetSwfVer(i)\n');
document.write('on error resume next\n');
document.write('Dim swControl, swVersion\n');
document.write('swVersion = 0\n');
document.write('set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
document.write('if (IsObject(swControl)) then\n');
document.write('swVersion = swControl.GetVariable("$version")\n');
document.write('end if\n');
document.write('mmGetSwfVer = swVersion\n');
document.write('End Function\n');
document.write('<\/scr'+'ipt>\n');
document.write('\n');

					} else {
						document.write('<scr'+'ipt id="swfversionscript" type="text/javascript">\n');
document.write('function mmGetSwfVer(i)\n');
document.write('{\n');
document.write('if (navigator.plugins != null && navigator.plugins.length > 0) {\n');
document.write('if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {\n');
document.write('var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";\n');
document.write('var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;\n');
document.write('descArray = flashDescription.split(" ");\n');
document.write('tempArrayMajor = descArray[2].split(".");\n');
document.write('versionMajor = tempArrayMajor[0];\n');
document.write('versionMinor = tempArrayMajor[1];\n');
document.write('if ( descArray[3] != "" ) {tempArrayMinor = descArray[3].split("r");} else {tempArrayMinor = descArray[4].split("r");}\n');
document.write('versionRevision=tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;\n');
document.write('// variable flashVer zusammensetzen -> analog zu ie\n');
document.write('flashVer="x " + versionMajor + "," + versionMinor + "," + versionRevision;\n');
document.write('}else{flashVer=-1;}\n');
document.write('}\n');
document.write('// MSN/WebTV 2.6 supports Flash 4\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;\n');
document.write('// WebTV 2.5 supports Flash 3\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;\n');
document.write('// older WebTV supports Flash 2\n');
document.write('else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;\n');
document.write('// Can\'t detect in all other cases\n');
document.write('else {flashVer = -1;}\n');
document.write('return flashVer;\n');
document.write('}\n');
document.write('<\/scr'+'ipt>\n');
document.write('\n');

					}
				}
			} 
		function mmDetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
		{
			var reqVer = parseFloat(reqMajorVer + "." + reqRevision);
			// loop backwards through the versions until we find the newest version	
			for (var i=25;i>0;i--) {
				versionStr = mmGetSwfVer(i);
				if (versionStr == -1 ) { 
					return false;
				} else if (versionStr != 0) {
					var versionArray = new Array();
					var tempArray   = versionStr.split(" ");
					var tempString  = tempArray[1];
					versionArray    = tempString.split(",");
					var versionMajor    = versionArray[0];
					var versionMinor    = versionArray[1];
					var versionRevision = versionArray[2];
					var versionString   = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
					var versionNum      = parseFloat(versionString);
					// is the major.revision >= requested major.revision AND the minor version >= requested minor
					if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
						return true;
					} else {
						return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
					}
				}
			}
		}
	function mmLoadFlash(videoid, flashvars){
	if(document.getElementById){
		if ( mmDetectFlashVer(8,0,0) ) {
			document.getElementById('flashvideoswf'+videoid).innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+videoid+'" width="180" height="155">\n<param name="movie" value="/static/flash/flashvideo/180-all-004.swf" />\n<param name="allowFullScreen" value="true" />\n<param name="quality" value="high" />\n<param name="bgcolor" value="#f2f2f2" />\n<param name="menu" value="false" />\n<param name="wmode" value="opaque" />\n<param name="allowScriptAccess" value="sameDomain" />\n<param name="FlashVars" value="'+flashvars+'" />\n<embed src="/static/flash/flashvideo/180-all-004.swf" name="'+videoid+'" type="application/x-shockwave-flash" width="180" height="155" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" bgcolor="#f2f2f2" menu="false" wmode="opaque" allowScriptAccess="sameDomain" FlashVars="'+flashvars+'" allowFullScreen="true"><\/embed>\n<\/object>\n'; 
						 } else {  
			document.getElementById('flashvideoswf'+videoid).innerHTML = '<div style="width:100%;height:155px;padding:3px;background-color:#f0f0f0">\n<font face="verdana" size="-2">\nDer benötigte Flash Player 8 wurde nicht gefunden.<br />\nMögliche Ursachen:<br /><br />\nJavaScript erkennt den Player nicht korrekt.<br />\n<a href="http://www.manager-magazin.de/videoplayer/0,6521,'+videoid+',00.html" title="Video abspielen..." target="SPONflashvideo" onClick="window.open(\'http://www.manager-magazin.de/videoplayer/0,6521,'+videoid+',00.html\',\'SPONflashvideo\',SpOnENV_FlashvideoPopupParams).focus();return false;">Große Version ohne Abfrage starten (Flash Player 8 erforderlich)<\/a><br /><br />\nDer Player ist nicht vorhanden.<br />\n<a href="http://www.macromedia.com/go/getflash/" target="_blank">Jetzt installieren<\/a>\n<\/font>\n<\/div>';
						 mmShowFlashDiv(videoid);
			document.getElementById('flashvideocredit'+videoid).style.display = 'none';
		}
	}
}

function mmShowFlashDiv(videoid) { 
	document.getElementById('flashvideoswf'+videoid).style.zIndex=3;
	document.getElementById('flashfotocredit'+videoid).style.display = 'none';
	document.getElementById('flashvideocredit'+videoid).style.display = 'block';
}

function mmVideoPopup(videoid){ 
	window.open('/videoplayer/0,6521,'+videoid+',00.html', 'MmFlashvideo', Mm_FlashvideoPopupParams).focus();
}

function mmOAS_reminder(html) { 
 	if( html == null || html == "null" ) {
 		html = '';
 	}
 	document.getElementById('mmOASreminder').innerHTML = html;
}

var mmOasAllowPanoPlayerAds = 1;
function mmPanoPlayerPlay (videoid, category, allowAds) {
		try {
			var params=mmGetHashParams();
			var oasVideoBelegung=params["oas.videobelegung"];
			if (oasVideoBelegung != null)
				category = oasVideoBelegung;
		}
		catch (e) {};
		
		var PlayerFlashVars = {
			brand: 				"mmoCenterPlayer",
			disableHQ : 		"true",
			allowAds:			(mmOasAllowPanoPlayerAds && allowAds) ? 1 : 0,
			category:			category,
			fitVideoToStage : 	"true",
			videoid: 			videoid
		};
		var PlayerParams = {
			allowScriptAccess: "always",
			allowFullScreen: "true",
			wmode: "opaque",
			menu: "false"
		};
	
		swfobject.embedSWF("/static/flash/flashvideo/videoplayer-pan-001.swf", "mmPanoPlayerPane" + videoid , "522", "320", "10.0.0", "", PlayerFlashVars, PlayerParams);
	
		document.getElementById('mmPanoPlayerPicCredit' + videoid).style.display = 'none';
		document.getElementById('mmPanoPlayerVideoCredit' + videoid).style.display = 'block';

	return false;
}


function mmVgWortCount(token) {
	document.write('<div style="display:none;"><img src="http://manager.met.vgwort.de/na/'+token+'" width="1" height="1" alt="" align="right" /></div>');
}
// HP-Channelboxen:
function mmHPTeaserInit(allchannels) {
	mmHPTeaserLen = {};
	var cookie = mmGetCookie('mmHPTeaser');
	if (cookie != null) {
		var channel = cookie.split(' ');
		for (var i in channel) {
			mmHPTeaserLen[channel[i]] = 1;
		}
	}
	var allchannelslist = allchannels.split(' ');
	for (var c in allchannelslist) {
		mmHPTeaserToggle(allchannelslist[c],(typeof(mmHPTeaserLen[allchannelslist[c]]) == 'undefined' ? 'less' : 'more'),0);
	}
	return false;
}

function mmHPTeaserToggle(channelname, what, save) {
	if (typeof(mmHPTeaserLen) == 'undefined') {
		mmHPTeaserLen = {};
	}
	if (what == 'more') {
		mmHPTeaserLen[channelname] = '1';
		if(document.getElementById('mmRTmore_'+channelname))
					document.getElementById('mmRTmore_'+channelname).style.display = 'block';
		if(document.getElementById('mmRTless_'+channelname))
					document.getElementById('mmRTless_'+channelname).style.display = 'none';
	} else if (what == 'less'){
		if (typeof(mmHPTeaserLen[channelname]) != 'undefined') {
			delete mmHPTeaserLen[channelname];
		}
		if(document.getElementById('mmRTmore_'+channelname))
					document.getElementById('mmRTmore_'+channelname).style.display = 'none';
		if(document.getElementById('mmRTless_'+channelname))
					document.getElementById('mmRTless_'+channelname).style.display = 'block';
	} else {
		return false;
	}
	if (save == 1) {
		var cookie = '';
		for (var c in mmHPTeaserLen) {
			cookie = cookie + (cookie.length > 0 ? ' ' : '') + c
		}
		mmSetCookie('mmHPTeaser',cookie,365);
	}
	return false;
}

 /**
 * Event handler function tests where the user clicked
 * and acts	according to this
 */
function mmMouseUpEvent(e) {
	if (!e) var e = window.event;
	if (e.target) targ = e.target;
	else if (e.srcElement) targ = e.srcElement;
	if (targ.nodeType == 3) // defeat Safari bug
		targ = targ.parentNode;

	if (targ.id == "mmTopicBoxToggleLink_" + mmHpTopicBoxCurrentElement || targ.id == "mmTopicBoxToggleLinkMore_" + mmHpTopicBoxCurrentElement) {
		mmStopMouseEvent();
		return false;
	}
	if (mmHpTopicBoxCurrentElement && targ.id == "mmSubjectBox_"+mmHpTopicBoxCurrentElement) {
		return false;
	}


	var isHpTopicboxDiv = false;
	while(targ != null) {
		if (mmHpTopicBoxCurrentElement && targ.id == "mmSubjectBox_"+mmHpTopicBoxCurrentElement) {
			isHpTopicboxDiv=true;
			break;
		}
		targ = targ.parentNode;
	}

	if (!isHpTopicboxDiv) {
		mmHpTopicBoxToggle(mmHpTopicBoxCurrentElement, false);
		mmStopMouseEvent();
	}
	return false;
}

/**
 * starts EventHandling
 */
function mmStartMouseEvent(){
	if (document.addEventListener) { // DOM Level 2 Event Model
		document.addEventListener("mouseup", mmMouseUpEvent, true);
	}
	else if (document.attachEvent) { // IE 5+ Event Model
		document.attachEvent("onmouseup", mmMouseUpEvent);
	}
	else { // IE 4 Event Model
		document.onmouseup=mmMouseUpEvent;
	}
}
/**
 * stops EventHandling
 * mmOldHandler is a hack for EI4 Event Model
 */
var mmOldHandler = document.onmouseup;	// Eventhandler for EI 4 StopEvent
function mmStopMouseEvent() {
//	Unregister the capturing event handlers.
	if (document.removeEventListener) { // DOM Event Model
		document.removeEventListener("mouseup", mmMouseUpEvent, true);
	}
	else if (document.detachEvent) { // IE 5+ Event Model
		document.detachEvent("onmouseup", mmMouseUpEvent);
	}
	else { // IE 4 Event Model
		document.onmouseup = mmOldHandler;
	}
}



/**
 * 
 * @return
 */
var mmHpTopicBoxState=false;
function mmHpTopicBoxToggle(mmElementName) {
	
	if (!mmHpTopicBoxState) {
		mmHpTopicBoxSetDisplay(mmElementName, true);
		mmStartMouseEvent();
	}
	else
		mmHpTopicBoxSetDisplay(mmElementName, false);
}
/**
 * 
 * @param mmDisplay
 * @return
 */
var mmHpTopicBoxCurrentElement=null;
function mmHpTopicBoxSetDisplay(mmElementName, mmDisplay) {
	
	mmHpTopicBoxElement = document.getElementById("mmSubjectBox_"+mmElementName).style;
	mmHpTopicBoxElement.display = (mmDisplay ? "block" : "none");
	mmHpTopicBoxState=mmDisplay;
	mmHpTopicBoxCurrentElement=mmElementName
}


/**
 * Simple in_array function
 * @param haystack (Array)
 * @param needle (Object)
 * @return
 */
function mmInArray(haystack, needle) {
	for (var i in haystack) {
		if (haystack[i] == needle)
			return true;
	}
	return false;
}
function spnetOpenPopupLayer(classname, headline, framelocation)  {
	var popup = document.getElementById('spnetPopupLayerArea');
	var html = '<div id="spnetPopupLayerHeader"><a href="javascript:parent.spnetClosePopupLayer();"><img src="/static/te/buttons/schliessen.jpg" id="spnetCloseButton"><\/a><h1>' + headline + '</h1><\/div>';
	html += '<iframe id="spnetPopupLayerFrame" src="' + framelocation + '" scrolling="no" frameborder="0"></iframe>';
	html = '<div class="spnetPLcorTopLeft"></div><div class="spnetPLcorTopRight"></div><div class="spnetPLlineLeft"><div class="spnetPLlineRight"><div class="spnetPLcontent">' + html + '</div></div></div><div class="spnetPLcorBottomLeft"></div><div class="spnetPLcorBottomRight"></div>';
	popup.innerHTML = html;
	popup.className = classname;
}

function spnetClosePopupLayer()  {
	var popup = document.getElementById('spnetPopupLayerArea');
	popup.innerHTML = '';
	popup.className = '';
}
function spnetOpenSendForm(language, which)  {
	var headline;
	var framelocation;
	if (which == 'sms') {
		headline = 'Artikel verschicken als SMS';
		framelocation = 'http://mobil.manager-magazin.de/sendArticle.do?id=' + parent.spnetMetadataAssetId;
	} else {
		framelocation = spnetENV_SERVER + '/artikelversand/index-' + language + '.html';
		headline = 'Diesen Artikel verschicken';
	}
	spnetOpenPopupLayer('spnetSendFormPopupLayer', headline, framelocation);
	var offset = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
		offset = window.pageYOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		offset = document.body.scrollTop;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		offset = document.documentElement.scrollTop;
	}
	if (offset > 500) scrollTo(0,0);
}

function spnetSendFormSetAction(form, language)  {
	if (form.action == '') {
		var action = spnetENV_SERVER + '/artikelversand/';
		action += 'online/a-';
		var smsversand = document.getElementById('spnetSendFormSMS');
		if (smsversand != null) {
			smsversand.style.display = 'block';
		}
		action += parent.spnetMetadataAssetId + '-' + language + '.html';
		form.action = action;
	}
}

function spnetAutoOpenSendForm(language, which)  {
	try {
		var params=spGetHashParams();
		var sendarticle = params["spnet.sendarticle"];
		if (sendarticle == null) return;
	} catch (e) {}
	spnetOpenSendForm(language, which);
}

