﻿String.prototype.Trim = function()   
{   
    return this.replace(/(^\s*)|(\s*$)/g, "");   
}     
String.prototype.LTrim = function()   
{   
    return this.replace(/(^\s*)/g, "");   
}   
String.prototype.RTrim = function()   
{   
    return this.replace(/(\s*$)/g, "");   
}  
function checkDString(str)
{
	if (str.indexOf('&')>-1 || str.indexOf('+')>-1 || 
		str.indexOf('\"')>-1 || str.indexOf('#')>-1 ||
		str.indexOf('=')>-1 || str.indexOf('%')>-1 ||
		str.indexOf('<')>-1 || str.indexOf('>')>-1 || str.indexOf('\'')>-1) 
    {
		return false;
	}
	return true;
}
function IsNumber(str)
{
    if (isNaN(str) == true)
    {
        return false
    }
    else
    {
        return true;
    }
}

    function favorite(title,url) { //添加到收藏夹
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}



