ns4 = (document.layers)? true:false
logobloqueo=0;
ie4 = (document.all)? true:false
if (document.images){

    image13on = new Image();
    image13on.src = ".jpg";
    image13off = new Image();
    image13off.src = ".jpg";
}


function nav_dhtml()
{
	if (parseInt(navigator.appVersion)<4)  location="no_dhtml.html"
}

var layerRef="null",layerStyleRef="null",styleSwitch="null",layerName;
var posx,posy;
var cont=0;
var paso=0;
var bloqueo=false;

function init()
{
	
	if (navigator.appName == "Netscape")
	{
		layerStyleRef="layer.";
		layerRef="document.layers";
		styleSwitch="";
        }
	else
	{
		layerStyleRef="layer.style.";
		layerRef="document.all";
		styleSwitch=".style";
	}


}

function showLayer(layerName)
{
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}


function hideLayer(layerName)
{
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}


function moveLayer(layerName,left,top,trans)
{
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top='+top);
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left='+left);
if (ie4) eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.filter="Alpha(Opacity:'+trans+')"')
} 


function animateLayer(layerName,speed,menu,xini,yini,xfin,yfin){
	
	numx = (xfin-xini>=0)? 1:-1
	numy = (yfin-yini>=0)? 1:-1
	xini1=xini
	yini1=yini
	xfin1=xfin
	yfin1=yfin
	
	
	
	if (cont==0){ moveLayer(layerName,xini,yini);showLayer(layerName)}
	if ((numy*(yini1-yfin1))<(1-speed) || (numx*(xini1-xfin1))<(1-speed))
	{
		if((numx*xini1)<xfin) xini1+=(speed*numx)
		if((numy*yini1)<yfin) yini1+=(speed*numy)
		
		var trans=10*cont
		moveLayer(layerName,xini1,yini1,trans)
		setTimeout('animateLayer("'+layerName+'","'+speed+'","'+menu+'",xini1,yini1,"'+xfin+'","'+yfin+'")',30);
		cont+=1
		
	

	}
	else
	{
		cualo=menu
		cont=0;
		moveLayer(layerName,xfin,yfin,1000)
		paso=paso+1
		if (paso<8) desplegar_def(cualo);
	}
}


function desplegar(menu)
{
menu_def=menu
if (bloqueo==false) desplegar_def(menu_def)
}

function desplegar_def(menu)
{

	if (menu=="d")
	{
		if(paso==0){bloqueo=true;animateLayer('d1',10,'d',412,0,412,140)}
		if(paso>=1){bloqueo=false;paso=0}		
	}
	if (menu=="c")
	{
		if(paso==0){bloqueo=true;animateLayer('c1',10,'c',412,0,412,240)}
		if(paso>=1){bloqueo=false;paso=0}		
	}
	if (menu=="f")
	{
		if(paso==0){bloqueo=true;animateLayer('f1',10,'f',412,0,412,240)}
		if(paso>=1){bloqueo=false;paso=0}		
	}

	if (menu=="dd")
	{
		if(paso==0){bloqueo=true;animateLayer('dd1',10,'dd',412,0,412,200)}
		if(paso>=1){bloqueo=false;paso=0}		
	}
	if (menu=="cc")
	{
		if(paso==0){bloqueo=true;animateLayer('cc1',10,'cc',412,0,412,100)}
		if(paso>=1){bloqueo=false;paso=0}		
	}
	if (menu=="g")
	{
		if(paso==0){bloqueo=true;animateLayer('g1',10,'g',450,300,480,470)}
		if(paso>=1){bloqueo=false;paso=0}		
	}

}

function resetear()
{
	hideLayer('d1')
	hideLayer('c1')
	hideLayer('f1')
	hideLayer('dd1')
	hideLayer('cc1')
	hideLayer('g1')
}

// de aqui para abajo pertenecen al scroll de la index.html

<!--
    var scrmsg = ""; 
    var scrspacer = "  "; 
    var scrpos = 0; 
    function ScrollMessage() 
    { 
        window.status = scrmsg.substring(scrpos, scrmsg.length) + scrspacer + 
            scrmsg.substring(0,scrpos); 
        scrpos++; 
        if (scrpos > scrmsg.length) scrpos = 0; 
        window.setTimeout("ScrollMessage()", 150); 
    } 

    ScrollMessage(); 

    var msg="GuíaSayago. Todo lo que quieras saber sobre Sayago, Los Arribes y Castilla y León.                           ";
    var speed=200;

    function ScrollTitle() {
        document.title=msg;
        msg=msg.substring(1,msg.length)+msg.charAt(0);
        setTimeout("ScrollTitle()",speed);
    }
    ScrollTitle();
    //-->