/* 2004 - Demetrey Iljin */

/* Build context Menu in Portal */
document.write('<link rel="stylesheet" href="menu/css/menu_44.css" type="text/css">');
document.write('<script language="JavaScript" src="menu/js/context_menu_02.js" type="text/javascript"></script>');
document.write('<div id="menuWindow" name="menuWindow" style="margin: 130px 0px 0px 275px; padding: 0px 0px 0px 0px; width: 300px; height: 400px; position: absolute; background: #000000; display: none; z-index: 100000; filter: progid:DXImageTransform.Microsoft.Shadow(color=#000000,direction=120);">');
document.write('<div id="hauptMenu44Container">');
document.write('<div id="menu44HeadContainer">');
document.write('<div id="menu44CloseButton"><img alt="Men&uuml; schliessen: Acess Key \'Escape\' or \'O\'" src="menu/bilder/close44.gif" width="33" height="30" onClick="window.parent.menuLaunch()"></div>');
document.write('<div id="menuCapita">&nbsp;&nbsp;</div>');
document.write('</div>');
document.write('<div id="menuTasten"></div>');
document.write('</div>');
document.write('</div>');	
	
	
function window.parent.menuLaunch(key){
  counterContextMenu=0;
  if (window.parent.navigationsMenu==true){window.parent.menu_knopf();}
  if (window.parent.quickJumpOpen==true){window.parent.jumpShowLayer()}   // QuickJump must be Closed!!

  if (window.parent.contextMenuOpen==true){
   window.parent.contextMenuOpen=false;
   document.getElementById("menuWindow").style.display='none';
    if (window.parent.mediaWindowOpen!=true){window.parent.setFocus();}
    if (window.parent.mediaWindowOpen==true){window.parent.manageFocus('mediaWindow');}
   return;
					  } 
  if (window.parent.contextMenuOpen!=true){
   window.parent.contextMenuOpen=true;
   document.getElementById("menuWindow").style.display='block';
  if (key=='G'){
   var html=''
   for (var a=0; a<greenMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+greenMenu[a][1]+'">'+greenMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;TV / EPG';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_green.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	       }
  if (key=='S'){
   var html=''  
    if (window.parent.bedienungOpen==1){yellowMenu[6]="7. Fernbedienung ausblenden|javascript:window.parent.menuLaunch();window.parent.fernSimulater();".split("|");}
    if ((!window.parent.bedienungCookie)||(window.parent.bedienungOpen==0)){yellowMenu[6]="7. Fernbedienung anzeigen|javascript:window.parent.menuLaunch();window.parent.fernSimulater();".split("|");}
    if ((!window.parent.menuKommentareText)||(window.parent.menuKommentareText=='anzeigen')){yellowMenu[7]="8. Kommentare anzeigen|javascript:window.parent.menuLaunch();window.parent.kommentare_anzeigen();".split("|");}
    if (window.parent.menuKommentareText=='ausblenden'){yellowMenu[7]="8. Kommentare ausblenden|javascript:window.parent.menuLaunch();window.parent.kommentare_anzeigen();".split("|");}
    if (window.parent.shoutBox==0){yellowMenu[8]="9. ShoutBox &ouml;ffnen|javascript:window.parent.menuLaunch();window.parent.boxMainLoader();".split("|");}
    if (window.parent.shoutBox==1){yellowMenu[8]="9. Suchfeld &oumlffnen|javascript:window.parent.menuLaunch();window.parent.boxMainLoader();".split("|");}
    if (wertHolen('betrieb')=='pc'){yellowMenu[5]="6. TV-Schriftart einschalten|javascript:window.parent.betriebsart('tv');".split("|");}
    if (wertHolen('betrieb')=='tv'){yellowMenu[5]="6. PC-Schriftart einschalten|javascript:window.parent.betriebsart('pc');".split("|");}
    if ((wertHolen('betrieb')!='pc')&&(wertHolen('betrieb')!='tv')){yellowMenu[5]="6. TV-Schriftart einschalten|javascript:window.parent.betriebsart('tv');".split("|");}
   for (var a=0; a<yellowMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+yellowMenu[a][1]+'">'+yellowMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;View';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_yellow.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	       }
  if (key=='H'){
   var html=''
   for (var a=0; a<helpMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+helpMenu[a][1]+'">'+helpMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Help Menu';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_other.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	       }
  if (key=='Power'){
   var html=''
   for (var a=0; a<powerMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+powerMenu[a][1]+'">'+powerMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Power Menu';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_red.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	           }
  if (key=='Sound'){
   var html=''
   for (var a=0; a<soundMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+soundMenu[a][1]+'">'+soundMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Sound Menu';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_other.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	           }
  if (key=='Close'){
   var html=''
   for (var a=0; a<closeMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+closeMenu[a][1]+'">'+closeMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Tvoon Beenden?';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_red.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	           }
  if (key=='B'){
   var html=''
   for (var a=0; a<blueMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+blueMenu[a][1]+'">'+blueMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Overview';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_blue.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
               }
  if ((key=='B')&&(window.parent.mediaWindowOpen==true)&&(window.parent.which==0)){
   var html=''
   for (var a=0; a<vodMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+vodMenu[a][1]+'">'+vodMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Video on Demand';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_blue.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	                                                                          }
  if ((key=='B')&&(window.parent.mediaWindowOpen==true)&&(window.parent.which==1)){
   var html=''
   for (var a=0; a<webtvMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+webtvMenu[a][1]+'">'+webtvMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Web-TV';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_blue.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	                                                                          }
  if ((key=='B')&&(window.parent.mediaWindowOpen==true)&&(window.parent.which==2)){
   var html=''
   for (var a=0; a<webradioMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+webradioMenu[a][1]+'">'+webradioMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Web-Radio';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_blue.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	                                                                          }
  if ((key=='B')&&(window.parent.mediaWindowOpen==true)&&(window.parent.which==3)){
   var html=''                                                                 
   for (var a=0; a<itvMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+itvMenu[a][1]+'">'+itvMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;i-TV';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_blue.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	                                                                          }
  if ((key=='B')&&(window.parent.mediaWindowOpen==true)&&(window.parent.which==4)){
   var html=''
   for (var a=0; a<searchMenu.length; a++){html+='<a class="contextMenuTaste_off" onFocus="this.className=\'contextMenuTaste_on\'" onBlur="this.className=\'contextMenuTaste_off\'" onMouseOver="this.className=\'contextMenuTaste_on\'"  onMouseOut="this.className=\'contextMenuTaste_off\'" href="'+searchMenu[a][1]+'">'+searchMenu[a][0]+'</a><br>';}
   menuCapita.innerHTML='&nbsp;&nbsp;Suchmaschine';
   document.getElementById("hauptMenu44Container").style.background="url(menu/bilder/menu_blue.jpg) center top fixed no-repeat";
   menuTasten.innerHTML=html;
	                                                                          }
   window.parent.manageFocus('contextMenu');
   document.all.hauptInhalt.focus();
   return;
					  }
				      }
