﻿function hideOtherMenu(){var o=$("menu2");var ou=o.getElementsByTagName("UL");for(var i=0;i<ou.length;i++)ou[i].style.display="none";}
function overMenu(o){hideOtherMenu();o=$(o.id+"2");if(o){o.style.display="block";}}
function attachEnterKey(func,obj){if(obj);else obj=document;Event.observe(obj,'keydown',function(event){if(Event.getKeyCode(event)==13)func.apply();});}
function ajaxbegin(tip){if(tip){var o=$("ajaxtip");$(tip).appendChild(o);o.style.display="";}}
function ajaxend(tip){$("ajaxtip").style.display="none";}
function caller(u,p,obj,x,y,info){
    if(Ajax){
        Ajax.x=x;Ajax.y=y;Ajax.bind=obj;
        Ajax.begin=function(){if(Ajax.bind){var o=$("ajaxtip");var t=$(Ajax.bind);if(t){o.style.left=absX(t)+(Ajax.x?Ajax.x:0)+"px";o.style.top=absY(t)+(Ajax.y?Ajax.y:(t.offsetHeight+5))+"px";o.innerHTML=Ajax.tip;o.style.display="";}}}
        if(obj){Ajax.end=function(){$("ajaxtip").style.display="none";}}
    }
    AjaxHelper.Call({url:u,pars:p});
}

function setSize(){
    var a= window.document.title.split(">");var s="";
    for(var i=0;i<a.length;i++){
        if(a[i]!=""){
        if(i==a.length-1) s+="<span style='font-size:12px;'>"+a[i]+"</span>";
        else s+="<span style='font-size:12px;'>"+a[i]+"</span> &gt; ";
        }
    }
    s=s.replace("客服中心","<a href=\"default.aspx\">客服中心</a>").replace("我的问题","<a href=\"MyQuestionList.aspx\">我的问题</a>");
    $("posleft").innerHTML=s;
}
function search() {
    var s=$('textfield').value;
    if (s != '' && s != '请输入你要查询的关键字') {
        window.location = 'FaqIndex.aspx?searchTxt=' + encodeURI(encodeURI($('textfield').value));
    }
    else {
        $('textfield').value = '请输入你要查询的关键字';
        $('textfield').select();
    }
}
function getparastr(strname) {//js取页面参数
    var hrefstr, pos, parastr, para, tempstr;
    hrefstr = window.location.href;
    pos = hrefstr.indexOf("?")
    parastr = hrefstr.substring(pos + 1);
    para = parastr.split("&");
    tempstr = "";
    for (i = 0; i < para.length; i++) {
        tempstr = para[i];
        pos = tempstr.indexOf("=");
        if (tempstr.substring(0, pos) == strname) {
            return tempstr.substring(pos + 1);
        }
    }
    return null;
}