var cf_name=new Array();
cf_name[0]="siteID";
cf_name[1]="zanpid";
cf_name[2]="affiliado";
cf_name[3]="cjid";
function set_lan_cookie(_1,_2,_3){
var _4=new Date();
_4.setDate(_4.getDate()+_3);
document.cookie=_1+"="+escape(_2)+((_3==null)?"":";expires="+_4.toGMTString())+"; path=/; domain=.lan.com";
}
function get_lan_cookie(_5){
if(document.cookie.length>0){
c_start=document.cookie.indexOf(_5+"=");
if(c_start!=-1){
c_start=c_start+_5.length+1;
c_end=document.cookie.indexOf(";",c_start);
if(c_end==-1){
c_end=document.cookie.length;
}
return unescape(document.cookie.substring(c_start,c_end));
}
}
return "";
}
var otid=query_param("otid");
var otid_longest_days_to_last=90;
if(otid!=""||get_seo_data()!=""){
var s_cid="null";
var otid_scid;
if(otid!=""){
s_cid=query_param("s_cid");
if(s_cid==""){
s_cid="null";
}
}else{
otid_scid=get_seo_data();
}
var cf_value="null";
for(i=0;i<cf_name.length;i++){
if(query_param(cf_name[i])!=""){
cf_value=query_param(cf_name[i]);
}
}
var otid_cookie_value=get_lan_cookie("otid");
if(otid_cookie_value!=""){
otid_cookie_value+="|";
}
var now=new Date();
var year=now.getUTCFullYear();
var month=now.getUTCMonth()+1;
if(month<10){
month="0"+month;
}
var day=now.getUTCDate();
if(day<10){
day="0"+day;
}
var hours=now.getUTCHours();
if(hours<10){
hours="0"+hours;
}
var minutes=now.getUTCMinutes();
if(minutes<10){
minutes="0"+minutes;
}
var seconds=now.getUTCSeconds();
if(seconds<10){
seconds="0"+seconds;
}
var UTC_iso_date_time=year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
if(otid!=""){
otid_cookie_value+=otid+"/"+s_cid+"/"+cf_value+"/"+UTC_iso_date_time;
}else{
otid_cookie_value+=otid_scid+"/"+cf_value+"/"+UTC_iso_date_time;
}
set_lan_cookie("otid",otid_cookie_value,otid_longest_days_to_last);
}
function get_qs_param(_6,_7){
_7=_7.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");
var _8="[\\?&]"+_7+"=([^&#]*)";
var _9=new RegExp(_8);
var _a=_9.exec(_6);
if(_a==null){
return "";
}else{
return _a[1];
}
}
function get_seo_data(){
var _b=document.referrer;
var _c="^http://[a-z]*.([a-z]*).([a-z]*)";
var _d=new RegExp(_c);
var _e=_d.exec(_b);
if(!_e){
return "";
}
if(_e[1]=="google"){
var q=get_qs_param(_b,"q");
q=q.replace(/\//,/~/);
var _10="SEO."+_e[1]+"."+_e[2]+"_KW_"+q;
return "94925/"+_10;
}else{
if(_e[1]=="yahoo"){
var p=get_qs_param(_b,"p");
p=p.replace(/\//,/~/);
var _10="SEO."+_e[1]+"."+_e[2]+"_KW_"+p;
return "94945/"+_10;
}else{
return "";
}
}
}

