window.name='CBCalpe';
dayName = new Array ("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "S&aacute;bado")
nonName = new Array ("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre","Octubre","Noviembre","Diciembre")
now = new Date
  function get_fecha() {
  document.write("<b>" + dayName[now.getDay()]+ "</b>, "+ now.getDate()+ " de " + nonName[now.getMonth()]+ " de " + now.getFullYear())
  } 

function BrowserCheck()
{
    this.ver = navigator.appVersion;
    this.agent = navigator.userAgent;
    this.dom = document.getElementById?1:0;
    this.opera6 = this.agent.indexOf("Opera 6")>-1;
    this.opera5 = this.agent.indexOf("Opera 5")>-1;
    this.opera = (this.opera6 || this.opera5);
    this.ie5 = ((this.ver.indexOf("MSIE 5")>-1 || this.ver.indexOf("Internet Explorer 5")>-1) && this.dom && !this.opera)?1:0;
    this.ie6 = ((this.ver.indexOf("MSIE 6")>-1 || this.ver.indexOf("Internet Explorer 6")>-1) && this.dom && !this.opera)?1:0;
    this.ie4 = (document.all && !this.dom && !this.opera5)?1:0;
    this.ie = this.ie4 || this.ie5 || this.ie6;
    this.mac = this.agent.indexOf("Mac")>-1;
    this.ns6 = (this.dom && parseInt(this.ver) >= 5)?1:0;
    this.ns4 = (document.layers && !this.dom)?1:0;
    this.supp = (this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.opera6);

    return this;
}
var objBrowser = new BrowserCheck();
if(objBrowser.ns4)
{
    origWidth=innerWidth;
    origHeight=innerHeight;
    onresize=function(){ if(innerWidth!=origWidth||innerHeight!=origHeight)location.reload()}
}

function AddClipping(cTitulo, cUrl)
{	
	window.open("/mipais/addClipping.html?cUrl="+cUrl,"newClip","width=290,height=275");
}
function AddClip(cUrl)
{	
	window.open("/mipais/addClipping.html?xref="+cUrl,"newClip","width=290,height=275");
}


function getCookie(cookiename) {
 var cookiestring=""+document.cookie;
 var index1=cookiestring.indexOf(cookiename);
 if (index1==-1 || cookiename=="") return ""; 
 var index2=cookiestring.indexOf(';',index1);
 if (index2==-1) index2=cookiestring.length; 
 return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}

/////////////// FUNCIONES ESPECIFICAS DE LA APLICACION 
function abreEmergentes(URL)
{    var iheight = 462;
    if ( (objBrowser.mac) && (objBrowser.ns4) )
    {    iheight = 481; }
    var propierties = "width=560,height="+ iheight +",toolbar=no,scrollbars=no,resizable=no";
    window.open(URL,"Emergentes",propierties);
}

function imprimir()
{    var URL = "imprimir.html";
    var iWidth = 577;
    if ( (objBrowser.mac) && (objBrowser.ie) )
    {    iWidth = 560; }
    var propierties = "width="+ iWidth +",height=450,toolbar=no,scrollbars=yes,resizable=no";
    window.open(URL,"Imprimir",propierties);
}

function abreEnvio()
{    var URL = "enviarN.html";
    var iWidth = 391;
    if ( (objBrowser.mac) && (objBrowser.ie) )
    {    iWidth = 361; }
    var propierties = "width="+ iWidth +",height=504,toolbar=no,scrollbars=yes,resizable=no";
    window.open(URL,"EnviarNoticia",propierties);
}

function abreRecomienda()
{    var URL = "recomendar.html";
    var iWidth = 391;
    if ( (objBrowser.mac) && (objBrowser.ie) )
    {    iWidth = 361; }
    var propierties = "width="+ iWidth +",height=504,toolbar=no,scrollbars=yes,resizable=no";
    window.open(URL,"EnviarNoticia",propierties);
}
