//function Comments(g1)
//{
//	if(document.getElementById(g1).value=="" || document.getElementById(g1).value=="文明上网 登陆发帖" || document.getElementById(g1).value=="内容不可以为空")
//	{
//		document.getElementById(g1).value="内容不可以为空";
//        document.getElementById(g1).focus();
//		return false;
//	}
//}
function set_pic(iwidth,div_name)
{
    temp = document.getElementById(div_name);
    lis = temp.getElementsByTagName('img');
    for(i=0;i<lis.length;i++)
    {
    imgObj = new Image(); 
    imgObj.src = lis[i].src; 
       if(imgObj.width>iwidth)
        {

            iheight=iwidth/imgObj.width*imgObj.height;
            lis[i].width=iwidth;
            lis[i].height=iheight;
        } 
    }
    

}

function killErrors() {
return true;
}
window.onerror = killErrors;

function toDesktop(sUrl,sName){
try
{
var WshShell = new ActiveXObject("WScript.Shell");
var oUrlLink = WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop") + "\\" + sName + ".url");
oUrlLink.TargetPath = sUrl;
oUrlLink.Save();
}
catch(e)
{
alert("当前IE安全级别不允许操作！请设置后在操作.");
}
}
function _search(g1)
{
	if(document.getElementById(g1).value=="" || document.getElementById(g1).value=="关键词不可以为空")
	{
		document.getElementById(g1).value="关键词不可以为空";
        document.getElementById(g1).focus();
	}
	else
	{
		window.location.href="/search.aspx?key="+escape(document.getElementById(g1).value);
	}
}
