function setlang( lang ) {
  if (document.all["Message"].style.visibility != "visible") {
    document.forms["main"].elements["lang"].value=lang;
    document.forms["main"].submit();
  }
}

function DoSubmit(act) {
  document.all["Message"].style.visibility = "visible";
  document.all["MainTable"].style.visibility = "hidden";
  
  document.forms[0].action="classsearch.php?action="+act;
  document.forms[0].submit();
}

function ata( s ) {
  if (_active != null)
  {
	with (_active) {
      focus();
	  value += s;
	  focus();
    }
  }
}

function show()
{
	PRR=window.open("/mktp9/help/help.htm","wndPrint","alwaysRaised=yes,top=0,left=0,height=600,width=740,menubar=no,toolbar=no,resizable=no,status=no,scrollbars=yes");
	PRR.focus(); 
}

function clf(idx) {
  with (document.forms[0].elements["qe"+idx]) {
    focus();
    value="";
 }
}

var _active = null, _accessed = "x";

function ma(edt,idx) {
  _active = edt;
  r = new RegExp("x"+idx+"x", "");
  if (_accessed.search(r) == -1) {
    _accessed += idx+"x";
  }
}

function clrall() {
  for (i = 0; i < ff.length; i++)
    if (ff.elements[i].type == "text")
      ff.elements[i].value="";
}

function goto( page ) {
	if ( ( document.getElementById('newpos') != null ) && ( document.getElementById('newpos').value != 0 ) )
		page = document.getElementById('newpos').value;

	document.forms[0].action += "&PageID="+page;
	document.forms[0].submit();
};

function JumpTo(page, direct) {
	var x = Number(document.forms[0].elements["newpos"].value);
	n = 1;
	if ( direct == "back" ) n = page - x;		
	else
	if ( direct == "fwd" ) n = page + x;		
	else
	if ( direct == "to" ) n = x;

	//document.forms[0].action = "search.php?action=gotopage&page="+n;
	document.forms[0].action += "&PageID="+x;
    document.forms[0].submit();
}


