function $(e){
	return document.getElementById(e);
}

String.prototype.trim=function(){
	return this.replace(/\s+$|^\s+/g, '');
}

function CBrowser()
{    
	var sAgent = navigator.userAgent.toLowerCase();
	this.isIE = (sAgent.indexOf('msie') != -1);
	this.isFF = (sAgent.indexOf('firefox') != -1);
	this.isSa = (sAgent.indexOf('safari') != -1);
	this.isOp = (sAgent.indexOf('opera') != -1);
	this.isNS = (sAgent.indexOf('netscape') != -1);
}

function removeHtml(str){
	if(typeof(str)=='string'){ 
		str = str.replace(/<[^>]*>/g, '');
		str = removeBlank(str);
	}
	return(str);
}

function removeBlank(str){
	str = str.replace(/[\t\n\r]+/g, ' ');
	str = str.replace(/\s(\s)+/g, ' ');
	return(str);
}

function findString(str, start, ended){
	var num = -1;
	if(start!=""){
		num = str.toLowerCase().indexOf(start.toLowerCase());
		if(num<0) return('');
		str = str.substr(num + start.length);
	}
	if(ended!=""){
		num = str.toLowerCase().indexOf(ended.toLowerCase());
		if(num<0) return('');
		str = str.substr(0, num);
	}
	return(str);
}