<!--
//pocano scripting command library
//all rights reserved (c)2004 enrico perei

//vars
psgsSeprtID="seprt";
psSeprtA="_";
psgsSeprtA="_";
psgsSeprtB="^";
psgsSeprtC="°";
psgsUpwards="upwrd";
psgsWait="w";
psgsEnd="x";
psgsWaitDefault=2000;
psgsBlendMode="bm";
psgsBlendModeDefault="hc";
psgsBlendModeHardcut="hc";
psgsBlendModeColor="cl";
//functions

function psRandom(rbeg,rend)
 {
	ra=rbeg;
	rb=rend;
	nExp=1;
    while(rend>=Math.pow(10,nExp))
	{
		nExp++;
	}
    mul=Math.pow(10,nExp);
  rda=Math.random ();
  rdb=Math.round(rda*mul);
  if(rdb>rbeg-1)
   { 
    if(rdb<rend+1)
         { 
          randomback=rdb;
          return(randomback);
         }
   }
  psRandom(ra,rb);
 }


function psIDOutput(sTarget,sOutput)
{
	top.window.document.getElementById(sTarget).innerHTML=sOutput;

}

function psGetLocalized(sLanguage,sID)
{
	sOutput=Localized[sLanguage][sID].split(Localized[sLanguage][psgsSeprtID]);
	nRnd=psRandom(0,sOutput.length-1);
	if(Localized[sLanguage][sID+"shown"]==false)
	{
	 Localized[sLanguage][sID+"shown"]=true;
	 return(sOutput[0]);
	}
	else
	{
	 return(sOutput[randomback]);
	}
}


function psInitLocal(sLang,sSepr)
{
	ids=dList[sLang].split(sSepr);
	for(y=0;y<ids.length;y++)
		{
			Localized[sLang][ids[y]+"shown"]=false;
		}
}

function psTextBlender(sLang,sOutput,nActualPos)
{
	sOP=Localized[sLang][sOutput].split(psgsSeprtA);
	psIDOutput(sOutput,sOP[nActualPos]);
	nActualPos++;
	nWait=nActualPos;
	nActualPos++;
	if(nActualPos>=sOP.length)nActualPos=0;
	nAPos=nActualPos;
	window.setTimeout("psTextBlender('"+sLang+"','"+sOutput+"',"+nAPos+")",sOP[nWait]);

}


function psColorBlend(sColorList,nActual,sTarget,sFinishOrder)
{

	sCol=sColorList.split(psgsSeprtB);
	top.window.document.getElementById(sTarget).style.color=sCol[nActual];
	nActual++;
	if(nActual>=sCol.length)
	{
		sF=sFinishOrder.split(psgsSeprtC);
		psTextBlender(sF[0],sF[1],sF[2],sF[3],sF[4]);
	}
	else
	{
	    sTO="'"+sColorList+"','"+nActual+"','"+sTarget+"','"+sFinishOrder+"'";
		window.setTimeout("psColorBlend("+sTO+")",300);	
	}
}
function ColorBlend_A(nActual)
{
	sTarget="info";
	nMax=3;
	sCol=new Array();
	sCol[0]="000000";
	sCol[1]="333333";
	sCol[2]="555555";
	sCol[3]="888888";
	top.window.document.getElementById(sTarget).style.color=sCol[nActual];
	nActual++;
	if(nActual<nMax)window.setTimeout("ColorBlend("+nActual+")",300);
}
//-->
