var scrollspeed=cache=1



function initialize(){

//marqueeheight=180

//marqueeheight=document.all? parent.document.all.datamain.height : parent.document.getElementById("datamain").getAttribute("height")
 ntam=consultargalleta('tletra');
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")

divcaja=document.all? document.all.caja : document.getElementById("caja")
tamano=14;
//var ntam;
if (ntam != null) {tamano = parseInt(ntam,10);}
dataobj.style.fontSize =tamano;



//divcaja.style.height=(divcaja.style.height > screen.height)? screen.height*0.67:divcaja.style.height+20;

//if (divcaja.style.height > screen.height){

  //divcaja.style.height=screen.height*0.67
  divcaja.style.height=screen.height-290;

//}else {divcaja.style.height=divcaja.style.height+20}

//sg=true;

//if (screen.width > 1279 && sg){divcaja.style.width=1060;sg=false;}

//if (screen.width > 1151 && sg){divcaja.style.width=972;sg=false;}

//if (screen.width > 1023 && sg){divcaja.style.width=795;sg=false;}

//if (screen.width > 750 && sg){divcaja.style.width=550;}
divcaja.style.width=screen.width-230;
//divcaja.style.width=parseInt(screen.width-250,10)

//divcaja.style.width=eval(ancho)

dataobj.style.top=5

thelength=dataobj.offsetHeight

//scrolltest()

}
function mandargalleta(nombre, valor, caducidad) {
  document.cookie = nombre + "=" + escape(valor)
    + ((caducidad == null) ? "" : ("; expires=" + caducidad.toGMTString()))
}

function consultargalleta(nombre) {
  var buscamos = nombre + "=";
  if (document.cookie.length > 0) {
    i = document.cookie.indexOf(buscamos);
    if (i != -1) {
      i += buscamos.length;
      j = document.cookie.indexOf(";", i);
      if (j == -1)
        j = document.cookie.length;
      return unescape(document.cookie.substring(i,j));
    }
  }
}

function aumentar(){

//dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")

//tamano= eval(dataobj.style.fonSize);
 ntam=consultargalleta('tletra');
 if (ntam != null) {tamano = parseInt(ntam,10);}
 if (tamano < 28){

  tamano=tamano+2;

  dataobj.style.fontSize =tamano;
  mandargalleta('tletra',tamano,new Date(2015,12,31));
 }

}

function disminuir(){

//dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")

//tamano= eval(dataobj.style.fonSize);
 ntam=consultargalleta('tletra');
 if (ntam != null) {tamano = parseInt(ntam,10);}
if (tamano > 14){

  tamano=tamano-2;

  dataobj.style.fontSize =tamano;
  mandargalleta('tletra',tamano,new Date(2015,12,31));
}

}

function scrolltest(){

dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed

if (parseInt(dataobj.style.top)<thelength*(-1))

dataobj.style.top=5

scro=setTimeout("scrolltest()",1)

}

function stop(){clearInterval(scro);}



function scrolltestdown(){

dataobj.style.top=parseInt(dataobj.style.top)+scrollspeed

if (parseInt(dataobj.style.top)>thelength*(1))

dataobj.style.top=thelength*(-1)

scro=setTimeout("scrolltestdown()",5)

}



function Inicio()

{

initialize();

}