function Show_TabpaikeMenu(tabpaikeid_num,tabpaikenum){
for(var i=0;i<6;i++){document.getElementById("tabpaikecontent_"+tabpaikeid_num+i).style.display="none";}
for(var i=0;i<6;i++){document.getElementById("tabpaikemenu_"+tabpaikeid_num+i).className="";}
document.getElementById("tabpaikemenu_"+tabpaikeid_num+tabpaikenum).className="tab";
document.getElementById("tabpaikecontent_"+tabpaikeid_num+tabpaikenum).style.display="block";
}


(function(){
var categoryCtrlObj,categoryListObj,categoryListTitleObj,categoryCache = new Array(),fatherObj,totAlist,tempAobj;
var current = null;
var bingList;
var arrowup;
LetterCategory = {
/**
* 初始化类目筛选功能。
* categoryCtrlId String 类目筛选功能控制层ID
* categoryListId String 类目筛选功能显示层ID
*/
initAdv:function(categoryCtrlId,categoryListId,fatherId){
categoryCtrlObj = document.getElementById(categoryCtrlId);
categoryListObj = document.getElementById(categoryListId);
fatherObj = document.getElementById(fatherId);
arrowup = document.getElementById("arrowup");
this.eventBindingAdv(categoryCtrlObj,"li");
categoryListObj.onmouseover = function(){
this.style.display = "block"
}
categoryListObj.onmouseout = function(){
LetterCategory.hiddenResult();
}
categoryCtrlObj.onmouseout = function(){
LetterCategory.hiddenResult();
}
categoryCtrlObj.onmouseover = function(){
if(current) current.className = "c_l";
categoryListObj.style.display = "block";
arrowup.style.display = "block";
}
},
/**
* 给bindObj对象下的标签名为tagsName绑定onmouseover事件。
* bindObj Object
* tagsName String 标签名
*/
eventBindingAdv:function(bindObj,tagsName){
bingList = bindObj.getElementsByTagName(tagsName);
for(var i=0;i<bingList.length;i++){
bingList[i].setAttribute("pos",3+i*22);
bingList[i].onmouseover = this.showResult;
bingList[i].onclick = function(){
try{
aliclick(this,'?tracelog=chinaindex_leimu_sx_onclick');
}catch(e){}
}
}
},
/**
* 给bindObj对象下的标签名为tagsName绑定onmouseover和onmouseout事件。
* bindObj Object
* tagsName String 标签名
*/
eventBinding:function(bindObj,tagsName){
var bingList = bindObj.getElementsByTagName(tagsName);
for(var i=0;i<bingList.length;i++){
if(bingList[i].href){
bingList[i].onmouseover = this.showResult;
}
}
},
/**
* 显示类目结果层。
*/
showResult:function(){
if(current!=null){
current.className = "l";
}
categoryListObj.style.display = "block";
current = this;
var left = current.getAttribute("pos");

arrowup.style.left = left-4 + "px";
arrowup.style.display = "block";
current.className = "c_l";
current.style.height= "14px";
var categoryListStr_1 = LetterCategory.getCategoryListStr(current.innerHTML);
LetterCategory.setCategoryContent(categoryListStr_1,current.innerHTML);
},
/**
* 隐藏类目结果层。
*/
hiddenResult:function(){
categoryListObj.style.display = "none";
arrowup.style.display = "none";
if(current){
current.className = "l";
}
},
/**
* 根据字母获取相应的类目字符串,如果缓存中已经有这个类目字符串,
* 则从缓存中读取，如果没有则到页面中去提取新的数据，并把得到的新的数据放到缓存中.
* letter String 字母
*/
getCategoryListStr:function(letter){
var tempCategoryListStr = this.getCategoryListStrFromCache(letter);
if(tempCategoryListStr){
return tempCategoryListStr;
}else{
tempCategoryListStr = this.getCategoryListStrFromPage(letter);
this.addCategoryListStrToCache(tempCategoryListStr,letter);
if(tempCategoryListStr){
return tempCategoryListStr;
}
}
},
/**
* 根据字母从页面中提取相关数据.
* letter String 字母
*/
getCategoryListStrFromPage:function(letter){
if(!totAlist) totAlist = fatherObj.getElementsByTagName("a");
var tempCategoryListStr ="";
for(var i=0;i<totAlist.length;i++){
if(totAlist[i].className == "l_"+letter.substring(0,1)){
var tempUrl = "";
if(totAlist[i].href.indexOf("?")!=-1&&totAlist[i].href.indexOf("=")!=-1){
continue;
}else{
tempUrl = escape(totAlist[i].getAttribute("href")).substring(9,escape(totAlist[i].href).length);
}
tempCategoryListStr = tempCategoryListStr + "<a href=\"http://"+tempUrl+"\">"+totAlist[i].innerHTML+"</a>";
}
}
return tempCategoryListStr;
},
/**
* 根据字母从缓存中获取相应的类目字符串.
* letter String 字母.
*/
getCategoryListStrFromCache:function(letter){
for(var i=0;i<categoryCache.length;i++){
if(categoryCache[i].id == letter){
return categoryCache[i].value;
}
}
return null;
},
/**
* 把新的类目字符串加载到缓存中去.
* categoryListStr String 类目字符串.
* letter String 字母.
*/
addCategoryListStrToCache:function(categoryListStr,letter){
try{
categoryCache[categoryCache.length] = {id:letter,value:categoryListStr};
}catch(e){this.printError(e+":Set cache error!")}
},
/**
* 给类目结果层设置内容。
* categoryListStr String 类目列表字符串
*/
setCategoryContent:function(categoryListStr,letter){
if(categoryListObj){
if(!categoryListStr){categoryListStr = "<div style=\"text-align:center;\">没有拼音字母\“<span style='color:#ff7300;font-size:16px;font-weight:bold'>"+letter+"</span>\”开头的类目！</div>";}
categoryListObj.innerHTML = categoryListStr;
this.addListen(categoryListObj);
}
},
addListen:function(categoryListObj){
var categoryAList = categoryListObj.getElementsByTagName("a");
for(var i=0;i<categoryAList.length;i++){
categoryAList[i].onclick = function(){
try{
aliclick(this,'?tracelog=chinaindex_leimu_sx');
}catch(e){}
};
}
},
/**
* 错误提示。
* errorMsg String 错误提示内容
*/
printError:function(errorMsg){
alert(errorMsg);
}
}
})();


function SubShowClass(ID,eventType,defaultID,openClassName,closeClassName){this.parentObj=SubShowClass.$(ID);if(this.parentObj==null&&ID!="none"){throw new Error("SubShowClass(ID)参数错误:ID 对像存在!(value:"+ID+")")};if(!SubShowClass.childs){SubShowClass.childs=[]};this.ID=SubShowClass.childs.length;SubShowClass.childs.push(this);this.lock=false;this.label=[];this.defaultID=defaultID==null?0:defaultID;this.selectedIndex=this.defaultID;this.openClassName=openClassName==null?"selected":openClassName;this.closeClassName=closeClassName==null?"":closeClassName;this.mouseIn=false;var mouseInFunc=Function("SubShowClass.childs["+this.ID+"].mouseIn = true"),mouseOutFunc=Function("SubShowClass.childs["+this.ID+"].mouseIn = false");if(ID!="none"){if(this.parentObj.attachEvent){this.parentObj.attachEvent("onmouseover",mouseInFunc)}else{this.parentObj.addEventListener("mouseover",mouseInFunc,false)}};if(ID!="none"){if(this.parentObj.attachEvent){this.parentObj.attachEvent("onmouseout",mouseOutFunc)}else{this.parentObj.addEventListener("mouseout",mouseOutFunc,false)}};if(typeof(eventType)!="string"){eventType="onmousedown"};eventType=eventType.toLowerCase();switch(eventType){case "onmouseover":this.eventType="mouseover";break;case "onmouseout":this.eventType="mouseout";break;case "onclick":this.eventType="click";break;case "onmouseup":this.eventType="mouseup";break;default:this.eventType="mousedown"};this.autoPlay=false;this.autoPlayTimeObj=null;this.spaceTime=5000};SubShowClass.prototype.version="1.30";SubShowClass.prototype.author="mengjia";SubShowClass.prototype.addLabel=function(labelID,contID,parentBg,springEvent,blurEvent){if(SubShowClass.$(labelID)==null&&labelID!="none"){throw new Error("addLabel(labelID)参数错误:labelID 对像存在!(value:"+labelID+")")};var TempID=this.label.length;if(parentBg==""){parentBg=null};this.label.push([labelID,contID,parentBg,springEvent,blurEvent]);var tempFunc=Function('SubShowClass.childs['+this.ID+'].select('+TempID+')');if(labelID!="none"){if(SubShowClass.$(labelID).attachEvent){SubShowClass.$(labelID).attachEvent("on"+this.eventType,tempFunc)}else{SubShowClass.$(labelID).addEventListener(this.eventType,tempFunc,false)}};if(TempID==this.defaultID){if(labelID!="none"){SubShowClass.$(labelID).className=this.openClassName};if(SubShowClass.$(contID)){SubShowClass.$(contID).style.display=""};if(this.ID!="none"){if(parentBg!=null){this.parentObj.style.background=parentBg}};if(springEvent!=null){eval(springEvent)}}else{if(labelID!="none"){SubShowClass.$(labelID).className=this.closeClassName};if(SubShowClass.$(contID)){SubShowClass.$(contID).style.display="none"}};var mouseInFunc=Function("SubShowClass.childs["+this.ID+"].mouseIn = true"),mouseOutFunc=Function("SubShowClass.childs["+this.ID+"].mouseIn = false");if(SubShowClass.$(contID)){if(SubShowClass.$(contID).attachEvent){SubShowClass.$(contID).attachEvent("onmouseover",mouseInFunc)}else{SubShowClass.$(contID).addEventListener("mouseover",mouseInFunc,false)};if(SubShowClass.$(contID).attachEvent){SubShowClass.$(contID).attachEvent("onmouseout",mouseOutFunc)}else{SubShowClass.$(contID).addEventListener("mouseout",mouseOutFunc,false)}}};SubShowClass.prototype.select=function(num,force){if(typeof(num)!="number"){throw new Error("select(num)参数错误:num 不是 number 类型!(value:"+num+")")};if(force!=true&&this.selectedIndex==num){return};var i;for(i=0;i<this.label.length;i++){if(i==num){if(this.label[i][0]!="none"){SubShowClass.$(this.label[i][0]).className=this.openClassName};if(SubShowClass.$(this.label[i][1])){SubShowClass.$(this.label[i][1]).style.display=""};if(this.ID!="none"){if(this.label[i][2]!=null){this.parentObj.style.background=this.label[i][2]}};if(this.label[i][3]!=null){eval(this.label[i][3])}}else if(this.selectedIndex==i||force==true){if(this.label[i][0]!="none"){SubShowClass.$(this.label[i][0]).className=this.closeClassName};if(SubShowClass.$(this.label[i][1])){SubShowClass.$(this.label[i][1]).style.display="none"};if(this.label[i][4]!=null){eval(this.label[i][4])}}};this.selectedIndex=num};SubShowClass.prototype.random=function(){var O=this;var l=0,o;for(o=0;o<arguments.length;o++){l+=arguments[o]};var I=Math.random(),i=0;for(o=0;o<arguments.length;o++){i+=arguments[o]/l;if(I<i){O.select(o);break}}};SubShowClass.prototype.order=function(){var O=this;if(arguments.length!=O.label.length){throw new Error("order()参数错误:参数数量与标签数量不符!(length:"+arguments.length+")")};if(!(/^\d+$/).test(SubShowClass.sum)){return};var i=0,o;for(o=0;o<arguments.length;o++){i+=arguments[o]};var I=SubShowClass.sum%i;if(I==0){I=i};var l=0;for(o=0;o<arguments.length;o++){l+=arguments[o];if(l>=I){O.select(o);break}}};SubShowClass.prototype.play=function(spTime){if(typeof(spTime)=="number"){this.spaceTime=spTime};clearInterval(this.autoPlayTimeObj);this.autoPlayTimeObj=setInterval("SubShowClass.childs["+this.ID+"].autoPlayFunc()",this.spaceTime);this.autoPlay=true};SubShowClass.prototype.autoPlayFunc=function(){var i=this;if(i.autoPlay==false||i.mouseIn==true){return};i.nextLabel()};SubShowClass.prototype.nextLabel=function(){var index=this.selectedIndex;index++;if(index>=this.label.length){index=0};this.select(index);if(this.autoPlay==true){clearInterval(this.autoPlayTimeObj);this.autoPlayTimeObj=setInterval("SubShowClass.childs["+this.ID+"].autoPlayFunc()",this.spaceTime)}};SubShowClass.prototype.previousLabel=function(){var index=this.selectedIndex;index--;if(index<0){index=this.label.length-1};this.select(index);if(this.autoPlay==true){clearInterval(this.autoPlayTimeObj);this.autoPlayTimeObj=setInterval("SubShowClass.childs["+this.ID+"].autoPlayFunc()",this.spaceTime)}};SubShowClass.prototype.stop=function(){var i=this;clearInterval(i.autoPlayTimeObj);i.autoPlay=false};SubShowClass.$=function(objName){if(document.getElementById){return eval('document.getElementById("'+objName+'")')}else{return eval('document.all.'+objName)}};SubShowClass.readCookie=function(O){var o="",l=O+"=";if(document.cookie.length>0){var i=document.cookie.indexOf(l);if(i!=-1){i+=l.length;var I=document.cookie.indexOf(";",i);if(I==-1)I=document.cookie.length;o=unescape(document.cookie.substring(i,I))}};return o},SubShowClass.writeCookie=function(i,l,o,c){var O="",I="";if(o!=null){O=new Date((new Date).getTime()+o*3600000);O="; expires="+O.toGMTString()};if(c!=null){I=";domain="+c};document.cookie=i+"="+escape(l)+O+I};SubShowClass.sum=SubShowClass.readCookie("SSCSum");if((/^\d+$/).test(SubShowClass.sum)){SubShowClass.sum++}else{SubShowClass.sum=1};SubShowClass.writeCookie("SSCSum",SubShowClass.sum,12);

function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
       if (win && !window.opera)
       {
        if (win.contentDocument && win.contentDocument.body.offsetHeight)

         win.height = win.contentDocument.body.offsetHeight;
        else if(win.Document && win.Document.body.scrollHeight)
         win.height = win.Document.body.scrollHeight;
       }
}
}