// JavaScript Document

function set_style(css){ 
var links, rel, title 
links=document.getElementsByTagName("link");
tcn_setCookie('letra',css,'1500',-1)
for(count=0; count<links.length; count++)
{ 
rel=links[count].getAttribute("rel");
title=links[count].getAttribute("title"); 
if(rel.indexOf("stylesheet") != -1 && title){ links[count].disabled=true; if(title==css){ links[count].disabled=false; }
} 
} 
}

function leeCookie(nombre)
{
var cookies=document.cookie; if(!cookies) return false;
var comienzo=cookies.indexOf(nombre);
if(comienzo==-1) return false;
comienzo=comienzo+nombre.length+1;
cantidad=cookies.indexOf("; ", comienzo)-comienzo; if(cantidad<=0) cantidad=cookies.length;
return cookies.substr(comienzo, cantidad);
}

function tcn_setCookie (name, outputValue, days, evalValue) {
  //Original code:(C) 1998 www.webmonkey.com
  //Modifications: 2001 Tecnorama
  var myValue= outputValue;
  if(evalValue == 1){
    myValue = eval(myValue + '.value');
 }
  var myDay = new Date();
  myDay.setDate(myDay.getDate() + days);
  document.cookie = 'letra=' + myValue + ((days)?(';expires=' + myDay.toGMTString()):'');
}
