<!--

ie=document.all?1:0
n=document.layers?1:0
var numberOfMenus=4
var mwidth=144
var pxBetween=8
var fromLeft=4
var fromTop=70         
var bgColor='beige'
var bgColorChangeTo='teal'
var imageHeight=12
var posiCubo=10;
var posiFeedback=15;
var cuboOculto =1;
if ((screen.width == 1024) && (screen.height == 768)) {
fromLeft=144;
}

function mover(cosa){

barraScroll= document.body.scrollTop;
document.all.mercado.style.top= barraScroll +370;
objeto= cosa;

if(document.all){
diff = document.body.scrollTop +10 - posiCubo;
     if(diff>=0){
diff=Math.min(Math.round(diff/2),20);
     }else{
diff=Math.max(Math.round(diff/2),-20);
     }
document.all[cosa].style.top= posiCubo+ diff;
posiCubo= posiCubo+ diff;
      if (document.body.scrollTop +10 != posiCubo){
         tiempoMuerto=setTimeout("mover(objeto)", 15);
         }
}else{
diff = window.pageYOffset +10 - posiCubo;
     if(diff>0){
diff=Math.min(Math.round(diff/2),20);
 
     }else{
diff=Math.max(Math.round(diff/2),-20);
     }
document.layers[cosa].all.style.top= posiCubo+ diff;
posiCubo= posiCubo+ diff;
if(window.pageYOffset+10 != posiCubo){
   tiempoMuerto=setTimeout("mover(objeto)", 15);
}
}
}


function makeNewsMenu(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.'					
	this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')	
this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offsetHeight')

	this.moveIt=b_moveIt;this.bgChange=b_bgChange;
	this.slideUp=b_slideUp; this.slideDown=b_slideDown;
	this.clipTo=b_clipTo;
    this.obj = obj + "Object"; 	eval(this.obj + "=this")		
}

function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
function b_bgChange(color){if(ie) this.css.backgroundColor=color; else this.css.bgColor=color}
function b_clipTo(t,r,b,l){
	if(n){this.css.clip.top=t; this.css.clip.right=r; this.css.clip.bottom=b; this.css.clip.left=l
	}else this.css.clip="rect("+t+","+r+","+b+","+l+")";
}
function b_slideUp(ystop,moveby,speed,fn,wh){
	if(!this.slideactive){
		if(this.y>ystop){
			this.moveIt(this.x,this.y-5); eval(wh)
			setTimeout(this.obj+".slideUp("+ystop+","+moveby+","+speed+",'"+fn+"','"+wh+"')",speed)
		}else{
			this.slideactive=false; this.moveIt(0,ystop); eval(fn)
		}
	}
}
function b_slideDown(ystop,moveby,speed,fn,wh){
	if(!this.slideactive){
		if(this.y<ystop){
			this.moveIt(this.x,this.y+5); eval(wh)
			setTimeout(this.obj+".slideDown("+ystop+","+moveby+","+speed+",'"+fn+"','"+wh+"')",speed)
		}else{
			this.slideactive=false; this.moveIt(0,ystop); eval(fn)
		}
	}
}

function newsMenuInit(){

	oTopMenu=new Array()
	for(i=0;i<=numberOfMenus;i++){
		oTopMenu[i]=new Array()
		oTopMenu[i][0]=new makeNewsMenu('divTopMenu'+i)
		oTopMenu[i][1]=new makeNewsMenu('divTopMenuBottom'+i,'divTopMenu'+i)
		oTopMenu[i][2]=new makeNewsMenu('divTopMenuText'+i,'divTopMenu'+i)
		oTopMenu[i][1].moveIt(0,imageHeight)
		oTopMenu[i][0].clipTo(0,mwidth,imageHeight+3,0)
		oTopMenu[i][0].moveIt(i*mwidth+fromLeft+(i*pxBetween),fromTop)
		oTopMenu[i][0].css.visibility="visible"
	}
animateLogo();
}

function topMenu(num){
	if(oTopMenu[num][1].y==imageHeight) oTopMenu[num][1].slideDown(oTopMenu[num][2].scrollHeight+20,10,40,'oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)')
	else if(oTopMenu[num][1].y==oTopMenu[num][2].scrollHeight+20) oTopMenu[num][1].slideUp(imageHeight,10,40,'oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)','oTopMenu['+num+'][0].clipTo(0,mwidth,oTopMenu['+num+'][1].y+3,0)')
}

function menuOver(num){
num.style.background="#888888";
}
function menuOut(num){
num.style.background="black";
}

function tamanoPantalla(){

alto= window.screen.availHeight +8;
ancho= window.screen.availWidth +8;
window.moveTo(-4,-4);
window.resizeTo(ancho, alto);


if ((screen.width == 640) && (screen.height == 480)) {
document.all?document.all["cubo"].style.width=1020: document.layers["cubo"].all.style.width=640;
}
if ((screen.width == 1024) && (screen.height == 768)) {
document.all?document.all["cubo"].style.width=988: document.layers["cubo"].all.style.width=988;
document.all?document.all["pantalla"].style.left=410:document.layers["pantalla"].all.style.left=350;
}
}

onload=newsMenuInit;

function animateLogo(){
tamanoPantalla();
moverEfecto();
}

if (document.all) {
yourLogo = 'nja en la red- La nara';
logoFont = "tahoma";
logoColor = "#3BEB05";
yourLogo = yourLogo.split('');
L = yourLogo.length; 
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:10px;left:10px; z-index:600;"><div style="position:relative">');
for(i = 0; i < L; i++) {
document.write('<div id="raton" style="position:absolute;top:10px;left:10px;'+'width:10px;height:10px;font-family:'+logoFont+';font-size:11px; font-weight: bold;'+'color:'+logoColor+';text-align:center; z-index: 550;">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;

function moverEfecto() {
outer.style.pixelTop = document.body.scrollTop; 
for (i = 0; i < L; i++) {
raton[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
raton[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = raton[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
raton[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('moverEfecto()', 200);
}
}

function ocultarCubo(){
if(event.keyCode==19){
cuboOculto*=-1;
if(document.all){
   if(cuboOculto<0){
document.all["cubo"].style.visibility='hidden';
document.all["divTopMenu0"].style.visibility='hidden';
document.all["divTopMenu1"].style.visibility='hidden';
document.all["divTopMenu2"].style.visibility='hidden';
document.all["divTopMenu3"].style.visibility='hidden';
document.all["divTopMenu4"].style.visibility='hidden';
                   }else{
document.all["cubo"].style.visibility='visible';   
document.all["divTopMenu0"].style.visibility='visible';   
document.all["divTopMenu1"].style.visibility='visible';   
document.all["divTopMenu2"].style.visibility='visible';   
document.all["divTopMenu3"].style.visibility='visible';   
document.all["divTopMenu4"].style.visibility='visible';   
                   }  
                 }
if(document.layers){
      if(cuboOculto<0){
document.layers["cubo"].all.style.visibility='hidden';
                      }else{
document.layers["cubo"].all.style.visibility='shown';
                      }
                   }
}
}
-->