﻿var w3c_ok=false
var dhtml_ok=false
var layersdom_ok=false

if (document.getElementById) {
    w3c_ok=true
}
if (document.all) {
    dhtml_ok=true
}
if (document.layers) {
    layersdom_ok=true
}
if (w3c_ok || dhtml_ok){
}
else {
alert("Esta página no puede visualizarse con su explorador. Se le dirigirá a la página principal");
location.href="index.htm";
}

            var curPic = 0;
	    var curTxt = 0;
	    var proximg = new Image();

            function processPrevious() {
            if (curPic==0)
            {
                 curPic=Pictures.length - 1;
            }
            else
            {
                 curPic--;
            }
	if (w3c_ok){
            	document.getElementById("imgFoto").src=Pictures[curPic];
		document.getElementById("lblLeyenda").innerHTML=Leyendas[curPic];
	}
  	else {
		document.all("imgFoto").src=Pictures[curPic];
		document.all("lblLeyenda").innerHTML=Leyendas[curPic];
	}   
 }


	function SigPic() {
	if (curPic==Pictures.length-1)
	{return 0;
	}
	else
	{
	return curPic+1;
	}
	}





      function processNext()
      {

            if (curPic==Pictures.length -1)
            {
                 curPic=0;
            }
            else
            {
                 curPic++;
            }
	if (w3c_ok){

            	document.getElementById("imgFoto").src=Pictures[curPic];
		document.getElementById("lblLeyenda").innerHTML=Leyendas[curPic];
		proximg.src=Pictures[SigPic()];
	}  	
	else {
		
		document.all("imgFoto").src=Pictures[curPic];
		document.all("lblLeyenda").innerHTML=Leyendas[curPic];
		proximg.src=Pictures[SigPic()];
	}   

      }

function OpenLTPgnViewer(urlstr, width, height)
{ window.open(urlstr,"AjedrezMenorca","width="+width+",height="+height+",menubar=no,locationbar=no,resizable=yes,status=no,scrollbars=no");
}


