function text2unicode(normaltext)
  {
   normaltext = normaltext.replace("&auml;", "\u00e4");
   normaltext = normaltext.replace("&Auml;", "\u00c4");
   normaltext = normaltext.replace("&ouml;", "\u00f6");
   normaltext = normaltext.replace("&Ouml;", "\u00d6");
   normaltext = normaltext.replace("&uuml;", "\u00fc");
   normaltext = normaltext.replace("&Uuml;", "\u00dc");
   normaltext = normaltext.replace("&szlig;", "\u00df");
   
   return normaltext;
  }

function fade(alpha)
  {
   alpha += 4;
   setAlpha("fade_moritz",alpha);
   setAlpha("moritz",100-alpha)
   if (alpha<100)
     {
     	setTimeout("fade("+alpha+");", 10);
     }
   else
   	 {
   	 	document.getElementById("moritz").innerHTML = document.getElementById("fade_moritz").innerHTML;
      setAlpha("fade_moritz",0);
      setAlpha("moritz", 100);
      alpha = 0;
		 }
  }


function switch_moritz(pic)
  {
   if (moritz_status != pic)
     {
      document.getElementById("fade_moritz").innerHTML = '<img src="/images/funpage/'+pic+'.jpg" alt="Moritz" />';
      moritz_status = pic;
      fade(0);
     }
  }


function moritz_reset()
  {
   if (Math.random()>0.4)
     {
      switch_moritz("Moritz_ueberlegt");
     }
   else
   	 {
   	 	switch_moritz("Moritz_Idee");
   	 }
  }


function moritz_changer()
  {
   if (moritz_status=="Moritz_Idee")
     {
     	switch_moritz("Moritz_andere_Idee");
     }
   else
   	 {
   	 	if (moritz_status=="Moritz_ueberlegt")
        {
     	   switch_moritz("Moritz_Idee");
        }
      else
      	{
      	 if (moritz_status=="Moritz_andere_Idee")
      	   {
      	   	switch_moritz("Moritz_ueberlegt");
      	   }
      	}
   	 }
   setTimeout("moritz_changer();", 2000+Math.random()*8000);
  }


function showInfo(itm)
  {
   cntnt = "nope";
   
   if (itm=="foto1")
     {
     	cntnt = '<br /><img src="/images/funpage/foto1.jpg" alt="foto" /><br /><p>11.5.2008: Der 1.FC K&ouml;ln steigt auf. Ich freue mich und mein Vater denkt &uuml;ber die heisenbergsche Unsch&auml;rferelation nach.</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto2")
     {
     	cntnt = '<br /><img src="/images/funpage/foto2.jpg" alt="foto" /><br /><p>Ich hatte schon immer ein Talent f&uuml;r Nat&uuml;rlichkeit und Authentizit&auml;t.</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto3")
     {
     	cntnt = '<br /><img src="/images/funpage/foto3.jpg" alt="foto" /><br /><p>Liegt in der N&auml;he von Witzich an der Pointe</p>';
     	ix = 600;
     	iy = 50;
     }
   
   if (itm=="foto4")
     {
     	cntnt = '<br /><img src="/images/funpage/foto4.jpg" alt="foto" /><br /><p>Feministinnen sind verbissen und humorlos.</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto5")
     {
     	cntnt = '<br /><img src="/images/funpage/foto5.jpg" alt="foto" /><br /><p>Meine Mutter versteht sich super mit meiner Frau. Muss sie auch. Sonst w&auml;re sie ja ausl&auml;nderfeindlich.</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto6")
     {
     	cntnt = '<br /><img src="/images/funpage/foto6.jpg" alt="foto" /><br /><p>W&auml;re sie nicht meine Nachbarin gewesen, w&auml;re ich bestimmt ein fieser Macho geworden.</p>';
     	ix = 600;
     	iy = 50;
     }
   
   if (itm=="foto7")
     {
     	cntnt = '<br /><img src="/images/funpage/foto7.jpg" alt="foto" /><br /><p>Hier sieht man, dass ich aus einer Intellektuellen-Familie stamme.</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto8")
     {
     	cntnt = '<br /><img src="/images/funpage/foto8.jpg" alt="foto" /><br /><p>Genscher war definitiv lustiger, als er noch abstehende Ohren hatte.</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto9")
     {
     	cntnt = '<br /><img src="/images/funpage/foto9.jpg" alt="foto" /><br /><p>Preisfrage: wer von uns Dreien ist der Fratzen-Weltmeister?</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto10")
     {
     	cntnt = '<br /><img src="/images/funpage/foto10.jpg" alt="foto" /><br /><p>Mit Kiwi-Chef Helge Malchow und dem Goldenen Buch f&uuml;r &#8222;Macho Man&#8221;... Verleger machen mich immer ganz verlegen.</p>';
     	ix = 560;
     	iy = 50;
     }
   
   if (itm=="foto11")
     {
     	cntnt = '<br /><img src="/images/funpage/foto11.jpg" alt="foto" /><br /><p>Comedy ist harte Arbeit.</p>';
     	ix = 50;
     	iy = 50;
     }
   
   if (itm=="foto12")
     {
     	cntnt = '<br /><img src="/images/funpage/foto12.jpg" alt="foto" /><br /><p>Palim Palim! H&uuml; h&uuml; h&uuml; h&uuml;...</p>';
     	ix = 50;
     	iy = 50;
     }
   
   if (itm=="foto13")
     {
     	cntnt = '<br /><img src="/images/funpage/foto13.jpg" alt="foto" /><br /><p>Ich war nach Kaiser Wilhelm II der erste Komiker, der im Deutschen Konsulat in Istanbul auftreten durfte.</p>';
     	ix = 50;
     	iy = 50;
     }
   
   if (itm=="foto14")
     {
     	cntnt = '<br /><img src="/images/funpage/foto14.jpg" alt="foto" /><br /><p>Ich und Heiner M&uuml;ller. Sein Satz &#8222;Optimismus ist nur ein Mangel an Information&rdquo; begeistert mich bis heute. Obwohl ich das als Rheinl&auml;nder nat&uuml;rlich anders sehe.</p>';
     	ix = 50;
     	iy = 50;
     }
   
   if (itm=="foto15")
     {
     	cntnt = '<br /><img src="/images/funpage/foto15.jpg" alt="foto" /><br /><p>Bei diesem Auftritt haben wir 3 einen neuen Rekord im Dauer-Imitieren aufgestellt und dabei die Kollegen schwer genervt. Hihi.</p>';
     	ix = 50;
     	iy = 50;
     }
   
   if (itm=="foto16")
     {
     	cntnt = '<br /><img src="/images/funpage/foto16.jpg" alt="foto" /><br /><p>Meine Frau und mein Schwager. So sieht gelungene Integration aus!</p>';
     	ix = 90;
     	iy = 50;
     }
   
   if (itm=="huelya")
     {
     	cntnt = '<br /><img src="/images/funpage/huelya.jpg" alt="foto" /><br /><p>Meine Ehefrau und Chef-Dramaturgin H&uuml;lya. Sie hat Dramaturgie studiert, daf&uuml;r war ich schon mal verheiratet. So konnten wir beide Erfahrung einbringen.</p>';
     	ix = 90;
     	iy = 50;
     }
   
   if (itm=="radio")
     {
     	if (moritz_status != 'Moritz_hoert_Radio')
     	  {
         do
           {
     	      radioSound = parseInt(Math.random()*4)+1;
           }
         while (radioOld == radioSound);
         
         radioOld = radioSound
         radioSend(radioSound);
     	   switch_moritz('Moritz_hoert_Radio');
     	
     	   if (radioSound==1)	{cntnt = '<br /><p>Ausschnitt aus der CD<br />"Multiple Sarkasmen":<br />Die Amis</p>';}
     	   if (radioSound==2)	{cntnt = '<br /><p>Ausschnitt aus der CD<br />"Multiple Sarkasmen":<br />Faust, Version K&ouml;ln-Kalk</p>';}
         if (radioSound==3)	{cntnt = '<br /><p>Ausschnitt aus der CD<br />"Multiple Sarkasmen":<br />Wir Deutschen</p>';}
     	   if (radioSound==4)	{cntnt = '<br /><p>Ausschnitt aus der CD<br />"Zu gut f&uuml;r\'s Fernsehen":<br />Betroffenheit auf Kos</p>';}

     	   ix = 90;
     	   iy = 50;
     	  }
     	else
     		{
     		 moritz_reset();
     		 cntnt = "";
     		 radioSend(0);
     		}
     }
   
   if (itm=="machoman")
     {
     	cntnt = '<br /><p>Nein, in dieser Sammlung von rosa B&uuml;chern ist &#8222;Feuchtgebiete&#8221; nicht dabei.</p><p>Mehr Infos zum Buch gibt es <a href ="#">hier!</a></p><p>Noch besser:<br /><a href="http://www.amazon.de/Macho-Man-Moritz-Netenjakob/dp/3462042114/ref=pd_sim_m_1" target="_blank">Buch sofort bei Amazon kaufen!</a><br /><br /><b>Wenn Sie jetzt sofort bestellen, erhalten Sie ein Glas Eierlik&ouml;r gratis dazu</b></p>';
     	ix = 90;
     	iy = 200;
     }
   
   if (itm=="1.FC")
     {
     	cntnt = '<br /><p>Der 1.FC K&ouml;ln ist besser geeignet als der Buddhismus, wenn es darum geht, eine dem&uuml;tige Haltung gegen&uuml;ber dem Schicksal zu erlernen.</p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="trabzonspor")
     {
     	cntnt = '<br /><p>Trabzonspor ist mein t&uuml;rkischer Lieblingsclub. Falls jemand mal in Trabzon ins Stadion will, sollte er folgenden Spruch beherrschen: &bdquo;En b&uuml;y&uuml;k Trabzonspor, baska b&uuml;y&uuml;k yok&rdquo; - was so viel hei&szlig;t wie: &bdquo;Am gr&ouml;&szlig;ten ist Trabzonspor, Gr&ouml;&szlig;ere gibt\'s nicht.&rdquo; Das passt irgendwie zur k&ouml;lschen Bescheidenheit, finde ich.</p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="Rhein")
     {
     	cntnt = '<br /><p>Der Rhein. Transportiert die K&ouml;lner Schei&szlig;e nach D&uuml;sseldorf.</p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="Koelner Dom")
     {
     	cntnt = '<br /><p>Der Dom. Neben dem Barbarossaplatz eine der Hauptattraktionen meiner Stadt.</p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="Hohenzollernbruecke")
     {
     	cntnt = '<br /><p>Die Hohenzollernbr&uuml;cke. F&uuml;hrt von der richtigen auf die falsche Rheinseite.</p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="Schmierpapier")
     {
      cntnt = '<br /><img src="/images/funpage/schmierpapier.jpg" alt="Schmierpapier" />';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="prod1")
     {
     	cntnt = '<br /><h3 style="white-space: nowrap;">CD: multiple Sarkasmen</h3><p>Mehr Infos zur CD gibt es <a href ="/programme/multiple_sarkasmen/">hier!</a></p><p>Noch besser:<br /><a href="http://www.amazon.de/Multiple-Sarkasmen-WortArt-Moritz-Netenjakob/dp/3866047142/ref=pd_sim_m_1" target="_blank">CD sofort bei Amazon kaufen!</a><br /><br /><b>Wenn Sie jetzt sofort bestellen, erhalten Sie garantiert keine Jahreskarte f&uuml;r das Otterzentrum der Aktion Fischotterschutz gratis dazu.</b></p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="prod2")
     {
     	cntnt = '<br /><h3 style="white-space: nowrap;">Buch: Macho Man</h3><p>Mehr Infos zum Buch gibt es <a href ="/macho_man/">hier!</a></p><p>Noch besser:<br /><a href="http://www.amazon.de/Macho-Man-Moritz-Netenjakob/dp/3462042114/ref=pd_sim_m_1" target="_blank">CD sofort bei Amazon kaufen!</a><br /><br /><b>Wenn Sie jetzt sofort bestellen, erhalten Sie garantiert keinen aufziehbaren H&uuml;pfpenis gratis dazu.</b></p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="prod3")
     {
     	cntnt = '<br /><h3 style="white-space: nowrap;">H&ouml;rbuch: Macho Man</h3><p>Mehr Infos zum H&ouml;rbuch gibt es <a href ="/macho_man/">hier!</a></p><p>Noch besser:<br /><a href="http://www.amazon.de/Macho-Man-Moritz-Netenjakob/dp/3866106203/ref=sr_1_1?ie=UTF8&s=books&qid=1277201222&sr=1-1" target="_blank">CD sofort bei Amazon kaufen!</a><br /><br /><b>Wenn Sie jetzt sofort bestellen, erhalten Sie keine Wolf-Biermann-LP mit original-Rotweinflecken aus den 70er Jahren gratis dazu.</b></p>';
     	ix = 600;
     	iy = 100;
     }
   
   if (itm=="prod4")
     {
     	cntnt = '<br /><h3 style="white-space: nowrap;">CD: Zu gut f&uuml;r\'s Fernsehen?!</h3><p>Mehr Infos zur CD gibt es <a href ="/programme/zu_gut_fuers_fernsehen/">hier!</a></p><p>Noch besser:<br /><a href="http://www.amazon.de/gp/product/B000E0OC4G/sr=8-1/qid=1277200564/ref=olp_product_details?ie=UTF8&me=&qid=1277200564&sr=8-1" target="_blank">CD sofort bei Amazon kaufen!</a><br /><br /><b>Wenn Sie jetzt sofort bestellen, erhalten Sie einen Tusch gratis dazu.</b></p>';
     	ix = 600;
     	iy = 100;
     }
   
   closebutton = '<a id="closebutton" href="#" onClick="document.getElementById(\'info\').style.visibility = \'hidden\';">mach weg</a>';
   
   if (cntnt!="")
     {
      document.getElementById("info").innerHTML = text2unicode(cntnt+closebutton);
      document.getElementById("info").style.left = ix+"px";
      document.getElementById("info").style.top = iy+"px";
      document.getElementById("info").style.visibility = "visible";
     }
   else
   	 {
   	 	document.getElementById("info").style.visibility = "hidden";
   	 }
  }


function startAB()
  {
   do
     {
     	abSound = parseInt(Math.random()*12)+1;
     }
   while (abOld == abSound);
   abOld = abSound
   soundSend(abSound);
   if (Math.random()>0.5)
     {
     	switch_moritz('Moritz_AB');
     }
   else
   	 {
   	 	switch_moritz('Moritz_AB2');
   	 }
  }


function gotoTV()
  {
   location.href="/tv/?goback=%2F";
  }


function loadTV()
  {
   setTimeout("gotoTV()",1000);
  }


function setAlpha(elementId, alpha)
  {
   if (document.getElementById(elementId).filters)
        {
         document.getElementById(elementId).style.filter='progid:DXImageTransform.Microsoft.Alpha(Opacity=' + Math.round(alpha) + ')';
         document.getElementById(elementId).style.opacity=Math.round(alpha);
        }
      document.getElementById(elementId).style.MozOpacity = alpha/100;
      document.getElementById(elementId).style.opacity = alpha/100;
  }


function productFader()
  {
   if (ypos>550)
     {
     	setAlpha("produkte",ypos-550);
     }
   else
   	 {
   	 	setAlpha("produkte",0);
   	 }
   setTimeout("productFader();", 20);
  }


if (document.layers)
  {
   window.captureEvents(Event.MOUSEMOVE);
   window.onmousemove = koordinaten;
  }
else
	{
   document.onmousemove = koordinaten;
  }

xpos = 0;
ypos = 0;

function koordinaten(e)
  {
   xpos = (document.layers || (document.getElementById && !document.all)) ? e.pageX : document.body.scrollLeft + event.clientX;
   ypos = (document.layers || (document.getElementById && !document.all)) ? e.pageY : document.body.scrollTop + event.clientY;
  }

setAlpha("produkte", 0);
productFader();
abOld = "";
radioOld = "";
moritz_status = "";
moritz_reset();
setTimeout("moritz_changer();", 2000+Math.random()*8000);
