var isUP=0;
function firClock()
{
var timeTxt1=document.createTextNode("");
document.getElementById("timeA").appendChild(timeTxt1);
var timeTxt2=document.createTextNode("");
document.getElementById("timeB").appendChild(timeTxt2);
}
function updateClock()
{
with(new Date)
{
var a=getMinutes();
a=(a<10?"0":"")+a;
var b=getSeconds();
b=(b<10?"0":"")+b;
document.getElementById("timeA").firstChild.nodeValue=getHours()+":"+a+":"+b;document.getElementById("timeB").firstChild.nodeValue=getFullYear()+"/"+(getMonth()+1)+"/"+getDate();
}
}
function bkc(num)
{
document.body.style.backgroundImage='url('+'style/images/bg'+num+'.jpg)';
}
function addFav(sURL,sTitle)
{
try{window.external.addFavorite(sURL,sTitle)}
catch(e){
try{window.sidebar.addPanel(sTitle,sURL,"")}
catch(e){
alert("你的浏览器不支持直接收藏，请按键盘Ctrl和D键进行添加");
}
}
}
function mpClick()
{
alert("音乐播放器正在开发中，敬请关注！");
}
function sClick()
{
if(isUP==0)
{
document.getElementById('StartMenu').style.display="block";
var a=document.getElementById("start").getElementsByTagName("a");
a[0].className="up";
isUP=1;
}
else
{
document.getElementById('StartMenu').style.display="none";
var a=document.getElementById("start").getElementsByTagName("a");
a[0].className="";
isUP=0;
}
}
function setSize()
{
document.getElementById("divPage").style.width=(document.body.clientWidth-350+"px")
}
function InitPage()
{
setSize();
firClock();
updateClock();
setInterval('updateClock()',1000);
}
if(window.addEventListener)
{
window.addEventListener("load",InitPage,false);
}
else if(window.attachEvent)
{
window.attachEvent("onload",InitPage);
}
