function PNG_loader() {
   for(var i=0; i<document.images.length; i++) {
      var img = document.images[i];
      var imgName = img.src.toUpperCase();
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
         var imgID = (img.id) ? "id='" + img.id + "' " : "";
         var imgClass = (img.className) ? "class='" + img.className + "' " : "";
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
         var imgStyle = "display:inline-block;" + img.style.cssText;
         if (img.align == "left") imgStyle += "float:left;";
         if (img.align == "right") imgStyle += "float:right;";
         if (img.parentElement.href) imgStyle += "cursor:hand;";
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
         img.outerHTML = strNewHTML;
         i--;
      }
   }
}



$(document).ready(function(){

$(".rollover").hover(
 function() {
  curr = $(this).find("img").attr("src");
  overlen = curr.length;
  over = curr.substr(0, overlen-4);
  over = over+'-h.gif';
  $(this).find("img").attr({ src: over});
 },
 function() {
  $(this).find("img").attr({ src: curr});
 }
)

$(".rollover").find("img").each(function(i) {
  temp = this.src;
  prelen = temp.length;
  pre = temp.substr(0, prelen-4);
  pre = pre+'-h.gif';
  preload_image_object = new Image();
  preload_image_object.src = pre;
});


//PNG_loader();


});


function info(load,an_,al_){
	if(al_){
		a_ = an_/2;
		b_ = al_/2;
		ancho = screen.width/2-a_;
		alto = screen.height/2-b_;
		window.open(load,'pop','left='+ancho+',top='+alto+',width='+an_+'px,height='+al_+'px');	
	}else{
		ancho = screen.width/2-320;
		alto = screen.height/2-220;
		window.open(load,'pop','left='+ancho+',top='+alto+',width=650px,height=450px');	
	}
}

function popupImg(img){
foto1= new Image();
foto1.src=(img);
Control(img);
}

function Control(img){
if((foto1.width!=0)&&(foto1.height!=0)){
verFoto(img);
}
else{
funcion="Control('"+img+"')";
intervalo=setTimeout(funcion,20);
}
}

function verFoto(img){
	anchom = screen.width/2-320;
	altom = screen.height/2-220;

ancho=foto1.width+20;
alto=foto1.height+20;
cadena="width="+ancho+",height="+alto+",left="+anchom+",top="+altom;
ventana=window.open(img,"",cadena);
}








function pop(fuente,nom,an,al){
	ppw = an/2;
	pw = screen.width/2-ppw;

	pph = al/2;
	ph = screen.height/2-pph;

	window.open(fuente,nom,"width="+an+"px,height="+al+"px,top="+ph+",left="+pw+",scrollbars=yes");
}









function popupImg2(img){
foto1= new Image();
foto1.src=(img);
Control2(img);
}

function Control2(img){
if((foto1.width!=0)&&(foto1.height!=0)){
verFoto2(img);
}
else{
funcion="Control2('"+img+"')";
intervalo=setTimeout(funcion,20);
}
}

function verFoto2(img){
	anchom = screen.width/2-320;
	altom = screen.height/2-220;

ancho=foto1.width+20;
alto=foto1.height+20;
cadena="width="+ancho+",height="+alto+",left=0px,top=0px";
ventana=window.open(img,"",cadena);
}