/* Moves the Cursor in Portal */

var counter38=0; // Making "True Links" Array
var counter39=0; // Counting the Focus Position
var counter40=1; // Making "Absolute True Links" Array ;)
var counter41=0;
var counter42=1;
var counter43=0;
var counter44=0;


function text_anzeigen(c)
{
 document.all['text'+c].style.display='inline';
 document.all['weniger'+c].style.display='inline';
 document.all['mehr'+c].style.display='none';
 document.all['mehrLink'+c].style.display='none';
 document.all['wenigerLink'+c].style.display='inline';
 window.parent.linkOpened=true;
};

function text_weg(c)
{
 document.all['text'+c].style.display='none';
 document.all['weniger'+c].style.display='none';
 document.all['mehr'+c].style.display='inline';
 document.all['mehrLink'+c].style.display='inline';
 document.all['wenigerLink'+c].style.display='none';
 window.parent.linkOpened=false;
};


function window.parent.checkPage(){
  var allLinkCollection=hauptInhalt.all.tags("A");
  var trueLinkCollection=new Array();
  var mehrLinks=new Array();
  var wenigerLinks=new Array();
  for (var s1m=0; s1m<allLinkCollection.length; s1m++){if (allLinkCollection[s1m].href!=''){trueLinkCollection[counter38]=allLinkCollection[s1m];counter38++;}}
  window.parent.trueLinkCollection=trueLinkCollection;
  if (window.parent.trueLinkCollection==null){return;}
  if (window.parent.trueLinkCollection==""){return;}
  window.parent.greenLinkExist=document.getElementById("nav");
  if (window.parent.greenLinkExist!=null){window.parent.greenLinkCollection=nav.all.tags("TD");}
  window.parent.mehrExist=document.getElementById("mehr1");
  if (window.parent.mehrExist!=null){window.parent.setStyleToLinkz();}
                                  }


function window.parent.setStyleToLinkz(){
  for (a=1; a<50; a++){
   var CPSU=document.getElementById("mehr"+a);
   if (CPSU==null){return;}
   document.all['text'+a].style.display='inline';
   document.all['weniger'+a].style.display='none';
   document.all['mehr'+a].style.display='none';
   document.all['mehrLink'+a].style.display='none';
   document.all['wenigerLink'+a].style.display='none';
  		      }
  window.parent.linkOpened=true;
					}

function window.parent.greenCursorMove(dir){
  window.parent.mouseAus=1;
  if (window.parent.trueLinkCollection==null){return;}
  if (window.parent.trueLinkCollection==""){return;}

  trueLinkCollection[counter39].style.background="transparent";
  trueLinkCollection[counter39].style.color="#FFFFFF";

  if (window.parent.greenLinkExist!=null){var greenTDcollection=nav.all.tags("TD");}  
  if (dir=='down'){
   counter39++;
   if (counter39>trueLinkCollection.length-1){counter39=0;}
   if (trueLinkCollection[counter39].name=='green'){greenLinkCollection[counter39].focus();}
   if (trueLinkCollection[counter39].name!='green'){
   if (trueLinkCollection[counter39].currentStyle.display=='none'){while(trueLinkCollection[counter39].currentStyle.display=='none'){counter39++;}}
     trueLinkCollection[counter39].focus();
     trueLinkCollection[counter39].style.background="#00FF00";
     trueLinkCollection[counter39].style.color="#0000FF";
						   }
		  }
  if (dir=='up'){
   counter39--;
   if (counter39<0){counter39=trueLinkCollection.length-1;}
   if (trueLinkCollection[counter39].name=='green'){greenLinkCollection[counter39].focus();}
   if (trueLinkCollection[counter39].name!='green'){
   if (trueLinkCollection[counter39].currentStyle.display=='none'){while(trueLinkCollection[counter39].currentStyle.display=='none'){counter39--;}}
     trueLinkCollection[counter39].focus();
     trueLinkCollection[counter39].style.background="#00FF00";
     trueLinkCollection[counter39].style.color="#0000FF";
						   }
		}
  if ((window.parent.greenLinkExist!=null)&&(greenLinkCollection.length<=10)){
   if (dir==1){if(greenLinkCollection[0]==null){return;}greenLinkCollection[0].focus();counter39=0;}
   if (dir==2){if(greenLinkCollection[1]==null){return;}greenLinkCollection[1].focus();counter39=1;}
   if (dir==3){if(greenLinkCollection[2]==null){return;}greenLinkCollection[2].focus();counter39=2;}
   if (dir==4){if(greenLinkCollection[3]==null){return;}greenLinkCollection[3].focus();counter39=3;}
   if (dir==5){if(greenLinkCollection[4]==null){return;}greenLinkCollection[4].focus();counter39=4;}
   if (dir==6){if(greenLinkCollection[5]==null){return;}greenLinkCollection[5].focus();counter39=5;}
   if (dir==7){if(greenLinkCollection[6]==null){return;}greenLinkCollection[6].focus();counter39=6;}
   if (dir==8){if(greenLinkCollection[7]==null){return;}greenLinkCollection[7].focus();counter39=7;}
   if (dir==9){if(greenLinkCollection[8]==null){return;}greenLinkCollection[8].focus();counter39=8;}
   if (dir==0){if(greenLinkCollection[9]==null){return;}greenLinkCollection[9].focus();counter39=9;}
					                                     }
  if ((window.parent.greenLinkExist!=null)&&(greenLinkCollection.length>10)){
   if (dir==1){if(greenLinkCollection[0]==null){return;}greenLinkCollection[0].focus();counter39=0;}
   if (dir==2){if(greenLinkCollection[2]==null){return;}greenLinkCollection[2].focus();counter39=2;}
   if (dir==3){if(greenLinkCollection[4]==null){return;}greenLinkCollection[4].focus();counter39=4;}
   if (dir==4){if(greenLinkCollection[6]==null){return;}greenLinkCollection[6].focus();counter39=6;}
   if (dir==5){if(greenLinkCollection[8]==null){return;}greenLinkCollection[8].focus();counter39=8;}
   if (dir==6){if(greenLinkCollection[10]==null){return;}greenLinkCollection[10].focus();counter39=10;}
   if (dir==7){if(greenLinkCollection[12]==null){return;}greenLinkCollection[12].focus();counter39=12;}
   if (dir==8){if(greenLinkCollection[14]==null){return;}greenLinkCollection[14].focus();counter39=14;}
   if (dir==9){if(greenLinkCollection[16]==null){return;}greenLinkCollection[16].focus();counter39=16;}
   if (dir==0){if(greenLinkCollection[18]==null){return;}greenLinkCollection[18].focus();counter39=18;}
					                                     }
  if (dir=='enter'){
   if (trueLinkCollection[counter39].href.substring(0,4)=='http'){open(trueLinkCollection[counter39].href,'_new');return;}
   if (trueLinkCollection[counter39].href.substring(0,4)=='www.'){open(trueLinkCollection[counter39].href,'_new');return;}
   window.parent.location.href=trueLinkCollection[counter39].href
		   }
					   }


//    if((trueLinkCollection[counter39].href.substring(0,17)=='javascript:text_a')&&(trueLinkCollection[counter39].style.display=='')){}
//    if((trueLinkCollection[counter39].href.substring(0,17)=='javascript:text_a')&&(trueLinkCollection[counter39].style.display=='inline')){}
//    if((trueLinkCollection[counter39].href.substring(0,17)=='javascript:text_a')&&(trueLinkCollection[counter39].style.display=='none')){}
//    if((trueLinkCollection[counter39].href.substring(0,17)=='javascript:text_w')&&(trueLinkCollection[counter39].style.display=='')){}
//    if((trueLinkCollection[counter39].href.substring(0,17)=='javascript:text_w')&&(trueLinkCollection[counter39].style.display=='inline')){}
//    if((trueLinkCollection[counter39].href.substring(0,17)=='javascript:text_w')&&(trueLinkCollection[counter39].style.display=='none')){}


function window.parent.damnedRescue(){
  var a=document.getElementById("hauptInhalt");
  a.focus();
				     }

function window.parent.anotherOneRescue(){
  if (window.parent.slide==2){window.parent.webRadioMove('enter');}
					 }

function window.parent.linkNavigate(prolet){
  if (prolet=='back'){window.history.go(-1);}
  if (prolet=='next'){window.history.go(1);}
				           }

function window.parent.stopBMW(){
  var page=new Array;
   page[0]=document.URL.split('99');
  if (page[0][1]=='84.0.html'){
  window.parent.location.href='tvoon://tv/preview?activ=1';
  Player.close();
			       } 
				}

function window.parent.portalEscape(){}
