
//<script type="text/javascript">
var loc;
var sn0;
var sn;
var nam = document.title;
function OnComplete(sc, searcher) {
    if (searcher.results && searcher.results.length > 0) {
        var gc = document.getElementById("googlecontrol");
        if (gc) gc.style.display = "block";
    }
}
function GetXhr() {
    if (window.XMLHttpRequest) {
        return new XMLHttpRequest();
    }
    return new ActiveXObject("Microsoft.XMLHTTP");
}

function vote(zhichi) {
    var xmlHttp = GetXhr();

    var url = "Vote.ashx?zhichi=" + ((zhichi) ? "1" : "0");
    xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState == 4) {
            if (xmlHttp.status == 200) {
            }
        }
    }
    xmlHttp.open("GET", url, true);
    xmlHttp.send(null)
}

function OnLoad() {
    sn = encodeURIComponent(sn0);
    if (google) {
        var sc = new google.search.SearchControl();
        var options = new google.search.SearcherOptions();
        options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);
        var searcher = new google.search.WebSearch();
        searcher.setRestriction(google.search.Search.RESTRICT_SAFESEARCH, google.search.Search.SAFESEARCH_OFF);
        searcher.setRestriction(google.search.Search.RESTRICT_EXTENDED_ARGS, { "filter": "0" });
        sc.addSearcher(searcher, options);
        sc.draw(document.getElementById("searchcontrol"));
        sc.setSearchCompleteCallback(this, OnComplete);
        sc.execute(sn0);
        
    }

    requestScript = document.createElement("script");
    requestScript.type = "text/javascript";
    requestScript.src = "http://api.search.live.net/json.aspx?AppId=AF68902E9CADADB92A5805EDDB7EBEE8176A53F7&Query=" + sn
    + "&Sources=Web&Market=zh-CN&Adult=Off&Options=EnableHighlighting&Web.Count=4&Web.Options=DisableHostCollapsing&JsonType=callback&JsonCallback=LiveSearchCompleted";
    document.getElementsByTagName("head")[0].appendChild(requestScript);

    var requestScript = document.createElement("script");
    requestScript.type = "text/javascript";
    requestScript.src = 'http://boss.yahooapis.com/ysearch/web/v1/' + sn.replace('%20%7C%20', '%20OR%20') + '?format=json&count=4&callback=YahooSearchCompleted&region=cn&lang=szh&' +
           'appid=v4CQtifV34F1Vitkv03Y2vQVAqiESDOl5PG_IQu.NwmMCKLKUHYxxx7JBNmJyqZooQgoou0-';
    document.getElementsByTagName("head")[0].appendChild(requestScript);
}
function YahooSearchCompleted(response) {
    var results = response.ysearchresponse.resultset_web;
    var output = document.getElementById("yahoocontrol");
    var resultsList = document.createElement("div");
    resultsList.className = "gsc-control";
    output.appendChild(resultsList);
    if (results) {
        output.style.display = "block";
        for (var i = 0; i < results.length; ++i) {
            var listItem = document.createElement("div");
            listItem.className = "gsc-result";
            listItem.innerHTML = genResultStr(results[i].clickurl, results[i].title, results[i].abstract, results[i].dispurl);
            resultsList.appendChild(listItem);
        }
        if (results.length == 4) {
            var moreLink = document.createElement("div");
            moreLink.innerHTML = "<a target=\"_blank\" href=\"http://search.yahoo.com/search?p=" + sn + "\">更多结果&nbsp;»</a>";
            resultsList.appendChild(moreLink);
        }
    }
}
function LiveSearchCompleted(response) {
    if (!response.SearchResponse.Errors) {
        var output = document.getElementById("bingcontrol");
        var resultsList = document.createElement("div");
        resultsList.className = "gsc-control";
        output.appendChild(resultsList);
        var results = response.SearchResponse.Web.Results;
        if (results) {
            output.style.display = "block";
            for (var i = 0; i < results.length; ++i) {
                var resultsListItem = document.createElement("div");
                resultsListItem.className = "gsc-result";
                resultsList.appendChild(resultsListItem);
                var resultStr = genResultStr(results[i].Url, results[i].Title, results[i].Description, results[i].Url);
                resultsListItem.innerHTML = resultStr.replace(new RegExp("\uE000", "g"), "<b>")
                    .replace(new RegExp("\uE001", "g"), "</b>");
            }
            if (results.length == 4) {
                var moreLink = document.createElement("div");
                moreLink.innerHTML = "<a target=\"_blank\" href=\"http://www.bing.com/search?q=" + sn + "\">更多结果&nbsp;»</a>";
                resultsList.appendChild(moreLink);
            }
        }
    }
}
function genResultStr(clickurl, title, snippet, displayurl) {
    return "<div class=\"gs-title\"><a class=\"gs-title\" href=\""
                + clickurl + "\" target=\"_blank\">"
                + title + "</a></div><div>"
                + snippet + "</div><div class=\"gs-visibleUrl\">"
	    		+ displayurl + "</div>";
}




var userip;
var pat;
var detail;
var reporter;
var query;
var m = location.href.match(/\?number=(.*)/);
if (m && m[1].length >= 8) {
    query = m[1];
}
function presubmit() {
    if (document.getElementById("form1").number.value.length < 8) {
        alert("请正确输入您要报告的电话号码");
        return false;
    }

    var radio = document.getElementById("form1").type;
    var k = radio.length;

    if (!(detail.value) || detail.value.length < 2) {
        if (radio[k - 1].checked) {
            alert("您的评论太短，请返回继续填写！");
            detail.focus();
            return false;
        } else if (!confirm("请注意，您的评论太短，将无法出现在本站首页！仍然发布请点确定，返回填写请点取消。")) {
            detail.focus();
            return false;
        }
    }

    // Calc more field
    var moreDiv = document.getElementById("morediv");
    var inputMore = "";
    if (moreDiv.hasChildNodes) {
        for (var i = 0; i < moreDiv.childNodes.length; i++) {
            var item = moreDiv.childNodes[i].firstChild;
            if (item.checked) inputMore += item.value + ",";
        }
    }
    document.getElementById("more").value = inputMore;
    
    focusReporter();
    var otherValue = document.getElementById("other").value;
    if (radio[k - 2].checked) {
        if (otherValue) radio[k - 2].value = otherValue;
    }
    return true;
}
function focusReporter() {
    if (reporter.value == userip) {
        reporter.value = "";
        reporter.style.color = "#000000";
    }
}
function blurReporter() {
    if (reporter.value == "") {
        reporter.value = userip;
        reporter.style.color = "#808080";
    }
}
function inputDetail() {
    detail.disabled = false;
    detail.style.display = "block";
    document.getElementById("notice").style.display = "none";
    detail.focus();
}
function hideDetail() {
    detail.disabled = true;
    detail.style.display = "none";
    document.getElementById("notice").style.display = "block";
}
function clickOther() {
    inputDetail();
    var other = document.getElementById("other");
    other.focus();
}
function expand() {
    detail.rows = 5;
}
function getMore(str) {
    var result = [];
    var m = str.match(pat);
    if (!m) return result;
    for (var i = 0; i < m.length; i++) {
        if (m[i] != query && (i == 0 || m[i] != m[0])) {
            result.push(m[i]);
            if (result.length >= 2) break;
        }
    }
    return result;
}
function detailChange() {
    var nums = getMore(detail.value);
    var morediv = document.getElementById("morediv");
    morediv.innerHTML = "";
    for (var i = 0; i < nums.length; i++) {
        var itemdiv = document.createElement("div");
        var ch = document.createElement("input");
        ch.type = "checkbox";
        ch.defaultChecked = true;
        ch.value = nums[i];
        itemdiv.appendChild(ch);
        itemdiv.appendChild(document.createTextNode(nums[i]));
        morediv.appendChild(itemdiv);
    }
    morediv.parentNode.style.display = (nums.length > 0) ? "block" : "none";
}

// Share Links
function addShareLinks() {
  document.write("<div><b>添加本页到：</b>");
  document.write("<a href=\"javascript:window.open('http://shuqian.qq.com/post?from=3&title='+encodeURIComponent(document.title)+'&uri='+encodeURIComponent(document.location.href)+'&jumpback=2&noui=1','favit','width=930,height=470,left=50,top=50,toolbar=no,menubar=no,location=no,scrollbars=yes,status=yes,resizable=yes');void(0)\">QQ书签</a>, ");
  document.write("<a href=\"javascript:window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(nam)+'&amp;iu='+encodeURIComponent(loc)+'&amp;fr=ien#nw=1','baidu',''); void(0)\">百度搜藏</a>, ");
  document.write("<a href=\"javascript:void((function(s,d,e){var%20f='http://share.renren.com/share/buttonshare.do?link=',u=loc,l=nam,p=[e(u),'&amp;title=',e(l)].join('');function%20a(){if(!window.open([f,p].join(''),'xnshare',['toolbar=0,status=0,resizable=1,width=626,height=436,left=',(s.width-626)/2,',top=',(s.height-436)/2].join('')))u.href=[f,p].join('');};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();})(screen,document,encodeURIComponent));\">人人网</a>, ");
  document.write("<a href=\"javascript:window.open('http://www.kaixin001.com/repaste/share.php?rtitle=' + encodeURIComponent(nam) + '&rurl=' + encodeURIComponent(loc),'kaixin');void(0)\">开心网</a>, ");
  document.write("<a href=\"javascript:void(function(){var%20d=document,e=encodeURIComponent,s1=window.getSelection,s2=d.getSelection,s3=d.selection,s=s1?s1():s2?s2():s3?s3.createRange().text:'',r='http://www.douban.com/recommend/?url='+e(loc)+'&title='+e(nam)+'&sel='+e(s)+'&v=1&n=1',x=function(){if(!window.open(r,'douban','toolbar=0,resizable=1,scrollbars=yes,status=1,width=450,height=330'))location=r+'&r=1'};if(/Firefox/.test(navigator.userAgent)){setTimeout(x,0)}else{x()}})()\">豆瓣</a>, ");
  document.write("<a href=\"javascript:location='http://www.google.com/bookmarks/mark?hl=zh-CN&op=add&bkmk='+encodeURIComponent(loc)+'&title='+encodeURIComponent(nam)\">Google书签</a>, ")
  document.write("<a href=\"javascript:location='http://myweb.cn.yahoo.com/addp.html?method=add&amp;url='+encodeURIComponent(loc)+'&amp;title='+encodeURIComponent(nam);void(0);\">雅虎收藏</a>, ");
  document.write("<a href=\"javascript:location='http://delicious.com/post?url='+encodeURIComponent(loc)+'&amp;title='+encodeURIComponent(nam)\">Delicious</a>, ");
  document.write("<a href=\"javascript:location='http://digg.com/submit?phase=2&amp;url='+encodeURIComponent(loc)+'&amp;title='+encodeURIComponent(nam);void(0);\">Digg</a>, ");
  document.write("<a href=\"javascript:void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&amp;title='+escape(nam)+'&amp;url='+escape(loc),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();\">新浪ViVi</a>, ");
  document.write("<a href=\"javascript:void(hexun=window.open('http://bookmark.hexun.com/post.aspx?title='+escape(nam)+'&url='+escape(loc),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));\">和讯转帖</a>, ");
  document.write("<a href=\"javascript:window.external.AddFavorite(loc,nam)\">IE收藏夹</a>");
  document.writeln("</div>");
}

function displayBaiduResult() {
  var baiduControl = document.getElementById("baiducontrol");
  baiduControl.innerHTML = "";
  var baiduIframe = document.createElement("iframe");
  baiduIframe.id = "baiduiframe";
  document.getElementById("baiducontrol").appendChild(baiduIframe);
  baiduIframe.src = "http://www.baidu.com/s?wd=" + query;
}

function getReportCount() {
    return "430915";
}

function getHotReports() {
    return "<ol><li><div style=\"float:right\">94</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=02151862150\">02151862150</a><span class=\"hint\">(上海市)</span></li><li><div style=\"float:right\">86</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=1259046701\">1259046701</a></li><li><div style=\"float:right\">68</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=03162774807\">03162774807</a><span class=\"hint\">(河北省廊坊市)</span></li><li><div style=\"float:right\">65</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=125907612\">125907612</a></li><li><div style=\"float:right\">55</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=02151105545\">02151105545</a><span class=\"hint\">(上海市)</span></li><li><div style=\"float:right\">46</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=075595511\">075595511</a><span class=\"hint\">(广东省深圳市)</span></li><li><div style=\"float:right\">39</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=01095510\">01095510</a><span class=\"hint\">(北京市)</span></li><li><div style=\"float:right\">35</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=01052166564\">01052166564</a><span class=\"hint\">(北京市)</span></li><li><div style=\"float:right\">34</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=02133194144\">02133194144</a><span class=\"hint\">(上海市)</span></li><li><div style=\"float:right\">30</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=01901213\">01901213</a><span class=\"hint\">(美国/加拿大)</span></li><li><div style=\"float:right\">28</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=1543216789\">1543216789</a></li><li><div style=\"float:right\">27</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=010110110\">010110110</a><span class=\"hint\">(北京市)</span></li><li><div style=\"float:right\">26</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=02151880909\">02151880909</a><span class=\"hint\">(上海市)</span></li><li><div style=\"float:right\">25</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=www+ctvv3+me\">www.ctvv3.me</a></li><li><div style=\"float:right\">23</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=01051600312\">01051600312</a><span class=\"hint\">(北京市)</span></li><li><div style=\"float:right\">23</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=02081132333\">02081132333</a><span class=\"hint\">(广东省广州市)</span></li><li><div style=\"float:right\">22</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=02763366076\">02763366076</a><span class=\"hint\">(湖北省武汉市)</span></li><li><div style=\"float:right\">22</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=1259065582\">1259065582</a></li><li><div style=\"float:right\">19</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=01056228879\">01056228879</a><span class=\"hint\">(北京市)</span></li><li><div style=\"float:right\">18</div><a href=\"http://www.soudianhua.com/Phone.aspx?number=cm+wap3g+cc\">cm.wap3g.cc</a></li></ol>";
}

function getRecentReports() {
    return "<h4>最近用户报告</h4><div class=\"content\"><ul><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=18275959279\">18275959279：其他</a></div><div class=\"detail\">我向办理这个号码，怎么办。275959279联系！谢谢（四川省遂宁市大英县连通网吧(蓬乐路176号)<span class=\"chenghu\">用户</span>于<i>2012-2-23 4:06</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=02061178436\">02061178436：骚扰电话</a></div><div class=\"detail\">三更半夜的，响一声吓死人的（广东省广州市海珠区<span class=\"chenghu\">用户</span>于<i>2012-2-23 2:33</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=02151105547\">02151105547：骚扰电话</a></div><div class=\"detail\">混蛋！！！！（上海市杨浦区电信ADSL<span class=\"chenghu\">用户</span>于<i>2012-2-23 2:24</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=02963363254\">02963363254：骚扰电话</a></div><div class=\"detail\">一直骚扰，&#215;&#215;（广东省深圳市电信ADSL<span class=\"chenghu\">用户</span>于<i>2012-2-23 2:05</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=15977345543\">15977345543：骚扰电话</a></div><div class=\"detail\">垃圾（福建省福州市电信ADSL<span class=\"chenghu\">用户</span>于<i>2012-2-23 0:31</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=13929564715\">13929564715</a></div><div class=\"detail\">大家请注意，今天被这个号码骗了！请大家不要上当！这个骗子说找小姐被人抓了，让汇钱去他帐户！还要替他保<a href=\"http://www.soudianhua.com/Phone.aspx?number=13929564715\"><b>……</b></a>（新加坡星和宽带<span class=\"chenghu\">用户</span>于<i>2012-2-23 0:26</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=4007110110\">4007110110：骚扰电话</a></div><div class=\"detail\">推销（浙江省杭州市电信ADSL<span class=\"chenghu\">用户</span>于<i>2012-2-22 23:16</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=13221405498\">13221405498：骚扰电话</a></div><div class=\"detail\">推销（浙江省杭州市电信ADSL<span class=\"chenghu\">用户</span>于<i>2012-2-22 23:16</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=057128203226\">057128203226：骚扰电话</a></div><div class=\"detail\">推销（浙江省杭州市电信ADSL<span class=\"chenghu\">用户</span>于<i>2012-2-22 23:16</i>）</div></div></li><li><div class=\"item\"><div class=\"title\"><a href=\"http://www.soudianhua.com/Phone.aspx?number=15675885802\">15675885802：诈骗电话</a></div><div class=\"detail\">骗子，大骗子（广东省深圳市<span class=\"chenghu\">用户</span>于<i>2012-2-22 22:39</i>）</div></div></li></ul><a href=\"/Reports.aspx\">更多...</a></div>";
}


//</script>

