var subMenu_timer = [];
		function showSubMenu(_elm,_id){
			clearTimeout(subMenu_timer[_id]);
			document.getElementById(_id).style.top = (getpos(_elm).top+23)+'px';
			document.getElementById(_id).style.left = getpos(_elm).left+'px';
			document.getElementById(_id).style.display='block';
		}
		function showSubMenu2(_id){
			clearTimeout(subMenu_timer[_id]);
		}
		function hideSubMenu(_id){
			subMenu_timer[_id] = setTimeout(function(){
				document.getElementById(_id).style.display='none';
			},100);
		}
		function getpos(_elm)
		{
			var tl = {top:0, left:0};
			while(_elm)
			{
				tl.top+=_elm.offsetTop;
				tl.left+=_elm.offsetLeft;
				_elm=_elm.offsetParent;
			}
			return tl;
		}
		
		
		
		
		var subMenu_timer = [];
		function showSubMenu(_elm,_id){
			clearTimeout(subMenu_timer[_id]);
			document.getElementById(_id).style.top = (getpos(_elm).top+23)+'px';
			document.getElementById(_id).style.left = getpos(_elm).left+'px';
			document.getElementById(_id).style.display='block';
		}
		function showSubMenu2(_id){
			clearTimeout(subMenu_timer[_id]);
		}
		function hideSubMenu(_id){
			subMenu_timer[_id] = setTimeout(function(){
				document.getElementById(_id).style.display='none';
			},100);
		}
		function getpos(_elm)
		{
			var tl = {top:0, left:0};
			while(_elm)
			{
				tl.top+=_elm.offsetTop;
				tl.left+=_elm.offsetLeft;
				_elm=_elm.offsetParent;
			}
			return tl;
		}		
		
		
		
		

$().ready(function(){
    $("#HomePage").click(function(){
        if (document.all) {
            this.style.behavior='url(#default#homepage)';
            this.setHomePage('http://www.92.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.92.com');
        }
    })
    
    $("#Favorite").click(function(){
        if (document.all) {
            window.external.AddFavorite(window.location,'一卡通');
        } else if (window.sidebar) {
            window.sidebar.addPanel('一卡通', window.location, "");
        }
    })
})		

