/////////////////////////////////////////////////
// Funciones para controlar las cookies
/////////////////////////////////////////////////
function setCookie(name,value, caducidad){
   
   document.cookie = name + '=' + escape(value) + ((caducidad == null) ? "": ("; expires=" + caducidad.toGMTString()));
   /*document.cookie=name+ "=" +escape(value) + ";expires=" + caducidad.toGMTString(); /*+ ";domain=www.by-sms.com";
   document.cookie=name+ "=" +escape(value) + ";expires=" + caducidad.toGMTString(); /*+ ";domain=www.by-sms.com/control";*/
}

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


function rellenarCookie(){ 
	var fecha=new Date(2010,12,31); // 31 de diciembre de 2004
    var lenguaje = consultarCookie("lang");
    
	if (!lenguaje){
			lenguaje = "fr";
            setCookie("lang",lenguaje,fecha);
	}
	
}

function ponerCookie(idioma){
	var fecha=new Date(2010,12,31); // 31 de diciembre de 2004
	setCookie("lang",idioma,fecha);
}
//////////////////////////////////////////////////
function menuEncima(celda)
{
 celda.style.backgroundColor = "#F3DCBA";
 //celda.style.backgroundImage = 'url(../images/fondo2.gif)';
}

function menuEncima2(celda)
{
 celda.style.backgroundColor = "#F8FAFC";
 //celda.style.backgroundImage = 'url(../images/fondo2.gif)';
}

function menuFuera(celda)
{
 celda.style.backgroundColor = "transparent";
 //celda.style.backgroundColor = "#F5F5F5";
 //celda.style.backgroundImage = 'url(../images/fondo.gif)';
}

function clickMenu(celda){
	//celda.children.tags('A')[0].click();
}



/////////////////////////////////////////////////////


/*
var HoraFi=new Date;
var TxtCookie="";
HoraFi.setTime(HoraFi.getTime()+1000*60*60);
document.cookie = TxtCookie;

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(dc.substring(bgin,end));
       }
  }
}

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";
  }
}

function setCookie(name,values,expires,path,domain,secure){
  alert(document.cookie);
  document.cookie=name+ "=" +escape(value) +
	   ((expires==null)?"":";expires="+expires.toGMTString())
	   +((path==null)?"":";path=" + path)
	   +((domain==null)?"":";domain="+domain)
	   +((secure==null)?"":";secure");
}*/





