// JavaScript Document
function PermutDer (flag,img) {
   if (document.images) {
        if (document.images[img].permloaded) {
            if (flag==1) document.images[img].src = "comun/imagenes/iconos/flechaDerGris.gif";
            else document.images[img].src = "comun/imagenes/iconos/flechaDerAzul.gif";
        }
   }
}
function PermutIz (flag,img) {
   if (document.images) {
        if (document.images[img].permloaded) {
            if (flag==1) document.images[img].src = "comun/imagenes/iconos/flechaIzGris.gif";
            else document.images[img].src = "comun/imagenes/iconos/flechaIzAzul.gif";
        }
   }
}
function Permut (img,src) {
   if (document.images) {
        if (document.images[img].permloaded) {
            document.images[img].src = src;
        }
   }
}
function PermutMenu (flag,img) {
  if (document.images) {
        if (document.images[img].permloaded) {
            if (flag==1) 
			{
				document.images[img].src = "http://" + get_servidor(3) +"/comun/imagenes/botones/btn" + img +"Hover.gif";
				//document.images[img].src = "http://www.olivanova.com/comun/imagenes/botones/btn" + img +"Hover.gif";
			}
            else document.images[img].src = "http://" + get_servidor(3) +"/comun/imagenes/botones/btn" + img +"Rep.gif";
        }
   }
}
function PermutBotonera (flag,img) {
  if (document.images) {
        if (document.images[img].permloaded) {
            if (flag==1) 
			{
				document.images[img].src = "http://" + get_servidor(3) +"/imagenes/botones/destacado" + img +"Hover.gif";
				//document.images[img].src = "http://www.olivanova.com/imagenes/botones/destacado" + img +"Hover.gif";
			}
            else
			{
				document.images[img].src = "http://" + get_servidor(3) +"/imagenes/botones/destacado" + img +"Rep.gif";
			}
        }
   }
}


function preloadPermutMenu (img) {
	var adress = "comun/imagenes/botones/btn" + img + "Hover.gif";

	preloadPermut(img,adress);
}



function preloadPermutBotonera (img) {
	var adress = "imagenes/botones/destacado" + img + "Hover.gif";

	preloadPermut(img,adress);
}
function preloadPermut (img,adresse) {
   if (document.images) {
        img.onload = null;
        img.perm = new Image ();
        img.perm.oldsrc = img.src;
        img.perm.src = adresse;
        img.permloaded = true;
   }
}