function mideancho () {
var ancho =  screen.availWidth;

if (ancho == '800') {
window.location = "aindex.php";
}

if (ancho == '1024') {
window.location = "aindex.php";
}


}

function abrechat(alto,ancho)
{
window.open('http://www.chacocorrientes.com/BH-WebChat/in.php?nick='+document.google.nickname.value+'&canal='+document.google.canal.value,'chat','resizable=no,menubar=no,location=no,toolbar=no,status=no,scrollbars=no,directories=no,width='+ancho+',height='+alto+',left='+(screen.availWidth-ancho)/2+',top='+(screen.availHeight-alto)/2)
}


function suscripcion() {
window.open('suscripcion.php','','width=390,height=300');
}

function suscripcioncelulares() {
window.open('suscmovil.php','','width=390,height=300');
}

function recomendar() {
window.open('recomendar.php','','width=390,height=300');
}

function JSClock() {          
	var time = new Date()          
	var hour = time.getHours()          
	var minute = time.getMinutes()          
	var second = time.getSeconds()          
	var temp = ((hour > 12) ? hour - 12 : hour)          
	temp += ((minute < 10) ? ":0" : ":") + minute          
	temp += ((second < 10) ? ":0" : ":") + second          
	temp += (hour >= 12) ? "&nbsp;P.M." : "&nbsp;A.M."          
	document.getElementById("relojito").innerHTML = temp
	id = setTimeout("JSClock()",1000)
}


function getCookie(name) {
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0) {
    begin = dc.indexOf(cname);
    if (begin != -1) {
      begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    }
  }
  return null;
}
// --------------------------------------------------------------------------------------
function setCookie(cookieName,cookieValue,nDays) {
    var today = new Date();
    var expire = new Date();
    if (nDays==null || nDays==0) nDays=1;
    expire.setTime(today.getTime() + 3600000*24*nDays);
    document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}
// --------------------------------------------------------------------------------------
function delCookie (name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path == null) ? "" : "; path=" + path) +
    ((domain == null) ? "" : "; domain=" + domain) +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
     cambiaFuente('12', '');
  }
}
// --------------------------------------------------------------------------------------
var firstCall = true;
// --------------------------------------------------------------------------------------
function cambia(fSize, increment) {
  
    if (firstCall) { firstCall = false;
        if (increment != "") cambia('12', '');
    }
  
  if (document.getElementsByTagName) {
    tags = new Array ("span");
    for (j=0; j<tags.length; j++) {
      var getElement = document.getElementsByTagName(tags[j]);
      var eachElement, currentFontSize, fontIncrease, newFontSize;
      for (i=0; i<getElement.length; i++) {
        eachElement = getElement[i];
        if (increment != "") {
          currentFontSize = parseInt(eachElement.style.fontSize);
          fontIncrease = parseInt(increment);
          newFontSize = currentFontSize + fontIncrease;
          }
        else if (fSize != "")
            newFontSize = parseInt(fSize);
            if (newFontSize > 16) newFontSize = 16;
            if (newFontSize < 10) newFontSize = 10;
            eachElement.style.fontSize = newFontSize + "px";
            setCookie('fontSize', newFontSize);
      }
    }
  }
}
// --------------------------------------------------------------------------------------
function cambiafuente(tag,tipofuente) {
//    if ((tag == '') || (tipofuente == '')) cambiafuente("nota","Georgia");
    document.getElementById(tag).style.fontFamily = tipofuente;
    setCookie('fontType', tipofuente);
}
// --------------------------------------------------------------------------------------
function setear() {
    if (getCookie('fontSize')) cambia(getCookie('fontSize'), '');
    if (getCookie('fontType')) cambiafuente('nota', getCookie('fontType'));
}
// 