loca=window.location;
loca=loca.toString();
if(window!=parent)
parent.navigate(loca);
var fangkudomain= window.location.hostname;
 if (fangkudomain.indexOf(".")>=1){ 
	  site=fangkudomain.split(".");
  if (site.length>2)
	  document.domain=getdomain(fangkudomain);
	}
function getdomain(fangkudomain){
if(fangkudomain.indexOf(".")>=1){var site=fangkudomain.split(".");if(site[site.length-2]=="com"||site[site.length-2]=="org"||site[site.length-2]=="net"){return site[site.length-3]+"."+site[site.length-2]+"."+site[site.length-1];}else{return site[site.length-2]+"."+site[site.length-1];}}else{return fangkudomain;}
}
if(window.navigator.cookieEnabled==false) 
window.status="您的浏览器不允许使用Cookies,这将无法使用一些个性化的功能";
if(window.screen.width<1024) 
window.status="为了取得更好的浏览效果，建议您将显示分辨率调至1024×768";
var escclose=false;
var rate = 20;
var objobj;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;
var chcdisable=false;
var useragent=navigator.userAgent;
if (loca.indexOf("dir.htm")!=-1)
chcdisable=true;
document.onmouseover = function(e) 
{
	if (chcdisable)
	return false;
	e = window.event || e;
	objobj = e.srcElement || e.target;
	if (act != 1) {
	 while(objobj.tagName!='A'&&objobj.tagName!='body'&&objobj.tagName!='HTML'){
		  objobj=objobj.parentElement;
	   if(objobj.tagName=='A'||objobj.tagName=='body'||objobj.tagName=='HTML')
	   break;
	  }
	  if(objobj.tagName=='A'&&objobj.href!='') {
		  act = 1;
	   clrOrg=objobj.style.color;
	   TimerID=setInterval("ChangeColor()",100);
  }
 }
}

document.onmouseout =function() 
{
	if (chcdisable)
	return false;
   if (act!=0){
     if(objobj.tagName=='A'){
      objobj.style.color=clrOrg;
   clearInterval(TimerID);
   act=0;
  }
 }
}

function ChangeColor()
{
objobj.style.color = makeColor();
}
function makeColor()
{
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 - elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 - t2) * t3 / 60;

if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 - t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 - t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 - t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
}
elmR = Math.floor(elmR);
elmG = Math.floor(elmG);
elmB = Math.floor(elmB);
clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
elmH = elmH + rate;
if (elmH >= 360)
elmH = 0;
return clrRGB;
}

var currentpos,timer;
function initialize()
{
timer=setInterval("scrollwindow()",5000);
}
function sc(){
clearInterval(timer);
}
function scrollwindow()
{
currentpos=document.documentElement.scrollTop;
window.scroll(0,currentpos=currentpos+400);
if (currentpos != document.documentElement.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
if (top.location != self.location)
top.location=self.location;
function addbookmark(){ if (document.all) {  window.external.addFavorite(window.location,document.title); } else if (window.sidebar) {  window.sidebar.addPanel(document.title, window.location, ""); }}
function sethome()
{
 if (document.all)
 {
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage('http://www.fangku.com/');
 }
 else if (window.sidebar)
 {
   if(window.netscape)
   {
     try
     {  
       netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
     }  
     catch (e)  
     {  
       alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" );  
     }
   } 
   var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
   prefs.setCharPref('browser.startup.homepage','http://www.3afc.com/');
 }
}

fangkustyle = new Array() 
fangkustyle[0] = new Array("默认","/0/c.css"); 
fangkustyle[fangkustyle.length] = new Array("欧洲","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("亚洲","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("非洲","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("大洋洲","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("美洲","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("清凉","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("咖啡","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("女性","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("迷彩","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("尊贵","/"+fangkustyle.length+"/c.css");
fangkustyle[fangkustyle.length] = new Array("随机","/0/c.css"); 
var stylekind=fangkustyle.length;
var indexstyle=Math.floor(Math.random() *stylekind);
if(indexstyle<1||indexstyle==3||indexstyle>=stylekind-1)
 indexstyle = 0;
var stylerandom = fangkustyle[indexstyle][1];
var defaultskin="/0/c.css";
var cccc1=getcookie("fangkuskin"); 
if (cccc1==false)
		cccc1=0;
if (cccc1!=0) 
		chskn(cccc1);
if (cccc1==0)
		gel("fangku").href =defaultskin;
if (cccc1==stylekind)
		gel("fangku").href =stylerandom;
 function chskn(id)
{
setcookie("fangkuskin",id.toString(),365,"/");
if (id==stylekind-1){
	indexstyle=Math.floor(Math.random() *stylekind);
	if(indexstyle<1||indexstyle==3||indexstyle>=stylekind-1)
		indexstyle = 4;
	id=indexstyle;
}
 gel("fangku").href=fangkustyle[parseInt(id)][1];
if(id ==0)
	id=Math.floor(Math.random()*stylekind); 
}
var cu=0;
function chimg(id)
{
if (id==false)
	id=0;
if (id==stylekind-1)
	id=indexstyle;
	if (gel("logo")!=null)
	{
	  switch (document.domain)
		{
				case "fangku.com": 
				case "fangku.org": 
				case "125900.com":  
				case "localhost": 
					logosr="/logo.png";
					break;
				case "3afc.com":
				case "aaafangchan.com": 
					logosr="/aaalogo.png";
					break;
				case "1dichan.com": 
					logosr="/1dichan_logo.png";
					break;
				case "d1fang.com": 
					logosr="/d1fang_logo.png";
					break;
				default:   
					logosr="/logo.png";
					break;
		}
		if((useragent.indexOf("MSIE 6")>1||useragent.indexOf("MSIE 5")>1)&&useragent.indexOf("Opera")==-1){
			document.execCommand("BackgroundImageCache", false, true);
			gel("logo").innerHTML="<a href='/'><img src='/0/blank.gif' border='0' style='width:180px;height:60px;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"/"+id+logosr+"\")' /></a>";
		}else{
			gel("logo").innerHTML="<a href='/'><img src='/"+id+logosr+"' border='0' /></a>"
		}
	
	}
	if (id==0&&cu==0)
		return false;
//	mybody=document.getElementsByTagName("body").item(0);
//	if(mybody.filters){	
//		mybody.style.filter ="BlendTrans";	//revealTrans or BlendTrans
//		mybody.filters[0].Duration=3;
//		mybody.filters[0].apply();
//		mybody.filters[0].play();
//	}
	var im=document.getElementsByTagName("IMG");
	for(var i=0;i<im.length;i++){
		if (im[i].src.indexOf("/"+cu+"/")!=-1&&im[i].src.indexOf("_0.gif")==-1)
			im[i].src=im[i].src.replace("/"+cu+"/","/"+id+"/");
		if (im[i].src.indexOf("Logo_")!=-1)
		{
			if(id==3||id==10){
				im[i].src=im[i].src.replace("Logo_25wht.gif","Logo_25blk.gif")
					}else{
				im[i].src=im[i].src.replace("Logo_25blk.gif","Logo_25wht.gif")
				}
		}
	}	
	cu=id;
}
function shwsknlst(){
 for (stylecount=0; stylecount<stylekind; stylecount++ )
	document.write(" <img SRC=\"/"+(stylecount==stylekind-1?"0/_0":stylecount+"/")+(stylecount==0?"_1_":"_")+"0.gif\" title=\""+fangkustyle[stylecount][0]+"\" WIDTH=\"16\" HEIGHT=\"16\" BORDER=\"0\"  style=\"cursor : pointer;padding:0px;\" onclick=\"chskn("+stylecount+");chimg("+stylecount+")\" />");	 
}
function chksrhform(){
objkwd=gel("kwd");
if (objkwd.value.indexOf('关键字')!=-1) objkwd.value='';
}
function dochng(fangku,fangkuindex) {
var fxlst=""
var hxlst=""
var topunitlst=""
var prclbl1txt="租金";
hxlst="单间,1室,2室,3室,4室,5室,6室,7室,8室,9室,整层,多层,整楼,独院";
    switch (fangku)
        {
            case "10":
			case "19": 
				fxlst="多层,小高层,高层住宅,跃层,别墅,经济适用房,商住两用,集资房,自建楼房,平房";
				topunitlst="万元";
				prclbl1txt="售价";
				break;
            case "11":
            case "13":
            case "16":
            case "17":
            case "18":  
				fxlst="多层,小高层,高层住宅,跃层,别墅,经济适用房,商住两用,集资房,自建楼房,平房,地下室/小房";
				topunitlst="元/月";
				prclbl1txt="租金";
				break;
            case "14":
            case "15": 
				fxlst="多层,小高层,高层住宅,跃层,别墅,经济适用房,商住两用,集资房,自建楼房,平房,地下室/小房";
				topunitlst="元/天";
                break;
            case "20":
            case "29": 
				fxlst="厂房,仓库,平房,地下室/小房";
				topunitlst="元/㎡";
				prclbl1txt="售价";
				break;
            case "21":
            case "28": 
				fxlst="厂房,仓库,平房,地下室/小房";
				topunitlst="元/㎡.月";
                break;
            case "30":
            case "39": 
				fxlst="店面,门脸,大厅,固定摊位";
				hxlst="单间,整楼,整层,多层";
				topunitlst="元/㎡";
				prclbl1txt="售价";
				break;
            case "31":
            case "38": 
				fxlst="店面,门脸,大厅,固定摊位";
				hxlst="单间,整楼,整层,多层";
				topunitlst="元/㎡.月";
                break;
            case "40":
            case "49": 
				fxlst="多层,小高层,高层住宅,跃层,别墅,经济适用房,商住两用,商住楼,集资房,自建楼房,平房";
				topunitlst="元/㎡";
				prclbl1txt="售价";
                break;
            case "51":
            case "58": 
				fxlst="写字楼,公寓,酒店式公寓";
				hxlst="单间,整层,整楼,多层,1室,2室,3室,4室";
				topunitlst="元/㎡.天,元/㎡.月";
                break;
            case "50":
            case "59":
				fxlst="写字楼,公寓,酒店式公寓";
				hxlst="单间,整层,整楼,多层,1室,2室,3室,4室";
				topunitlst="元/㎡";
				prclbl1txt="售价";
                break;
			default:
				fxlst="多层,小高层,高层住宅,跃层,自建楼房,平房,店面,门脸,大厅,固定摊位,别墅,厂房,仓库,写字楼,酒店式公寓,公寓,经济适用房,商住两用,商住楼,集资房,地下室/小房";
				topunitlst="元/月";
                break;			
		}
arrhx=hxlst.split(",");
objhx=gel('hx');
objhx.options.length=1;
for (i=0;i<arrhx.length ;i++ )
	objhx.options[i+1]=new Option(arrhx[i],arrhx[i]);  
objfx=gel('fx')
arrfx=fxlst.split(",")
objfx.options.length=1;
for (i=0;i<arrfx.length ;i++ )
	objfx.options[i+1]=new Option(arrfx[i],arrfx[i]);  
objtopunit=gel('topunit');
objprclbl=gel('prclbl');
gel('prclbl1').innerHTML=prclbl1txt;
arrtopunitlst=topunitlst.split(",")

if(arrtopunitlst.length==1){
	objtopunit.outerHTML="<input id=topunit name=unit type=hidden value='"+topunitlst+"' />";
	objprclbl.innerHTML=topunitlst;
}else{
	objprclbl.innerHTML="";
	objtopunit.outerHTML="<select id=topunit name=unit></select>";
	objtopunit=gel('topunit');
	for (i=0;i<arrtopunitlst.length ;i++){
		objtopunit.options[i]=new Option(arrtopunitlst[i],arrtopunitlst[i]); 
	}
}
//setcookie("srhtp",fangkuindex,1);
}
  function inisel(obj,objvalue) 
{ 
	o=document.getElementById(obj); 
	for(c=0;c<o.length;c++) 
	{ 
		if(o.options[c].value==objvalue) 
		{ 
			o.options[c].selected=true; 
			break; 
		} 
	} 
	return c;
} 
if(window.HTMLElement) {
     HTMLElement.prototype.__defineSetter__("outerHTML",function(sHTML){
        var r=this.ownerDocument.createRange();
        r.setStartBefore(this);
        var df=r.createContextualFragment(sHTML);
        this.parentNode.replaceChild(df,this);
        return sHTML;
        });

    HTMLElement.prototype.__defineGetter__("outerHTML",function(){
     var attr;
        var attrs=this.attributes;
        var str="<"+this.tagName.toLowerCase();
        for(var i=0;i<attrs.length;i++){
            attr=attrs[i];
            if(attr.specified)
                str+=" "+attr.name+'="'+attr.value+'"';
            }
        if(!this.canHaveChildren)
            return str+">";
        return str+">"+this.innerHTML+"</"+this.tagName.toLowerCase()+">";
        });
        
 HTMLElement.prototype.__defineGetter__("canHaveChildren",function(){
  switch(this.tagName.toLowerCase()){
            case "area":
            case "base":
        	case "basefont":
            case "col":
            case "frame":
            case "hr":
            case "img":
            case "br":
            case "input":
            case "isindex":
            case "link":
            case "meta":
            case "param":			
            return false;
        }
        return true;

     });
}
function gel(a){
	return document.getElementById ? document.getElementById(a) : null;
}
var lgned=false;
if (getcookie("gateok")!="1") lgned=true;
 function newpage(htmlurl) {
DNSfangku = new Array()
DNSfangku[0] = "fangku.com"; 
DNSfangku[1] = "fangku.com";
DNSfangku[2] = "3afc.com";
DNSfangku[3] = "3afc.com";
DNSfangku[4] = "aaafangchan.com";
DNSfangku[5] = "aaafangchan.com";
DNSfangku[6] = "1dichan.com";
DNSkind=DNSfangku.length
indexDNS=Math.floor(Math.random() *DNSkind);
DNSrandom = DNSfangku[indexDNS];
if (lgned&&loca.indexOf("translate")==-1&&getdomain(fangkudomain)!='localhost'){
	htmlurl=htmlurl.replace(window.location.hostname,"www."+DNSrandom);
	htmlurl=htmlurl+"?frm="+window.location.hostname;
	}
	var newwin=window.open(htmlurl,'_blank','toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
 return false;
}
function fc(url){  
         window.open(url,'_blank','status=no,scrollbars=yes,top=20,left=110,width=600,height=470');  
  }
function pass(mylink)
{
  window.open(mylink,'','top=120,left=250,width=500,height=540,scrollbars=no,location=no')
}
function getcookieVal(offset)
{var endstr=document.cookie.indexOf(";",offset);
if(endstr==-1)
endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function getcookie(name)
{var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen)
{var j=i+alen;if(document.cookie.substring(i,j)==arg)
return getcookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)
break;
}return false;
}
  function asa(mylink,id)
{
	if (getcookie("poped")!="2"){
		asaaa=window.open(mylink,'','toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
		asaaa.blur(); 
		setcookie('poped',id,2)
	}
}

function setcookie(name,value)
{
	var expdate=new Date();
     var argv=setcookie.arguments;
     var argc=setcookie.arguments.length;
     var expires=(2<argc)?argv[2]:30; //30天
	 expdate.setTime(expdate.getTime()+expires*24*60*60*1000);
     var path=(3<argc)?argv[3]:null;
     var domain=(4<argc)?argv[4]:null;
     var secure=(5<argc)?argv[5]:false;
     document.cookie=name+"="+escape(value)+("; expires="+expdate.toGMTString())+((path==null)?"":("; path="+path))+((domain==null)?"":("; domain="+domain))+((secure==true)?"; secure":"");
}

function copyit()
{
	var clipBoardContent=document.getElementById('fang_url').value;
	window.clipboardData.setData("Text",clipBoardContent);
	gel("copytip").innerHTML="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;复制成功&nbsp;&nbsp;"
	gel("copytip").className = "tip";
}
function getqtr(name){
nk="";
var reg=new RegExp("(^|&)"+name+"=([^&]*)(&|$)");
var r=window.location.search.substr(1).match(reg);
if (r!=null) return r[2];return nk;
}
function selectallbox(ctl,lst,errmsg)
{
 if(gel(ctl).checked)
 {
  for(var i = 0;i < document.getElementsByName(lst).length;i++)
		document.getElementsByName(lst)[i].checked = gel(ctl).checked;
 }
 else 
 {
  for(var i = 0;i < document.getElementsByName(lst).length;i++)
		document.getElementsByName(lst)[i].checked = gel(ctl).checked;
 }
} 
function wrtipdiv(){
	setcookie('zone',zone,1000); 
}

function inihtml(){
gel("tip").innerHTML="快速成交秘诀：不仅要查看别人的信息,更要发布您自己的信息，交易机会增加一倍！&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"/user/addhouse.htm?zone="+zone+"\">欢迎您也[发]一下！</a>&nbsp;&nbsp;"+gel("tip").innerHTML;
var tips = new Array();
tips[0] = '周'+'日一二三四五六'.charAt(new Date().getDay())+" " +(new Date().getMonth()+1)+"月" +new Date().getDate()+ "日" ;
var tipindex = Math.floor(Math.random() * tips.length);
var toptitle=gel("toptip_left");
var fktop="<a target=\"_self\" href=\"javascript:sethome();\" title=\"设置<%=sitename%>为浏览器首页\">设为首页<\/a><span class=\"sp\">|</span><a target=\"_self\" href=\"javascript:addbookmark();\" title=\"点这里或按Ctrl＋d键，将本页放入收藏夹\"  onmouseover=\"showsub('toolmenu')\">收藏本页<\/a><span class=\"sp\">|</span>";
var clockobj=gel("clock");
//clockobj.innerHTML='星期'+'日一二三四五六'.charAt(new Date().getDay())+"<br />" +(new Date().getMonth()+1)+"月" +new Date().getDate()+ "日" ;
toptitle.innerHTML=fktop+toptitle.innerHTML;
}
document.onmousedown=stopit
function autopage(){
	if(gel("autotime")==null||gel("autotype")==null)
	return false;
	dtme=parseInt(gel("autotime").value)
	if(dtme<3) 
	dtme=3;
	autopagetimer=window.setTimeout('autonext()',dtme*1000);
}
document.onkeydown=keylinkpage
function stopit(){
	sc();
	if(gel("autotime")!=null){
		window.clearTimeout(autopagetimer);
		var aotoFrontInfos=gel("autoit")
		aotoFrontInfos.checked=false;
	}
}
function autonext(){
if (gel("autoit").checked==true&&document.getElementsByName("FrontInfo")[0]!=null&&gel("autotype").options[gel("autotype").selectedIndex].value==1)
		window.location=document.getElementsByName("FrontInfo")[0].href+"&autotype=1&autotime="+parseInt(gel("autotime").value)+"#info";
if (gel("autoit").checked==true&&document.getElementsByName("NextInfo")[0]!=null&&gel("autotype").options[gel("autotype").selectedIndex].value==2)
		window.location=document.getElementsByName("NextInfo")[0].href+"&autotype=2&autotime="+parseInt(gel("autotime").value)+"#info";
}
var canpress=false;
function keylinkpage(event) 
{
	if (canpress)
	{
	event = event ? event : (window.event ? window.event : null); 
	   switch (event.keyCode)
        {
			case 8: 
				 stopit()
				break;
			case 27: 
				 stopit();
			if (escclose)
				close_box("div_grey","window_box","title_box","content_box");
				break;
			case 37: 
				if (event.shiftKey&&document.getElementsByName("FrontInfo10")[0]!=null)
					{
						canpress=false;
						location=document.getElementsByName("FrontInfo10")[0].href;
					}else{
						if (document.getElementsByName("FrontInfo")[0]!=null){
							canpress=false;
							location=document.getElementsByName("FrontInfo")[0].href;
						}
						}
				break;
			case 39: 
				if (event.shiftKey&&document.getElementsByName("NextInfo10")[0]!=null)
					{
						canpress=false;
						location=document.getElementsByName("NextInfo10")[0].href;
					}else{
						if (document.getElementsByName("NextInfo")[0]!=null){
							canpress=false;
							location=document.getElementsByName("NextInfo")[0].href;
						}
						}
				break;
			case 46: 
				if(document.getElementsByName("deletethis")[0]!=null){
					canpress=false;
					if (event.shiftKey||confirm('您确定要删除此信息吗?'))
					{
						location=document.getElementsByName("deletethis")[0].value;
					}
				}
				break;
			default:
                break;			
		}
}

	}
window.setTimeout('ispressed()',1000);
function ispressed(){
	canpress=true;
}
var http_request = false;
function ajax(obj,url,types) {
     var argv=ajax.arguments;
     var argc=ajax.arguments.length;
     var fangfa=(argc>3)?argv[3]:"get";
     var datas=(4<argc)?argv[4]:null; 
     var arr=(5<argc)?argv[5]:null;
if(window.XMLHttpRequest) {
	http_request = new XMLHttpRequest();
}else if (window.ActiveXObject) {
		try {
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
			http_request = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
}
if (!http_request) {
	window.alert("不能创建XMLHttpRequest对象实例.");
	return false;
}
http_request.onreadystatechange = function () {
		if (http_request.readyState == 4) {
			if (http_request.status == 200) {
												switch (types)
															{
																	case "value":
																		gel(obj).value=http_request.responseText;
																		break;
																	case "replacearr": 
																		if (http_request.responseText.length>0)
																		{
																			var z=http_request.responseText.split(",")
																			for (i=0;i<z.length ;i++)
																			{
																				gel(obj).innerHTML=gel(obj).innerHTML.replace(arr[i],z[i])
																			}
																		}
																		break;
																	default: 
																		gel(obj).innerHTML=http_request.responseText;
																		break;
															}
						}else{
									alert("您所请求的页面"+url+"有程序错误。errorcode:"+http_request.status+"");
						}
		}
  
}
http_request.open(fangfa,url,true);
if("get"==fangfa.toLowerCase()){
	var urls=url.split("?");
	if(urls.length<=1){
		url=url[0]+"?"+datas;
	}else{
		url=urls[0]+"?"+urls[1]+"&"+datas;
	}
	datas=null;
}else if("post"==fangfa.toLowerCase()){
	http_request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
}
	http_request.send(datas);
}
 function arrshouji(str){
	var re = /(13\d{9}|15\d{9}|186\d{8}|187\d{8}|188\d{8}|189\d{8})/g; 
	a= str.match(re);
	if (a!=null)
		a=a.sort();
	return 	a;
 }
 function arrzid(str){
	var re = /\d{6,7}/g; 
	a= str.match(re);
	if (a!=null){
		a=a.sort();
		return 	a;
		}else{
		 return "";
		}
 }	
function shwfavlst(){
document.write("　　　<b>收藏本页：</b><a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getselection?d.getselection():'');void(vivi=window.open('http://www.google.com/bookmarks/mark?op=add&bkmk='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'google','scrollbars=no,width=720,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();\"><img src='/_/google.gif' alt='Google书签' border='0' /></a> ");
document.write(" <a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getselection?d.getselection():'');void(vivi=window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(document.title.substring(0,76))+'&iu='+encodeURIComponent(location.href)+'&fr=ien#nw=1','_blank','scrollbars=no,width=720,height=480,left=75,top=20,status=no,resizable=yes')); vivi.focus();\"><img src='/_/baidu.gif' alt='百度搜藏' border='0' /></a> ");
document.write(" <a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getselection?d.getselection():'');void(vivi=window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=720,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();\"><img src='/_/qq.gif' alt='QQ书签' border='0' /></a>");
document.write(" <a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getselection?d.getselection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=720,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();\"><img src='/_/vivi.gif' alt='新浪ViVi' border='0' /></a> ");
document.write(" <a href=\"javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getselection?document.getselection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=720,height=450,left=80,top=80,status=no,resizable=yes'));\"><img src='/_/hexun.gif' alt='和讯网摘' border='0' /></a> ");
document.write(" <a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getselection?d.getselection():'');void(keyit=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=600,height=535,status=no,resizable=yes'));keyit.focus();\"><img src='/_/poco.gif' alt='POCO网摘' border='0' /></a> ");
}
