var referrerTop={
};


for(var http in referrerTop){
  document.write('<a href="'+http+'">'+referrerTop[http]+'</a> ');
}

/**/
document.write('<a href="http://www.162100.com/">162100网址导航</a> ');
document.write('<a href="http://www.re2.cn/">热爱网</a> ');
document.write('<a href="http://www.2dh/">2导航</a> ');
document.write('<a href="http://www.furuijinzhao.com/">沈阳保洁公司</a> ');
document.write('<a href="http://www.furuijinzhao.com/">沈阳物业公司</a> ');

function addReferrerLink(){
  var rf=document.referrer.toString();
  if(rf!='' && rf.indexOf(location.hostname)==-1){
    //rf=rf.replace(/^([^\/]+\:\/\/)?([^\/]+)(\/.*)?$/i, 'http://$2');
    var url='';
    var num=50; //保留条数
    if(referrerTop[rf]!='undefined' && referrerTop[rf]){
      for(var i in referrerTop){
        break;
      }
      if(i!='undefined' && i!=rf){
        url+='&url='+rf+'&o=0';
      }
    }else{
      url+='&url='+rf+'&o=1';
    }
    if(url!=''){
      if($('addRFrame')==null){
        var s=document.createElement('IFRAME');
        s.id='addRFrame';
        s.style.display='none';
        document.body.appendChild(s);
      }
      $('addRFrame').src='member.php?post=write_referrerfriedlink'+url+'&num='+num+'';
    }
  }
}

if(document.all){
  window.attachEvent('onload',addReferrerLink);
}else{
  window.addEventListener('load',addReferrerLink,false);
}
