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 galeria(url){
	ancho = screen.width/2-400;
	alto = screen.height/2-300;

	window.open(url,'galeria','left='+ancho+',top='+alto+',width=800px,height=600px,scrollBars=1');	
}

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 mymail(usuario,dominio){
if(!usuario) { 
nombre = usuario;
sitio = dominio;
document.write('<a id=\"general\" href=\"javascript:alert(\'Este socio no cuenta con correo electronico\');\" alt=\"Contactar\" title=\"Contactar\">');
 }

else {
nombre = usuario;
sitio = dominio;
document.write('<a id=\"general\" href=\"mailto:' + nombre + '@' + sitio + '\" alt=\"Contactar\" title=\"Contactar\">');
}

} // fin de funcion mymail