function SetFocus() {
  if (document.forms.length > 0) {
    var field = document.forms[0];
    for (i=0; i<field.length; i++) {
      if ( (field.elements[i].type != "image") &&
           (field.elements[i].type != "hidden") &&
           (field.elements[i].type != "reset") &&
           (field.elements[i].type != "submit") ) {

        document.forms[0].elements[i].focus();

        if ( (field.elements[i].type == "text") ||
             (field.elements[i].type == "password") )
          document.forms[0].elements[i].select();

        break;
      }
    }
  }
}

function rowOverEffect(object,alt) {
  if( alt != '') {
	  var alternate = ' '+alt;
  } else {
	  var alternate = '';
  }  
  
  if (object.className == 'dataTableRow'+alternate) object.className = 'dataTableRowOver';
}

function rowOutEffect(object,alt) {
  if( alt != '') {
	  var alternate = ' '+alt;
  } else {
	  var alternate = '';
  }    
  
  if (object.className == 'dataTableRowOver') object.className = 'dataTableRow'+' '+alt;
}

function openAction(w,h,url){
  var setpos=0;

  if (w == 0) { 
    setpos=1;
    w = 720;
    if (w>screen.width - 50) { w=600; }
  }
  
  if (h == 0) {
    h=795;
    if (h > screen.height - 50) { h=600; }
  }

  var params;
  if (setpos) {
    param = "toolbar=0,location=0,directories=0,status=0,menubar=0,personnal=no,scrollbars=1,resizable=1,copyhistory=1,left=10,top=10,width=" + w + ",height=" + h;
  }
  else {
    param = "toolbar=0,location=0,directories=0,status=0,menubar=0,personnal=no,scrollbars=1,resizable=1,copyhistory=1,width=" + w + ",height=" + h;
  }

  var thetime = new Date();
  var nowtime = thetime.getTime();
  var winName = 'open' + nowtime;
  var actionWin = window.open(url,winName, param);
  //var actionWin = window.open(url, 'openAction', param);
  actionWin.focus();
}

