function getObject(objectId) {
if(document.getElementById && document.getElementById(objectId)) {
return document.getElementById(objectId);
} else if (document.all && document.all(objectId)) {
return document.all(objectId);
} else if (document.layers && document.layers[objectId]) {
return document.layers[objectId];
} else {
return false;
}
}
function killerrors() { return true; } window.onerror = killerrors; 


function bot(n){
for(var i=1;i<=3;i++){
if (i==n){
getObject('exp'+i).className='expbot';
getObject('expb'+i).className='expbox';
}
else {
getObject('exp'+i).className='';
getObject('expb'+i).className='noi';
}
}
}

function star(n){
for(var i=1;i<=4;i++){
if (i==n){
getObject('str'+i).className='starbot';
getObject('strb'+i).className='starlist';
}
else {
getObject('str'+i).className='';
getObject('strb'+i).className='noi';
}
}
}
function stadr(n){
for(var i=1;i<=3;i++){
if (i==n){
getObject('stdr'+i).className='starbot';
getObject('strdb'+i).className='starlist';
}
else {
getObject('stdr'+i).className='';
getObject('strdb'+i).className='noi';
}
}
}

function shous(n){
for(var i=1;i<=5;i++){
if (i==n){
getObject('sho'+i).className='expbot2';
getObject('shob'+i).className='expbox fl';
}
else {
getObject('sho'+i).className='';
getObject('shob'+i).className='noi';
}
}
}

function chl(n){
for(var i=1;i<=5;i++){
if (i==n){
getObject('chlt'+i).className='l_bot';
getObject('chlb'+i).className='channel_l_tex';
}
else {
getObject('chlt'+i).className='';
getObject('chlb'+i).className='noi';
}
}
}

function adimg(n){
for(var i=1;i<=5;i++){
if (i==n){
getObject('ado'+i).className='ad_bot';
getObject('adob'+i).className='ad_rimgbox';
}
else {
getObject('ado'+i).className='';
getObject('adob'+i).className='noi';
}
}
}


function jf(n){
for(var i=1;i<=5;i++){
if (i==n){
getObject('sjf'+i).className='expbot2';
getObject('sjfb'+i).className='expbox fl';
}
else {
getObject('sjf'+i).className='';
getObject('sjfb'+i).className='noi';
}
}
}

function jfc(n){
for(var i=1;i<=5;i++){
if (i==n){
getObject('sjfc'+i).className='expbot2';
getObject('sjfcb'+i).className='expbox fl';
}
else {
getObject('sjfc'+i).className='';
getObject('sjfcb'+i).className='noi';
}
}
}


function qd(n){
for(var i=1;i<=4;i++){
if (i==n){
getObject('qdt'+i).className='topli';
getObject('qdb'+i).className='tuibox';
}
else {
getObject('qdt'+i).className='';
getObject('qdb'+i).className='noi';
}
}
}

function lin(n){
for(var i=1;i<=2;i++){
if (i==n){
getObject('lint'+i).className='linkb';
getObject('linb'+i).className='linkimg';
}
else {
getObject('lint'+i).className='linkb2';
getObject('linb'+i).className='noi';
}
}
}
function chal(n){
for(var i=1;i<=2;i++){
if (i==n){
getObject('chalt'+i).className='r_bot';
getObject('chalb'+i).className='yoi';
}
else {
getObject('chalt'+i).className='';
getObject('chalb'+i).className='noi';
}
}
}

function tabH(n){
for(var i=1;i<=4;i++){
if (i==n){
getObject('tabHt'+i).className='tabActive';
getObject('tabHb'+i).className='yoi';
}
else {
getObject('tabHt'+i).className='';
getObject('tabHb'+i).className='noi';
}
}
}

function indtop(n){
for(var i=1;i<=4;i++){
if (i==n){
getObject('indtopt'+i).className='indtopbs';
getObject('indtopb'+i).className='new_ind_tabItem';
}
else {
getObject('indtopt'+i).className='';
getObject('indtopb'+i).className='noi';
}
}
}

function toggle(targetid){
    if (document.getElementById)
 {
        target=document.getElementById(targetid);
            if (target.style.display=="block")
   {
               target.style.display="none";
              var aaa  =document.all("aa");
     var s='';
               for(var i=0;i<aaa.length;i++)
               {
                 if (aaa[i].checked==true)
                 {
         s+=aaa[i].value;
                 }
            }
               } else 
    {
                target.style.display="block";
             }
     }
}


function goTop(){
	var _btn = document.getElementById("goTop");
	if (document.documentElement && document.documentElement.scrollTop) {
		var _con = document.documentElement;
	} else if (document.body) {
		var _con = document.body;
	}
	window.onscroll = set;
	_btn.style.left = document.documentElement.scrollWidth/2 + 500 + "px";
	_btn.onclick = function (){
		_btn.style.display = "none";
		window.onscroll = null;
		this.timer = setInterval(function() {
			_con.scrollTop -= Math.ceil(_con.scrollTop * 0.3);
			if (_con.scrollTop == 0) clearInterval(_btn.timer, window.onscroll = set);
		},10);
	};
	function set() {
		_btn.style.display = _con.scrollTop ? 'block': "none";
	}
};
document.write("<div id=\"goTop\" style=\"font-size:12px; width:20px; height:55px; background:#0950A2; color:#fff; line-height:14px; position:fixed; bottom:30px; display:none; cursor:pointer; text-align:center; padding:5px 0; z-index:1; _position:absolute; _top:expression(eval(document.compatMode && document.compatMode == \'CSS1Compat\') ? documentElement.scrollTop + (documentElement.clientHeight - this.clientHeight) - 30 : document.body.scrollTop + (document.body.clientHeight - this.clientHeight) - 30);\">返<br />回<br />顶<br />部</div>");
window.onscroll = goTop;
////判断颜色
//function init(){
//  var colorsave;
//  var tobj=document.getElementById("table1").getElementsByTagName("li");
//  for(var i=0;i<tobj.length;i++)
//     {
//         if(i%2)tobj[i].style.backgroundColor="#FEF8FA";
//     }
//}
var tgs = new Array( 'div','td','tr');
var szs = new Array( 'xx-small','x-small','14px','medium','large','x-large','xx-large' );
var startSz = 2;
function ts( trgt,inc ) {
if (!document.getElementById) return
var d = document,cEl = null,sz = startSz,i,j,cTags;
sz += inc;
if ( sz < 0 ) sz = 0;
if ( sz > 6 ) sz = 6;
startSz = sz;
if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];
cEl.style.fontSize = szs[ sz ];
for ( i = 0 ; i < tgs.length ; i++ ) {
cTags = cEl.getElementsByTagName( tgs[ i ] );
for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
}
}

//弹出窗口JS
var isIe=(document.all)?true:false;
//设置select的可见状态
function setSelectState(state)
{
var objl=document.getElementsByTagName('select');
for(var i=0;i<objl.length;i++)
{
objl[i].style.visibility=state;
}
}
function mousePosition(ev)
{
if(ev.pageX || ev.pageY)
{
return {x:ev.pageX, y:ev.pageY};
/*return {x:ev.pageX, y:ev.pageY};*/
}
return {
/*x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.documentElement.scrollTop*/
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.documentElement.scrollTop
};
}
//弹出方法
function showMessageBox(wTitle,content,pos,wWidth)
{
/*closeWindow();
var bWidth=parseInt(document.documentElement.scrollWidth);
var bHeight=parseInt(document.documentElement.scrollHeight);
var back=document.createElement("div");
back.id="back";
var styleStr="top:0px;left:0px;position:absolute; z-index:999;background:#000;width:"+bWidth+"px;height:"+bHeight+"px;";
styleStr+=(isIe)?"filter:alpha(opacity=0);":"opacity:0;";
back.style.cssText=styleStr;
document.body.appendChild(back);
showBackground(back,60);
*/var mesW=document.createElement("div");
mesW.id="mesWindow";
mesW.className="alert_box";
mesW.innerHTML="<div class='alert_box_top'><div class='alert_tilte'>"+wTitle+"</div><div class='close'><a onclick='closeWindow();' title='关闭窗口'>关闭窗口</a></div></div><div class='mesWindowContent' id='mesWindowContent'>"+content+"</div><div class='mesWindowBottom'></div>";
/*styleStr="left:"+(((pos.x-wWidth)>0)?(pos.x-wWidth):pos.x)+"px;top:"+(pos.y)+"px;position:absolute;width:"+wWidth+"px;";*/
/*styleStr="left:"+(document.body.clientWidth/2-wWidth/2-100)+"px;top:"+(pos.y -200)+"px;position:absolute;width:"+wWidth+"px;"*/
styleStr="left:"+(document.body.clientWidth/2-wWidth/2)+"px;top:"+(100)+"px;position:fixed;width:"+wWidth+"px; _position:absolute; _top:"+(pos.y -200)+"px;"
mesW.style.cssText=styleStr;
document.body.appendChild(mesW);
}
//让背景渐渐变暗
function showBackground(obj,endInt)
{
if(isIe)
{
obj.filters.alpha.opacity+=10;
if(obj.filters.alpha.opacity<endInt)
{
setTimeout(function(){showBackground(obj,endInt)},5);
}
}else{
var al=parseFloat(obj.style.opacity);al+=0.02;
obj.style.opacity=al;
if(al<(endInt/100))
{setTimeout(function(){showBackground(obj,endInt)},5);}
}
}
//关闭窗口
function closeWindow()
{
if(document.getElementById('back')!=null)
{
document.getElementById('back').parentNode.removeChild(document.getElementById('back'));
}
if(document.getElementById('mesWindow')!=null)
{
document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));
}
if(isIe){
setSelectState('');}
}
//测试弹出
function testMessageBox1(ev)
{
var objPos = mousePosition(ev);
messContent="<div class='alert_box_tex'><iframe style='width: 557px; height: 373px' align='center' marginwidth='0' marginheight='0' src='http://www.5200tv.com/html/ad/showbox.html' frameborder='0' scrolling='no' twffan='done'></iframe></div>";
showMessageBox('精彩推荐',messContent,objPos,557);
}

