$(document).ready(function(){
      /*滚动条滚动时从新获取时间层到位置*/
	$(window).scroll(function(){  
		if($(".floatDiv").length > 0){
		   $('.floatDiv').css({top:$(this).scrollTop()+10});
		   $('#floatDivID').css({top:$(this).scrollTop()+365});
	    }
	});

    var newDate = new Date();
    var tragerDate = new Date("Tue Feb 1 2011 23:59:59 GMT+0800");
    if(newDate>=tragerDate){
	    if($(".floatDiv").length > 0){
		   $(".floatDiv").draggable();
	       $(".floatDiv").show();
	    }
    }
 
});

function clsFloat(){
     $('.floatDiv').hide();
}


//收藏此页面

function addBookmark(title,url) {
	url = "http://www.huayur.com";
	title = "北京赢在执着教育科技有限公司";
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite(url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

function setHomepage(){　 // 设为首页 
    if (document.all){  
        document.body.style.behavior = 'url(#default#homepage)';  
        document.body.setHomePage('http://www.huayur.com');  
    }else if (window.sidebar){  
        if (window.netscape){  
            try {  
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
            }catch (e) {  
                alert("该操作被浏览器拒绝，如果想启用该功能，请在地址栏內输入 about:config,然后将项 signed.applets.codebase_principal_support 值改为true");  
            }  
        }  
        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);  
        prefs.setCharPref('browser.startup.homepage', 'http://www.huayur.com/');  
    }  
}     
