function popup(url,width,height){
    nw = window.open(url,"newwindow","width="+width+",height="+height+",status=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,location=0");
    nw.focus();
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}


function isNumeric(sText)

{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
}

function replaceAll(text, strA, strB)
{
   	 while ( text.indexOf(strA) != -1)
   	 {
   	     text = text.replace(strA,strB);
   	 }
  	 return text;
}

function stripHTML(string){
	var re= /<\S[^><]*>/g
	return string.replace(re, "")
}

function popUp(url,w,h){
	if (!w) w = 800;
	if (!h) h = 600;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	var win=window.open(url,'preview','location=yes,menubars=yes,scrollbars=yes,resizable=yes,width='+w+',height='+h+',top='+wint+',left='+winl+'');
	win.window.focus();
}