function go(mainAction, subAction, command) {
	document.formMain.mainAction.value=mainAction;
	document.formMain.subAction.value=subAction;
	document.formMain.command.value=command;
        if(document.formMain.onsubmit && !document.formMain.onsubmit()) return;
	document.formMain.submit();
	return true;
}
function changeEncoding(mainAction, subaction, command) {
        encodingSelect = document.formMain.encodingSelect;
        document.formMain.encoding.value=encodingSelect.options[encodingSelect.selectedIndex].value;
        go(mainAction, subaction, command);
}
var w = 480, h = 340;
if (document.all || document.layers) {
   w = screen.availWidth;
   h = screen.availHeight;
}
var popW = 400, popH = 50;
var leftPos = (w-popW)/2, topPos = ((h-popH)/2)-80;
function show_popup(message) {
  var oPopup = window.createPopup();
  var oPopupBody = oPopup.document.body;
  oPopupBody.style.backgroundColor = "lightyellow";
  oPopupBody.style.border = "solid black 1px";
  oPopupBody.style.fontFamily = "Arial AM";
  oPopupBody.innerHTML = message;
  oPopup.show(leftPos, topPos, popW, popH, document.body);
}

function showMessage(objForm, text, enc) {
  	a = window.open("","","toolbar=0, resizable=1, scrollbars=1, width=400, height=100");

      a.document.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=" + enc + "'>" +
      "<link rel='stylesheet' href='styles/main_" + enc + ".css' type='text/css'>" +
      "<link rel='stylesheet' href='styles/aux4all.css' type='text/css'>" +
      "<title>Error</title></head><body><H4>" + text + "</H4></body></html>");
}
