function doPopup(URL, WIDTH, HEIGHT) {
	url = URL;
	width = WIDTH;  // width of window in pixels
	height = HEIGHT; // height of window in pixels
	windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + "toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=no," + "resizable=no,";
	preview = document.open(URL, "_blank", windowprops);
}


function OpenVideo(videofile) {
	video = 'flash/flvplayer.swf?file=http://developer2002.lomtec.com/kpas/flash/' + videofile + '&autostart=true';
	windowprops = "left=150,top=150,width=320,height=260,toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars=no," + "resizable=no,";

	preview = document.open(video, "_blank", windowprops);

}


function doPopup2(URL, WIDTH, HEIGHT, SCROLLBARS) {
	url = URL;
	width = WIDTH;  // width of window in pixels
	height = HEIGHT; // height of window in pixels
	windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT + "toolbar=no," + "location=no," + "directories=no," + "status=no," + "menubar=no," + "scrollbars="+SCROLLBARS+"," + "resizable=no,";
	preview = document.open(URL, "_blank", windowprops);
}

function submenuShow(element){
     el = element+"-container";
     document.getElementById(el).className = "submenu-container-on";
     el = element+"-link";
     document.getElementById(el).className = "menu-topItem-on";
}

function submenuHide(element){
     el = element+"-container";
     document.getElementById(el).className = "submenu-container-off";
     el = element+"-link";
     document.getElementById(el).className = "menu-topItem-off";
}


function sublevelShow(element){
     el = document.getElementById(element);
     el.className = "ln-level-on";
}

function sublevelHide(item,no){
     el = document.getElementById("item"+item+"-"+no);
     el.className = "ln-level-off";
}

function checkEnter(e){ //e is event object passed from function invocation
     var characterCode; //literal character code will be stored in this variable

     if(e && e.which){ //if which property of event object is supported (NN4)
          e = e;
          characterCode = e.which; //character code is contained in NN4's which property
     }

     else{
          e = event;
          characterCode = e.keyCode; //character code is contained in IE's keyCode property
     }

     if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
          document.forms[0].submit(); //submit the form
          return false;
     }

     else{
          return true;
     }

}
