function AbrirPopUp(Cual,Nombre,width,height,left,top,sb) {
 if (sb==1){ sb='yes'; } else { sb='no'; }
 if (Nombre==undefined) { Nombre='MercadoFiesta' }
 Abre=open(Cual,Nombre,'width='+width+',height='+height+',left='+left+',top='+top+',scrollbars='+sb+',toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,titlebar=no');
}
function verprov(){
 if (Buscador.pr.value!=1) { 
  AbrirPopUp('futprovincia.htm','MFFutProvincia',300,175,200,225,0);
  Buscador.pr.value=1;
 }
}
function verform(){
 if (Buscador.b.value !="") { 
  Buscador.submit();
 }
}
function ContactoEntidad(Cual) { Abre=open('contactoentidad.asp?ce='+Cual,'MFContactoEntidad','width=575,height=525,left=95,top=5,scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,titlebar=no'); }
function MasInfoWeb(Cual) {
 AbrirPopUp('avisos/'+Cual+'.htm','MFPubWeb',718,500,25,25,1)
}
function MasInfoTex(Cual) {
 AbrirPopUp('veraviso.asp?ce='+Cual,'MFPubTex',475,400,150,100,1)
}

function Colorear(idcel,idccol) {
 var c=eval("document.all."+idcel);
 if (c && c.style) c.style.background=idccol;
}
function mClk(src,cual) {
 if(event.srcElement.tagName=='TD'){
  src.children.tags('A')[0].click();
 }
}

function getViewportSize() {
 var x, y;
 if (self.innerHeight) { // MOS
  y = self.innerHeight;
  x = self.innerWidth;
 } else if (document.documentElement && document.documentElement.clientWidth) { // IE6 Strict
  x = document.documentElement.clientWidth;
  y = document.documentElement.clientHeight;
 } else if (document.body.clientHeight) { // IE quirks
  y = document.body.clientHeight;
  x = document.body.clientWidth;
 }
 return {x: x, y: y};
}
function AbreVentana(Fondo,Frente) {
 document.getElementById(Fondo).style.display='block';
 document.getElementById("VentanaFlotante").style.display='block';
 document.getElementById(Frente).style.display='block';
 getViewportSize();
 ventana=getViewportSize();
 document.getElementById(Fondo).style.height=document.body.scrollHeight+"px";
}
function CierraVentana(Fondo,Frente) {
 document.getElementById(Fondo).style.display='none';
 document.getElementById(Frente).style.display='none';
 document.getElementById("VentanaFlotante").style.display='none';
// document.getElementById('VentanaFlotante').innerHTML='';
}
