

function abreVentanaForo(clavePadre,path)
{
wforo= window.open('http://foros.esmas.com/loginForoEspecial.jsp?cvepadre=' + clavePadre + '&pth=' + path, 'foros','resizable,location,menubar,toolbar,status,scrollbars');
}




 function abreVentanaChat(urlgotog,svr) {  
     if (document.all)  
          var xMax = screen.width, yMax = screen.height;  
         else  
             if (document.layers)  
                      var xMax = window.outerWidth, yMax = window.outerHeight;  
             else  
                      var xMax = 640, yMax=480;  
         var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;  
     wpopup=window.open('http://chats.esmas.com/sitio/popupcs.jsp?room='+urlgotog+'&svr='+svr,'_blank','resizable=no,menubar=no,location=no,toolbar=no,status=no,scrollbars=no,width=180,height=110,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');  
}


function openVideoGal(url){
	if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;
    var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;
		newWindow = window.open(url,'_blank',"resizable=no,menubar=no,location=no,toolbar=no,status=no,scrollbars=no,width=468,height=490,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'");
}

function openVideoEsmasSkin(idnodo){
var url = "http://www.esmas.com/NASApp/portal/vidnt.jsp?id=" + idnodo;
	if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;
    var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;
		newWindow = window.open(url,'_blank',"resizable=no,menubar=no,location=no,toolbar=no,status=no,scrollbars=no,width=350,height=415,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'");
}


function openPopWindow(url,ancho,alto){
	if (document.all)
        var xMax = screen.width, yMax = screen.height;
    else
        if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        else
            var xMax = 640, yMax=480;
    var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;
		newWindow = window.open(url,'_blank',"resizable=no,menubar=no,location=no,toolbar=no,status=no,scrollbars=no,width='+ancho+',height='+alto+',screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'");
} 


function writeBanner(psit,pchn,psub,w,h,pos) {
  var sit = "site=esmas";
  var chn = "home";
  var sub = "";
  if (psit != null && psit !="") sit = "site=" + psit;
  if (pchn != null && pchn !="") chn = "&canal=" + pchn;  
  if (psub != null && psub !="") sub = "&subcanal=" + psub;
  document.write("<IFRAME WIDTH=\""+w+"\" HEIGHT=\""+h+"\" MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\" "+
  " HSPACE=\"0\" VSPACE=\"0\" FRAMEBORDER=\"0\" SCROLLING=\"no\" BORDERCOLOR=\"#000000\" "+
  " SRC=\"http://ads.esmas.com/html.ng/"+sit+chn+sub+"&adsize="+w+"x"+h+"&tile="+pos+"\">");
  document.write("<SCR"+"IPT language=\"JavaScript1.1\" "+
  " SRC=\"http://ads.esmas.com/js.ng/Params.richmedia=yes&"+sit+chn+sub+"&adsize="+w+"x"+h+"&tile="+pos+"\">");
  document.write("</SCR"+"IPT>");
  document.write("</IFRAME>");
}
