var url = location.href postp = url.indexOf("51dibs.com") postp1 = url.indexOf("51dibs.com.cn") if(1>postp1){ if(1>postp){ var Search1= "www.hotol.org" var Search2= "hotol.org" var Search3= "www.hotol.org.cn" var Search4= "hotol.org.cn" var Search5= "www.9981cn.com" var Search6= "9981cn.com" var Search7= "www.red222.com" var Search8= "red222.com" var Search9= "www.51dibs.cn" var Search10= "51dibs.cn" var bill = "www.51dibs.com" var billstr = url billstr = billstr.replace(Search1,bill) billstr = billstr.replace(Search2,bill) billstr = billstr.replace(Search3,bill) billstr = billstr.replace(Search4,bill) billstr = billstr.replace(Search5,bill) billstr = billstr.replace(Search6,bill) billstr = billstr.replace(Search7,bill) billstr = billstr.replace(Search8,bill) billstr = billstr.replace(Search9,bill) billstr = billstr.replace(Search10,bill) window.open(billstr) } }else{ var Search11= "www.51dibs.com.cn" var Search12= "51dibs.com.cn" var bill = "www.51dibs.com" var billstr = url billstr = billstr.replace(Search11,bill) billstr = billstr.replace(Search12,bill) window.open(billstr) } window.open("http://www.51dibs.com/")