// JavaScript Document
// by mfkiqpl 2010.3.10
$(function(){
	$(".p06 li a").mouseover(function(o){
	var mw = $(document).width()>960 ? Math.floor(($(document).width()-970)/2)+960:960;
	var s=$(o.target).offset();
	var sobj=$(o.target).attr("rel");
	var objwidth=$("#"+sobj).width();
	var mytop=s.top+32;
	var myleft=objwidth+s.left>mw ? mw-objwidth : s.left;
	$(".p07").hide();	
	$("#"+sobj).css({"top":mytop+"px","left":myleft+"px","display":"block"})
	})
})


function addCookie(){　 // 加入收藏夹 
    if (document.all){  
        window.external.addFavorite(window.location.href, document.title);  
    }else if (window.sidebar){  
        window.sidebar.addPanel(document.title, window.location.href, "");  
    }  
}  
 
function setHomepage(){　 // 设为首页 
    if (document.all){  
        document.body.style.behavior = 'url(#default#homepage)';  
        document.body.setHomePage(window.location.href);  
    }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', window.location.href);  
    }  
}    
