//------------------------------------
	var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;

	function DHTML_init() {
	
	 if (window.opera) {
			OP = 1;
	 }
	 if(document.getElementById) {
		 DHTML = 1;
		 DOM = 1;
	 }
	 if(document.all && !OP) {
		 DHTML = 1;
		 MS = 1;
	 }
	if(document.layers && !OP) {
		 DHTML = 1;
		 NS = 1;
	 }
	}

	 
	 //------------------------------------
	 
	 function submitIt(formName, command, message){
	 	document.forms[formName].action = document.forms[formName].action+'?command='+command+'&message='+message;
        document.forms[formName].submit();
        return true;
	 }
	 
	 //------------------------------------
	 	
	 /**
	  *
	  */ 
	 function openPanelAbsolute(url, target, width, height, h_align){
		 var absolutePanel
	 	
	 	if(h_align == "right")
	 		left = screen.width-width;
	 	else
	 		left = 50;
	 		
	 	absolutePanel = window.open(url, target, 'width='+width+', height='+height+',left='+left+',top=30, location=no, menubar=no, resizable=yes, scrollbars=yes, toolbar=no');
	 	absolutePanel.focus();
	 }
	 
	 function openWindowAbsolute(url, target, width, height, h_align){
	 	var absoluteWindow
	 	
	 	if(h_align == "right")
	 		left = screen.width-width;
	 	else
	 		left = 50;
	 	absoluteWindow = window.open(url, target, 'width='+width+', height='+height+',left='+left+',top=30, location=yes, menubar=yes, resizable=yes, scrollbars=yes, toolbar=yes');
	 	absoluteWindow.focus();
	 }
	 
	 /**
	  * Opens a scrollable, rezizeable window without locationbar, menubar and toolbar. 
	  */
	 function openPanelNoBars(url, target, top, left, width, height){
	 	var panelW;
	 	panelW = window.open(url, target, 'width='+width+', height='+height+',left='+left+',top='+top+', location=no, menubar=no, toolbar=no, resizable=yes, scrollbars=yes');
	 	panelW.focus();
	 }
	 
	  /**
	   * Opens the standard help panel  
	   */
	 function openHelp(url){
	 	openPanelNoBars(url, 'help', 20, 20, 550, 350);
	 }
	 
	 /**
	  *
	  */
	 function openPanelRelative(url, target, percentageWidth, percentageHeight, h_align, v_align){
		 var relativeWindow
	 	
	 	width = screen.availWidth * (percentageWidth / 100);
	 	height = screen.availHeight * (percentageHeight / 100);
	 	switch(h_align){
	 		case "right": left = screen.availwidth - width; break;
	 		case "left": left = 0; break;
	 		default: left = 50;
	 	}
	 	switch(v_align){
	 		case "top": top = screen.availHeight - height; break;
	 		case "bottom": top = 0; break;
	 		default: top = 50;
	 	}
	 	// alert('target:'+target+'\naw:'+screen.availWidth+' ah:'+screen.availHeight+'\nw:'+width+' h:'+height)
 		
	 	relativeWindow = window.open(url, target, 'width='+width+', height='+height+',left='+left+',top='+top+', resizable=yes, scrollbars=yes');
	 	relativeWindow.focus();
	 }
	 
	 //--------------------------------------
	 function checkCookiesON(msg){
	 
	 	if(navigator.cookieEnabled == false){
       		alert("Cookies are disabled in your browser.\nPlease enable them!\n"+msg);
       	}else if(navigator.cookieEnabled  != true){
       		alert("Your browser might not support cookies.\nWe recomment using Firefox (http://www.mozilla.org) or IExplorer.\n"+msg);
       	}
	 }
	 
	 /**
	  * reloads the Menu-frame
	  */
	 function reloadMenu(){
	 	if(parent.Menu)
			parent.Menu.location.reload();
	 }
	 
	 
	DHTML_init();
