var uniqueid = '4bb34b8beff6e18ef908766f1d9d89ec';
var sessid = '8a55rce6rga6i70vavo12d68i7';
var data_str = 'sessid='+sessid+'&uniqueid='+uniqueid+'&referrer='+encodeURIComponent(document.referrer)+'&target_url='+encodeURIComponent(document.location)+'&title='+encodeURIComponent(document.title);
function ranknow_track_url(url){
var track_img = new Image();
var get_url = 'http://www.netqin.com/ctj2/develop/ranknow_init.php?trackurl='+encodeURIComponent(url)+'&'+data_str+'&'+(new Date()).getTime();
track_img.src = get_url;
}
var _ranknow_clicknow_url_enable = false;
if( typeof(_ranknow_clicknow_enable) == 'undefined' ) _ranknow_clicknow_enable = _ranknow_clicknow_url_enable;
if(typeof(ranknow_disabled) == 'undefined' || ranknow_disabled === false){
if(typeof(_ranknow_enable) == 'undefined' || _ranknow_enable === true){
document.write('
');
if( _ranknow_clicknow_enable===true)
{
var swf_path="http://www.netqin.com/ctj2/develop/clicknow.swf?r=" + Math.round(Math.random()*10000);
var heartstr = 'sessid='+sessid+'&uniqueid='+uniqueid;
//var post_path = "http://www.netqin.com/ctj2/develop/ranknow_heartbeat.php";
var impression = (new Date().getTime())+"i"+Math.round(Math.random()*10000000);
var post_path = "http://www.netqin.com/ctj2/develop/clicknow_receiver.php?info=4bb34b8beff6e18ef908766f1d9d89ec--"+sessid+"--"+impression+"--"+encodeURIComponent(document.location);
var e='';
e+='';
try{
var f2=this.document.createElement("IFRAME");
f2.name="ranknow_ifrm2";
f2.id="ranknow_ifrm2";
f2.width="1";
f2.height="1";
f2.border="0";
f2.frameBorder="0";
f2.style.position="absolute";
f2.style.left="-10000px";
f2.style.top="-10000px";
this.document.body.appendChild(f2);
var g2=f2.contentDocument;
if(g2===undefined||g2===null){
g2=f2.contentWindow.document;
}
g2.open();
g2.close();
g2.body.innerHTML=e;
f2.contentWindow.ranknow_swf=this;
var h=function(){
if(!this.flash2){
this.flash2=g2['ranknow_swf'];
// setTimeout(function(){h()},300);
return false;
}
};
h();
}catch(err){
}
ranknow_user_id = '4bb34b8beff6e18ef908766f1d9d89ec';
ranknow_sess_id = '8a55rce6rga6i70vavo12d68i7';
ranknow_recv_subdmn = '';
ranknow_domain = '';
ranknow_referrer = '';
ranknow_target_url = '';
ranknow_title = '';
ranknow_rule_url = '';
// RankNow object's initalization function
var RankNow=function(){
this.w=window;
this.d=document;
this.nav=null;
this.error=false;
this.protocol=null;
this.impression=null;
this.start_time=0;
this.loaded_time=0;
this.html=null;
this.base_target=null;
this.base_href=null;
this.encoding=null;
this.logdata=[];
this.flash2=null;
this.body_loaded=false;
this.idle_timeout=false;
this.last_event=null;
this.intervals={};
this.domain=ranknow_domain;
this.user_id=ranknow_user_id;
this.sess_id=ranknow_sess_id;
this.recv_subdmn=ranknow_recv_subdmn;
this.enable_write_data=true;
};
RankNow.prototype.get_time=function(){
return new Date().getTime()
};
RankNow.prototype.get_event=function(e){
if(!e&&this.w.event){
e=this.w.event
}
return e;
};
RankNow.prototype.INIT=function(){
if(this.w.ranknow_disabled){
return;
}
this.start_time=this.get_time();
this.nav = navigator.userAgent.toLowerCase();
if(this.w.ranknow_disable_msie6==true&&this.nav.indexOf('msie 6')!=-1){
return;
}
this.protocol=this.d.location.protocol=="https:"?"https://":"http://";
var e=this;
var f=function(){
if(!e.html){
e.html=e.d.documentElement.innerHTML.toString();
}
};
var g=function(){
if(!e.body_loaded){
e.init_step2();
}
};
var h=this.w.onload;
if(typeof h!='function'){
this.w.onload=function(){
f();
g()
}
}else{
this.w.onload=function(){
f();
h();
g()
}
}
this.attach_event(this.w,'load',function(){
f();
g()
});
setTimeout(function(){
f();
g()
},3000);
this.w.onerror=function(a,b,c,d){
return true
}
};
RankNow.prototype.init_step2=function(){
this.body_loaded=true;
this.loaded_time=this.get_time();
if(this.error){
return false;
}
if(!this.d.body||!this.get_screen_size()||!this.get_screen_scroll()){
this.error=true;
return false;
}
if(!this.html){
this.error=true;
return false;
}
this.encoding=this.d.charset?this.d.charset:(this.d.characterSet?this.d.characterSet:(this.d.inputEncoding?this.d.inputEncoding:""));
this.impression=this.get_time()+"i"+Math.round(Math.random()*10000000);
var _this=this;
f2.contentWindow.ranknow_obj=this;
var h=function(){
if(!_this.flash2){
_this.flash2=g2['ranknow_swf'];
}
if(!_this.flash2||!_this.flash2.clicknowf){
setTimeout(function(){h()},300);
return false;
}
_this.init_step3();
};
h();
};
RankNow.prototype.init_step3=function(){
var c,i,obj=this;
this.attach_event(this.d,'click',function(a){
a=obj.get_event(a);
if(a&&a.clientX){
obj.write_log("CL",[a.clientX,a.clientY])
}
});
this.attach_event(this.d,'mousemove',function(a){
if(Math.round(Math.random()*1000)<667){
a=obj.get_event(a);
if(a&&a.clientX){
obj.write_log("MV",[a.clientX,a.clientY])
}
}
});
this.attach_event(this.w,'scroll',function(a){
obj.write_log("SC",obj.get_screen_scroll())
});
this.base_target="";
this.base_href="";
var b=this.d.getElementsByTagName("BASE");
for(i=0;i=e-1){
return
}
if(els[a]){
el=els[a];
n=el.nodeName;
if(!(!n||n=="SCRIPT"||n=="STYLE"||n=="TBODY"||n.charAt(0)=="#"||n.charAt(0)=="!")){
j++;
if(!el.id||el.id===""){
el.id="ranknow_id_"+j
}
obj.elem_attach_events(el);
}
}
a++
}
setTimeout(function(){
f(a)
},1)
};
f(0);
}else{
for(i=0;i=32&&c<=126)||(c>=1040&&c<=1103)||(c==13&&b.nodeName=="textarea")){
var d=b.value.charAt(b.value.length-1);
if(d){
obj.write_log("TXTK",[b.id,escape(d)])
}
}else if(c==8||c==13||c==127){
if(b.value!==undefined){
obj.write_log("TXT",[b.id,escape(b.value)])
}
}
}else if(Math.round(Math.random()*1000)<334){
if(b.value!==undefined){
obj.write_log("TXT",[b.id,escape(b.value)])
}
}
clearInterval(h);
h=setInterval(function(){
if(b.value!==undefined){
obj.write_log("TXT",[b.id,escape(b.value)])
}
},2123)
}
})
}else if(tag=="INPUT"){
this.attach_event(e,'focus',function(){
obj.write_log("FC",[e.id])
});
this.attach_event(e,'blur',function(){
obj.write_log("BL",[e.id])
})
}
if(tag=="FORM"){
this.attach_event(e,'submit',function(){
obj.force_send_data()
})
}
if(!g){
this.attach_event(e,'click',function(a){
obj.write_log("OCL",[obj.get_event_target(this,a).id])
})
}
return e;
};
RankNow.prototype.send_report=function(){
if(this.error){
return false
}
if(this.logdata.length===0){
return true
}
var a=this.logdata.slice();
this.logdata=[];
var i,data="RN_LOG:\n";
for(i=0;i1){
var c=this.logdata[this.logdata.length-1];
if(c[1]==a&&c[2].toString()==b.toString()){return true}
}
this.logdata[this.logdata.length]=[this.get_time()-this.start_time,a,b]
};
RankNow.prototype.force_send_data=function(){
if(this.error){
return false
}
this.enable_write_data = false;
if(this.logdata.length>0){
var a="";
var b="";
var c=this.logdata.reverse();
for(var i=0;i=3900){break}
a+=b
}
if(a===""){return}
this.set_cookie("RankNowLastImpr",a,"."+this.get_current_domain())
}
this.inprogress=false;this.send_report()
};
RankNow.prototype.attach_event=function(b,event_type,d){
if(!b){return false}
if(b.addEventListener){
b.addEventListener( event_type, d, false);
}else if( b.attachEvent){
b.attachEvent('on'+event_type,d);
}else{
var e=this.get_func_code(b['on'+event_type]);
var f=this;
b['on'+event_type]=function(a){
a=f.get_event(a);
if(e!==""){
if(a){
f.last_event=a;
}
f.exec_function(e,this)
}
}
}
};
RankNow.prototype.get_event_target=function(a,b){
if(a!=this.w){return a}
var c=this.get_event(b);
var d=c.target?c.target:c.srcElement;
return d
};
RankNow.prototype.get_func_code=function(a){
var b="";
if(a===undefined||a===null){
return "";
}
b=this.trim(a.toString());
var c=b.indexOf("{");
if(c!=-1){
b=this.trim(b.substr(c));
}
if(b===""){
return "";
}
return b+";"
};
RankNow.prototype.get_screen_scroll = function(){
var x=0,y=0;
if(typeof(this.w.pageYOffset)=='number'){
x=this.w.pageXOffset;
y=this.w.pageYOffset
}else if(this.d.documentElement&&(this.d.documentElement.scrollLeft||this.d.documentElement.scrollTop)){
y=this.d.documentElement.scrollTop;
x=this.d.documentElement.scrollLeft
}else if(this.d.body&&(this.d.body.scrollTop!==undefined)){
x=this.d.body.scrollLeft;
y=this.d.body.scrollTop
}else{
return false
}
return[x,y]
};
RankNow.prototype.get_screen_size=function(){
var w=0,h=0;
if(typeof(window.innerWidth)=='number'){
w=window.innerWidth;
h=window.innerHeight
}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
w=document.documentElement.clientWidth;
h=document.documentElement.clientHeight
}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
w=document.body.clientWidth;
h=document.body.clientHeight;
}else{
return false;
}
return[w,h];
};
RankNow.prototype.get_current_domain=function(){
var a=this.w.location.href;
a=a.replace(/^http(s)?\:\/\/?/i,"");
a=a.replace(/^([^\/]+)\/.*/i,"$1");
a=a.replace(/^([^\.]+\.){1,}([^\.]+\.[^\.]+)$/i,"$2");
return a
};
RankNow.prototype.trim=function(a){
if(typeof(a)!="string"){
return a
}
a=a.replace(/^\s+/,"");
a=a.replace(/\s+$/,"");
return a
};
RankNow.prototype.get_cookie=function(a){
var c=this.d.cookie;
c=c.split(";");
for(var i=0;i