var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&

                parseFloat(navigator.appVersion) >= 4) ? 1 : 0;

var isMinIE4 = (document.all) ? 1 : 0;

var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;



function getImage(name) {



  if (isMinNS4) {

    return findImage(name, document);

  }

  if (isMinIE4)

    return eval('document.all.' + name);

  return null;

}





function changeimage(towhat,url){

if (document.images){

document.images.targetimage.src=towhat.src

gotolink=url

}

}





function findImage(name, doc) {



  var i, img;



  for (i = 0; i < doc.images.length; i++)

    if (doc.images[i].name == name)

      return doc.images[i];

  for (i = 0; i < doc.layers.length; i++)

    if ((img = findImage(name, doc.layers[i].document)) != null) {

      img.container = doc.layers[i];

      return img;

    }

  return null;

}

function init() {

  var img;

  mainLayerImage = getImage("pic");

}

pic = new Array()

pic[0] = ""

pic[1] = ""

var i_pic = 0

var timer

var x = 0

var y = 0

var filteractive=0

function filteraktivator(filterstatus) {

   filteractive=filterstatus

}





function positionrulers() {

	if(document.layers) {

		document.vertical.left=x

		document.horizontal.top=y

		document.vertical1.left=x

		document.horizontal1.top=y

        if (filteractive==1) {

            document.vertical2.left=x

            document.horizontal2.top=y

            document.vertical3.left=x

            document.horizontal3.top=y

        }

         if (filteractive==0) {

            document.vertical2.left=-110

            document.horizontal2.top=-110

            document.vertical3.left=-110

            document.horizontal3.top=-110

        }

	}

	if(document.all) {

		document.all.vertical.style.posLeft=x - 1

		document.all.horizontal.style.posTop=y - 1

		document.all.vertical1.style.posLeft=x - 1

		document.all.horizontal1.style.posTop=y - 1

         if (filteractive==1) {

            document.all.vertical2.style.posLeft=x - 1

            document.all.horizontal2.style.posTop=y - 1

            document.all.vertical3.style.posLeft=x - 1

            document.all.horizontal3.style.posTop=y - 1

        }

         if (filteractive==0) {

            document.all.vertical2.style.posLeft=-110

            document.all.horizontal2.style.posTop=-110

            document.all.vertical3.style.posLeft=-110

            document.all.horizontal3.style.posTop=-110

        }

	}

    timer =setTimeout("positionrulers()",20)

}



var where = "";

function checkwhere(e) {

        if (document.layers){

        x = e.x;

        y = e.y;

}

        else if (document.all){

        x = event.clientX;

        y = event.clientY;

}

        else if (document.getElementById){

        x = e.clientX;

        y = e.clientY;

}

        self.status = "   VALORES DE COORDENADAS       X= " + x + "px" + "  Y= " + y + "px"; 

        }

document.onmousemove = checkwhere;

if(document.layers) {document.captureEvents(Event.MOUSEMOVE);

}





