// JavaScript Document
String.prototype.is_email=function(){
   return (/^[\w-\.]+\@[\w\.-]+\.[a-z]{2,4}$/.test(this));	
}

String.prototype.is_empty=function(){
   return (this.search(/\S/)==-1)?true:false;	
}

String.prototype.url_title=function(){
   str=this.replace(/[^a-zA-Z0-9\s]+/g,'');		   
   str=str.replace(/\s+/g,'-');
   str=str.replace(/<\/?[^>]+(>|$)/g,'');
   str_arr=str.split("-");
   cln_arr=[];
   for(i=0;i<str_arr.length;i++){
		if(!str_arr[i].is_empty()){
			cln_arr.push(str_arr[i]);
		}
   }
   return cln_arr.join("-").toLowerCase();	
}

String.prototype.is_int=function(){
   return (/\d+$/.test(this));	
}
