﻿function Search(str1)
	{
	   if(str1=="请输入关键字")
	   {
	        alert('请输入关键字');
	   }
	   else
	   {
	   var str="this.location.href=\'/SearchList.aspx?keywords="+escape(str1) +"\'";	   
	   eval(str);
	   }
	}
function SearchCode(str1)
	{
	   if(str1=="请输入信件编号")
	   {
	        alert('请输入信件编号');
	   }
	   else
	   {
	   var str="this.location.href=\'/MailView.aspx?CodeID="+escape(str1) +"\'";	   
	   eval(str);
	   }
	}	
function IsUrl(bool1,bool2)
{
    if(bool1=="")
      document.write("<a href=/html/ArticleShow"+bool2+".aspx target=_Blank>" );
    else
      document.write("<a href="+ bool1 +" target=_Blank >");
}

function bmstatus(bool,bool2)
{
    if(bool=="True")
      document.write("<a href=\"/page/OnlineReg.aspx?sid="+bool2+"\" target=\"_Blank\" ><img src=\"/images/wm.jpg \" /></a>");
    else
      document.write("<img src=\"/images/ym.jpg\" />");
}

function addCookie(){　 // 加入收藏夹  
    if (document.all){   
        window.external.addFavorite(window.location.href, '宜浩佳园社区居委会');   
    }else if (window.sidebar){   
        window.sidebar.addPanel('宜浩佳园社区居委会', window.location.href, "");   
    }   
}   
  
function setHomepage(){　 // 设为首页  
    if (document.all){   
        document.body.style.behavior = 'url(#default#homepage)';   
        document.body.setHomePage('http://#');   
    }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://#');   
    }   
}    


