   function fncJrtrim(str) {
      var ctmp = new String(str);
      var i;
      i = ctmp.length;
      while( (i>=0) && ( !ctmp.charAt(i) ||(ctmp.charAt(i) == " ")) || (ctmp.charCodeAt(i) == 12288) || (ctmp.charCodeAt(i) == 160)) {
         i--;
      }
      if (i < 0)
         return ""
      else
         return ctmp.substr(0,i+1);
   }
    
   function fncJltrim(str) {
      var ctmp = new String(str);
      var ilen = 0;
      var i;
      i = 0;
      ilen = ctmp.length;
      while ( (i <= ilen) && ( !ctmp.charAt(i) || (ctmp.charAt(i) == " ")) || (ctmp.charCodeAt(i) == 12288) || (ctmp.charCodeAt(i) == 160)) { 
         i++;
      }
      if (i > ilen) 
         return ""
      else   
          return ctmp.substring(i,ilen);
   }
    
   function fncJtrim(str) {
       var ctmp = new String(str);
       ctmp = fncJrtrim(fncJltrim(ctmp));
       return ctmp;
   }
   
   function popUp(URL, imgWidth, imgHeight) {
	imgWidth = imgWidth + 15;
	imgHeight = imgHeight + 15;
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=' + imgWidth + ',height=' + imgHeight + ',left = 50,top = 50');");
	}