function $Obj(objname)
{
	return document.getElementById(objname);
}

function ShowUrlTr()
{
	var jumpTest = $Obj('flagsj');
	var jtr = $Obj('redirecturltr');
	var jf = $Obj('redirecturl');
	if(jumpTest.checked) jtr.style.display = "block";
	else{
		//jf.value = '';
		jtr.style.display = "none";
	}
}

function ShowColor()
{
	var fcolor=showModalDialog("color.htm?ok",false,"dialogWidth:110px;dialogHeight:125px;status:0;dialogTop:"+(+320)+";dialogLeft:"+(+620));
	if(fcolor!=null && fcolor!="undefined") document.myform.color.value = fcolor;
}

function cdel() { 
	if(confirm("确定要删除此信息吗？")){
	return true;
	}else return false;
} 

function AddFavorite()
{
	//sURL="http://"+window.location.host;
	sURL=window.location.href;
	sTitle=document.title;
    try
    {
        window.external.addFavorite(sURL, sTitle);
    }
    catch (e)
    {
        try
        {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e)
        {
            alert("加入收藏失败，请使用Ctrl+D进行添加");
        }
    }
}
function SetHome(obj){
	vrl="http://"+window.location.host;
        try{
                obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
        }
        catch(e){
                if(window.netscape) {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
                        } 
                        catch (e)  {
                                alert("此操作被浏览器拒绝！"); 
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
}
