﻿var stabid=0;function setsrch(c){for(i=0;i<3;i++){document.getElementById("stab"+i).className = "";}c.className = "cur";if(c.id=="stab0"){document.srchfrm.action="http://cnweb.search.live.com/results.aspx?FORM=REHP";stabid=0;}if(c.id=="stab1"){document.srchfrm.action="http://cnweb.search.live.com/images/results.aspx?FORM=IRRE";stabid=1;}if(c.id=="stab2"){document.srchfrm.action="http://home.services.spaces.live.com/search/?tp=1&pg=0&sc=0&form=SPDEFD";stabid=2;}document.srchfrm.submit();}function encodeq(){if(stabid==2){document.srchfrm.q.value=encodeURIComponent(document.srchfrm.q.value);}}function tabit(btn){var idname = new String(btn.id);var s = idname.indexOf("_");var e = idname.lastIndexOf("_")+1;var tabName = idname.substr(0, s);var id = parseInt(idname.substr(e, 1));var tabNumber = btn.parentNode.childNodes.length;for(i=0;i<tabNumber;i++){document.getElementById(tabName+"_div_"+i).style.display = "none";document.getElementById(tabName+"_btn_"+i).style.backgroundColor = "#EBF3FB";document.getElementById(tabName+"_btn_"+i).style.borderBottomColor = "#ace";document.getElementById(tabName+"_btn_"+i).style.cursor = "pointer";}document.getElementById(tabName+"_div_"+id).style.display = "block";btn.style.backgroundColor = "#fff";btn.style.borderBottomColor = "#fff";btn.style.cursor = "default";}function expit(id){for(i=0;i<6;i++){document.getElementById("expcon"+i).style.display = "none";document.getElementById("exbtn"+i).className = "block";}document.getElementById("expcon"+id).style.display = "block";document.getElementById("exbtn"+id).className = "cur";}function getWeekDay(){var d,day;d = new Date();day = d.getDay();return day;}function bookmarkit(){window.external.addFavorite('http://cn.msn.com','MSN 中国')};function FocusEvt(obj,txt){if(obj.value==txt) obj.value="";}function BlurEvt(obj,txt){if(obj.value=="") obj.value=txt;}function vidiexp(id){for(i=0;i<5;i++){document.getElementById("vidi_"+i).className = "";}document.getElementById("vidi_"+id).className = "exped";}var step = 30;function prorgt(){while(document.getElementById("proccc").scrollLeft<828){document.getElementById("proccc").scrollLeft = document.getElementById("proccc").scrollLeft+step;}document.getElementById("proccc").scrollLeft = 828;document.getElementById("srbtn").style.backgroundImage = "url(http://img7.cn.msn.com/7/righta.gif)";document.getElementById("slbtn").style.backgroundImage = "url(http://img5.cn.msn.com/5/leftb.gif)";}function prolft(){while(document.getElementById("proccc").scrollLeft>0){document.getElementById("proccc").scrollLeft = document.getElementById("proccc").scrollLeft-step;}document.getElementById("proccc").scrollLeft = 0;document.getElementById("srbtn").style.backgroundImage = "url(http://img7.cn.msn.com/7/rightb.gif)";document.getElementById("slbtn").style.backgroundImage = "url(http://img5.cn.msn.com/5/lefta.gif)";}var currslid = 0;var slidint;function setfoc(id){document.getElementById("focpic").src = picarry[id];document.getElementById("foclnk").href = lnkarry[id];document.getElementById("fttltxt").innerHTML = "<a href=\""+lnkarry[id]+"\" target=_blank>"+ttlarry[id]+"</a>";currslid = id;for(i=0;i<4;i++){document.getElementById("tmb"+i).className = "thubpic";};document.getElementById("tmb"+id).className ="thubpiccur";focpic.style.visibility = "hidden";focpic.filters[0].Apply();if (focpic.style.visibility == "visible") {focpic.style.visibility = "hidden";focpic.filters.revealTrans.transition=12;}else {focpic.style.visibility = "visible";focpic.filters[0].transition=12;}focpic.filters[0].Play();}function setfoc1(id){document.getElementById("bocpic").src = picarry1[id];document.getElementById("boclnk").href = lnkarry1[id];document.getElementById("bttltxt").innerHTML = "<a href=\""+lnkarry1[id]+"\" target=_blank>"+ttlarry1[id]+"</a>";currslid = id;document.getElementById("bocpic").filters.revealTrans.transition = 12;document.getElementById("bocpic").filters[0].Apply();document.getElementById("bocpic").filters[0].Play();}function playnext(){setfoc(currslid);if(currslid==3){currslid = 0;}else{currslid++;}}function playit(){}function stopit(){clearTimeout(slidint);}window.onload = function(){if(0<getWeekDay()<6){expit(0);}else{expit(4);}}