﻿
var kf_openurl="http://etel.5251.net/etel/dial.jsp?wiseid=530035429&seat=&com_name="+encodeURIComponent("南京房网") +"&refer="+ escape(window.location.href);

function setCookie(name, value, path, domain) {
  var oCookie = name + "=" + escape(value) +
      "; expires=Thu, 6 Jan 2100 12:01:01 UTC" +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "");
  document.cookie = oCookie;
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return "";
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

var  now  =  new  Date();  
var  ss  =  now.getTime() 

var temp_d = parseInt(Math.random() *10000);
var user_str = "" + ss + "_" + temp_d;

var userid = getCookie("userid");
if(userid == "" || userid == null)
{
	
	setCookie("userid",user_str);
	userid = user_str ;	
}

//alert("userid is-->" + getCookie("userid"));
var ref = document.referrer; 
var local_host = document.domain;
if(ref.indexOf(local_host) < 0)
{
	setCookie("referrer",ref);
}
kf_openurl += "&keyword="+escape(getCookie("referrer"));
  
var kftype=2;var isonline = 1;var myid="client"; var onliner_id=1;var img_hight = 0;img_width = 0;var hasOpen= false;var closeButton = false;var closeIMG ="http://kf.5251.net/images/close.gif";var img_on = "/images/mianfeidianhua.gif";var img_off = "http://kf.5251.net/upload/2008-11-26/1081031159435.gif";var alignx = 2;var alignW =20;var  alignH =20;
    /*
 * Compressed by JSA(www.xidea.org)
 */
eval("function IconClass(){	this.property=new Array();	this.left=0;	this.top=0;	this.last_left=0;this.last_top=0;	this.diffY=0;	this.diffX=0;	this.diffW=0;this.diffH=0; this.show=\"\";  this.scrollTimer=null;	this.floatHtml=null;	this.dreamsim=null;	this.autoScroll = autoScroll;this.imageTimer=onliner_imageTimer;this.get_tip_str=onliner_get_tip_str;	this.win_open=onliner_win_open;	this.start=onliner_start; this.get_clost_str=onliner_get_close_str; this.hidden=hidden_div;}");
    eval("var isNS6 = (document.getElementById&&!document.all) ? 1: 0;var isIE = (document.all) ? 1: 0;var isNS = (navigator.appName==\"Netscape\" && navigator.appVersion.charAt(0)==\"4\") ? 1: 0;");

    eval("function autoScroll(){ getImageProperty();try{showKFDiv()}catch(e){};	this.imageTimer();	this.diffY = document.body.scrollTop;	this.diffX = document.body.scrollLeft;	if(this.diffY==0){		this.diffY = document.documentElement.scrollTop;	}	if(this.diffX==0){		this.diffX = document.documentElement.scrollLeft;	}	if(isIE){		this.diffH = document.documentElement.offsetHeight;		this.diffW = document.documentElement.offsetWidth;	}else{		this.diffH = document.body.offsetHeight;		this.diffW = document.body.offsetWidth;	}	if(this.dreamsim.style.top!=(this.diffY+this.property[\"alignH\"])){		var dreamsheight=this.diffY+this.property[\"alignH\"]-this.dreamsim.offsetTop;		this.top=this.dreamsim.offsetTop+dreamsheight;	}	if(this.property[\"alignx\"]==1){		if(parseInt(this.dreamsim.style.left)!=(this.diffX+this.diffW)){			var dreamswidth=this.diffX+this.property[\"alignW\"]-this.dreamsim.offsetLeft;			dreamswidth=(dreamswidth>0?1:-1)*Math.ceil(Math.abs(dreamswidth));			this.left=this.dreamsim.offsetLeft+dreamswidth;		}	}else{		if(parseInt(this.dreamsim.style.left)!=(this.diffX+this.diffW-parseInt(this.dreamsim.style.width)-this.property[\"alignW\"]-20)){			var dreamswidth=this.diffX+this.diffW-parseInt(this.dreamsim.style.width)-this.property[\"alignW\"]-20-this.dreamsim.offsetLeft;			dreamswidth=(dreamswidth>0?1:-1)*Math.ceil(Math.abs(dreamswidth));			this.left=this.dreamsim.offsetLeft+dreamswidth;		}	}	this.dreamsim=document.getElementById(this.property[\"X_P\"]);	if(this.last_top!=this.top || this.last_left!=this.left){		this.last_top=this.top;  		this.last_left=this.left;		this.get_tip_str();		document.getElementById(this.property[\"div_X_P\"]).innerHTML=this.floatHtml;		dreamsim=document.getElementById(this.property[\"X_P\"]);	}	this.imageTimer();}");
   
     eval("function onliner_get_tip_str(){	var d=new Date();	var img=\"\";	if (isonline==1) img=this.property[\"img_on\"];	else img=this.property[\"img_off\"];  var tt=\"\";tt += \"<iframe   style='position:absolute;z-index:7998;width:expression(this.nextSibling.offsetWidth);height:expression(this.nextSibling.offsetHeight);top:expression(this.nextSibling.offsetTop);left:expression(this.nextSibling.offsetLeft);' frameborder='0' ></iframe>\";  var con_img=\"<img onclick=\\\"icon.win_open()\\\" src=\\\"\"+img+\"\\\" style='cursor:pointer'>\"; 	tt += \"<DIV id='\"+this.property[\"X_P\"]+\"' style='z-index:7998;display:\"+this.show+\";left: \"+this.left+\"px; top: \"+this.top+\"px; width:\"+this.property[\"width\"]+\"px;height:\"+this.property[\"height\"]+\"px;overflow:hidden;POSITION: absolute;'>\"+this.get_clost_str()+con_img+\"<!--<div style='POSITION: absolute;top:0px;left:0px;'><input name='close' type='button' id='close' onClick='hidden_div()' value='close' style='margin: 0px;padding: 0px;border: 1px dotted #339900;background-color: #FFFFFF;height: 18px;width: 30px;'></div>--></div>\";	this.floatHtml=tt;}");
	eval("function onliner_get_close_str(){if (closeButton) return \"<img onclick='icon.hidden()' style='position:absolute; right:7px; top:7px; cursor:hand;' src='" + closeIMG + "'/>\"; return \"\";}");
    eval("function hidden_div(){	this.show=\"none\";document.getElementById(this.property[\"X_P\"]).style.display=\"none\";try{eval( \"clearInterval(icon.scrollTimer);\")}catch(e){}}");
    eval("function onliner_win_open() {hasOpen = true;	window.open(\""+kf_openurl+"\",\"chat\",\"height="+473+",width="+703+",top=200,left=200,status=yes,toolbar=no,menubar=no,resizable=no,scrollbars=no,location=no,titlebar=no\");}");
    eval("function onliner_imageTimer(){ if(document.getElementById(this.property[\"div_X_P\"]).innerHTML.indexOf('.gif')==-1 &&         document.getElementById(this.property[\"div_X_P\"]).innerHTML.indexOf('.jpg')==-1 &&         document.getElementById(this.property[\"div_X_P\"]).innerHTML.indexOf('.swf')==-1)    {      this.get_tip_str();      document.getElementById(this.property[\"div_X_P\"]).innerHTML=this.floatHtml;      this.dreamsim=document.getElementById(this.property[\"X_P\"]);    }	}");
    eval("function onliner_start(){	getImageProperty() ; document.write('<div id=\"'+this.property[\"div_X_P\"]+'\" ></div>');	this.dreamsim=document.getElementById(this.property[\"X_P\"]);}");
  eval("var icon=new IconClass();icon.property[\"onliner_id\"]=onliner_id;");
  eval("icon.property[\"img_on\"]=\""+img_on+"\";");
  eval("icon.property[\"img_off\"]=\""+img_off+"\";");

  eval("function getImageProperty(){ if(img_hight > 0 && img_width > 0) return; var   image=new   Image();if(isonline){image.src='"+img_on+"';}else {image.src='"+img_off+"';}img_hight = image.height;img_width = image.width;icon.property[\"height\"]=img_hight;icon.property[\"width\"]=img_width;}");
//alert("2");
  eval("icon.property[\"alignx\"]="+alignx);
  eval("icon.property[\"alignW\"]="+alignW);
  eval("icon.property[\"alignH\"]="+alignH);
  eval("icon.property[\"X_P\"]=\"X_P\";");
  eval("icon.property[\"div_X_P\"]=\"div_X_P\";");
   // alert("3");
  eval("icon.start();");
 // alert("4");
  eval("icon.scrollTimer = window.setInterval(\"icon.autoScroll()\", 500); ");