     
     
function MM_openBrWindow(theURL, winName, features) { //v2.0
   window.open( theURL, winName, features );
  }
     
function checkLen(name_inFrm, maxLen, name_PrnLen, name_Frm, use_dom )  {
   var in_frm=document.forms[name_Frm];
   str = in_frm[name_inFrm].value;
   len = str.length;
   if ( len > maxLen) in_frm[name_inFrm].value = str.substring(0,maxLen);
   if ( typeof(use_dom) == 'undefined' ) {in_frm[name_PrnLen].value = (maxLen - in_frm[name_inFrm].value.length); }
   else { document.getElementById(name_PrnLen).innerHTML= ( maxLen - in_frm[name_inFrm].value.length ); }
  }
      
function checkEmail(email)  {  if(email == "") return true; 
   atPos = email.indexOf("@"); 
    if(atPos == -1) { return false; } domain = email.substring(atPos+1, email.length-1);
    if(domain.indexOf(".") == -1) { return false; }
    return true;
}
      
function showProperties(obj, objName)   {
   var result = "The properties for the " + objName + " object:" + "\n\n";
   for (var i in obj) {result += i + " = " + obj[i] + " ";}
   return result;
  }


function feedback_popup_window( www, win_name, win_features ) {
   if ( typeof(www) != 'undefined' ) { this.config('www', www ); }
   if ( typeof(win_features) != 'undefined' ) { this.config('win_features', win_features);} else {
     var features ="width=200, height=200, top=20, left=50, "
                         + "status=0, middle=1, copyhistory=0, directories=no, menubar=0, location=0, resizable=0, scrollbars=0, ";
     this.config('win_features', features );
    }
   if ( typeof(win_name) != 'undefined' ) { this.config( 'win_name', win_name ); }  else { this.config( 'win_name', 'popup_window' ); }
     
  };
      
feedback_popup_window.prototype.config = function ( config_key, config_value )  {
   if ( typeof(config_key) != undefined && typeof(config_value) != undefined )  {
     this[config_key]=config_value;
    }
  };
      
feedback_popup_window.prototype.open = function ( uri ) {
   var win_href = ( typeof(uri) != 'undefined' )?this.www+"&"+uri:this.www;
   MM_openBrWindow( win_href, this.win_name, this.win_features );
   return false;
  };
      

