<!--
function inic() 
{
// alert("1-inic")
  if (is.ns4) 
  {  windWidth=innerWidth;
     windHeight=innerHeight;
  } else 
  {
    if (is.ie4) {
     windWidth=document.body.offsetWidth;
     windHeight=document.body.offsetHeight;
    }
  }
  preLoad();
//   alert("2-inic " + windWidth + " - " + windHeight)
}

var windWidth;
var windHeight;
var gAnte=0;

function isNavegador() 
{
// alert("isNavegador")
  this.ns4=false;
  this.ie4=false;
  if ((navigator.appName.indexOf("Netscape")>-1) && (parseInt(navigator.appVersion)>=4))
  { this.ns4=true; }
  if ((navigator.appName.indexOf("Microsoft")>-1) && (parseInt(navigator.appVersion)>=4))
  { this.ie4=true; }
}

var is = new isNavegador();

if (is.ns4)
{ doc = "document";
  sty="";
  htm=".document";
} else 
{ if (is.ie4)
  { doc = "document.all";
    sty=".style";
    htm="";
  }
// alert("doc: " + doc + " sty: "+ sty + " htm: " + htm);
}

var count=0;

function preLoad() {
 ch_0 = new Image();
 ch_0.onLoad=loadCheck();
 ch_0.src="images/ch_0.gif"
 
 ch_1 = new Image();
 ch_1.onLoad=loadCheck();
 ch_1.src="images/ch_1.gif"
 
 ch_2 = new Image();
 ch_2.onLoad=loadCheck();
 ch_2.src="images/ch_2.gif"

}

function loadCheck() {
  count++;
  if (count==3) {
    layerSetup();
  }
}

function layerSetup() {
 var wTop;
// wTop = windHeight - 400;
// wLeft = windWidth - 400;

 wTop =230;
 if (wTop<0) { wTop=0; }
 var wLeft;
 wLeft=100;
 if (wLeft < 0) { wLeft=0; }
 ch0Lyr = eval(doc + '["ch0Layer"]' + sty);
 ch0Lyr.left=wLeft;
 ch0Lyr.top=wTop; // 240;

 ch1Lyr = eval(doc + '["ch1Layer"]' + sty);
 ch1Lyr.left=wLeft;
 ch1Lyr.top=wTop // 240;
 
 ch2Lyr = eval(doc + '["ch2Layer"]' + sty);
 ch2Lyr.left= wLeft;
 ch2Lyr.top=wTop; // 240;
 
 visibilitySetup();
}

function visibilitySetup() {
// alert("1-visibilitySetup");
 ch0Lyr.visibility="visible";
 ch1Lyr.visibility="visible";
 ch2Lyr.visibility="visible";
 arraySetup();
}

function arrayValues(left,top,right,bottom,mapa) {
// alert("1-arrayValues");
 this.top=top;
 this.right=right;
 this.bottom=bottom;
 this.left=left;
 this.mapa=mapa;

}

function arraySetup() {
// alert("1-arraySetup");
 clippingBox = new Array();
 clippingBox[0] = new arrayValues(0,0,0,0,0);
 clippingBox[1] = new arrayValues(30,0,350,34,1); // I
 clippingBox[2] = new arrayValues(33,34,350,84,2);   // II
 clippingBox[3] = new arrayValues(29,77,350,118,1);  // III
 clippingBox[4] = new arrayValues(33,118,350,147,2);   // IV
 clippingBox[5] = new arrayValues(32,143,350,162,1); // V
 clippingBox[6] =new arrayValues(39,156,350,183,2);  // RM
 clippingBox[7] = new arrayValues(32,163,350,178,1);  // VI
 clippingBox[8] = new arrayValues(28,183,350,194,2);  // VII
 clippingBox[9] = new arrayValues(20,189,350,213,1);  // VIII
 clippingBox[10] = new arrayValues(22,207,350,223,2);  // IX
 clippingBox[11] =new arrayValues(19,224,350,275,1);  // X 
 clippingBox[12] =new arrayValues(17,275,350,334,2);  // XI
 clippingBox[13] =new arrayValues(16,333,350,393,1);  // XII
 clipMenu(0);
}

function clipMenu(box) {
 var wNum;
 wNum=1
 if (box!=0) {
  wNum=clippingBox[box].mapa;
  if (wNum!=gAnte) {
   switch (wNum)
   {
    case 1:
 ch1Lyr.visibility="visible";
 ch2Lyr.visibility="hidden";
 chLyr=ch1Lyr
     break;
    case 2:
 ch1Lyr.visibility="hidden";
 ch2Lyr.visibility="visible";
 chLyr=ch2Lyr
     break;
   }
  }
 } else {
  ch1Lyr.visibility="hidden";
  ch2Lyr.visibility="hidden";
  chLyr=ch1Lyr
 }
 clipMenu1(box);  
} 

function clipMenu1(box) {
 var cTop=clippingBox[box].top;
 var cLeft=clippingBox[box].left;
 var cRight=clippingBox[box].right;
 var cBottom=clippingBox[box].bottom;
 if (is.ns4) {
  chLyr.clip.top=cTop;
  chLyr.clip.left=cLeft;
  chLyr.clip.bottom=cBottom;
  chLyr.clip.right=cRight;
 } else {
  chLyr.clip='rect(' + cTop + ' ' + cRight + ' ' + cBottom + ' ' + cLeft + ')';
 }
} 
//-->

