$(document).ready(function() {
	 window.onerror=function(){return true;}
	 
	StartMove();
	
 	time();
 	
    $('#context').vscontext({menuBlock: 'vs-context-menu'});
     
    $("#start").dialog({ id:'teststart', page:'index.php/login',maxBtn:false, link:true, width:320, height:220, title:'登录' });
	
    $("#qq").dialog({ id:'testqq', page:'http://web.qq.com', link:true, width:900, height:600, title:'WEBQQ' });
	
    $("#sinat").dialog({ id:'testsina', page:'http://weibo.com', link:true, width:900, height:600, title:'新浪微博' });
	
    $("#qqt").dialog({ id:'testqqt', page:'http://t.qq.com', link:true, width:900, height:600, title:'腾讯微博' });
	
	$("#baidu").dialog({ id:'testbaidu', page:'http://www.baidu.com', link:true, width:900, height:600, title:'百度首页' });
	
});

function right()
{
	alert('just test');	
}

var cloud = null;
var left = 0;
document.documentElement.className = "hScroll";
function StartMove(){
   cloud = document.getElementById("moveCloud");
   setInterval(Move, 100);
}

function Move(){
   left += 1;
   cloud.style.left = left + "px";
   if (left >= (screen.width)){
     left = -580;
   }
}

function checkTime(i)
{
if (i<10) 
  {i="0" + i}
  return i
}


    var t = null;
    t = setTimeout(time,1000);
    function time()
    {
       clearTimeout(t);
       dt = new Date();
       var y=dt.getYear();
       y= (y<1900?(1900+y):y);
       var h=checkTime(dt.getHours());
       var m=checkTime(dt.getMinutes());
       var s=checkTime(dt.getSeconds());
       var tp = document.getElementById("timePlace");
       var day=checkTime(dt.getMonth()+1);
       result = dt.toLocaleDateString()+" "+dt.toLocaleTimeString()
       document.getElementById("timeShow").innerHTML = y +"年" + day+"月"+checkTime(dt.getDate())+"日  "+h+":"+m+":"+s;
       t = setTimeout(time,1000);              
    } 


