function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}



var sLastMenu = '';
var sLastSub = '';
var iTOMenu = 0;
var iMenuOpen=0;
var strLeftMenu='';
var strLeftTopMenu='';
var strToolTip='';

isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;

function HiLiteSimple(imgName,imgNo) { 
	/*if(document.images){
		document.images[imgName].src = eval(imgNo+'.src');
	}*/
}

function HiLite(elm,navLevel,blnShow) { 
	if (blnShow) {
		elm.className = "hilite";
	} else {
		elm.className = "lolite";
	}
};

function setCloseMenu()
{
	if (iMenuOpen==0)
	{
		iTOMenu = this.setTimeout('HideAllMenu()',500);
	}
	else
	{
		this.clearTimeout(iTOMenu);
	}
}

function checkCloseMenu()
{
	this.setTimeout('setCloseMenu()',500);
}

function HideAllMenu(){
	HideLayers(sLastMenu);
	sLastMenu = '';
};

function ShowMenu(){
	var args;
	args = ShowMenu.arguments;
	if (sLastMenu == ''){ // no menu activ,  show current
		ShowHideLayers(args[0]);
		sLastMenu = args[0];
	}else{							// close previous and open new
		if (sLastMenu == args[0]){ //just close the current
			if (args.length > 1)
			{return(true);}
			//HideAllMenu();
			//ShowHideLayers(args[0]);
			sLastMenu = args[0];					// set none aktive
		}else{											// close last, open activ, close subs
			HideAllMenu();
			ShowHideLayers(args[0],sLastMenu);
			sLastMenu = args[0];
			sLastSub = '';
		}
	}
};

function ShowHideLayers() { 
var i, visStr, args, theObj;
args = ShowHideLayers.arguments;
	for (i=0; i<args.length; i++) { //one arg
	    visStr = '';
	    if (document.getElementById) {
		  	theObj = eval('document.getElementById(\'' + args[i] + '\')');
			if (theObj)
			{
				if (theObj.style.display == 'block')
				{visStr = 'none';}
				else if (theObj.style.display == 'none')
				{visStr = 'block';}
				else 
				{visStr = 'none';}
				theObj.style.display = visStr;
			}
	  	}
	}
};

function HideLayers() { 

  	var i, visStr, args, theObj;
 	args = HideLayers.arguments;
  	for (i=0; i<args.length; i++) { //one arg
	    visStr = '';
	    if (document.getElementById) {
			theObj = eval('document.getElementById("' + args[i] + '")');
				if (theObj)
				{
				visStr = 'none';
				theObj.style.display = 'none';
				}
	  	}
	}
	sLastSub = '';
};



function ShowSubMenu(iMenuOpenValue,sMenuName){
	iMenuOpen=iMenuOpenValue;
	ShowMenu(sMenuName);
	if(iMenuOpen==0){
		checkCloseMenu();
	}
};



function NewWin(sURL,sWinName,sProp){
var check = window.open(sURL,sWinName,sProp);
};



function showhideLayerTooltip(strLN,intType){
var displayType='';
	if (isNS6) {//NS6
		if(intType==0){
			displayType='hidden';
		}else{
			displayType='visible';
		}
		document.getElementByID(strLN).style.visibility=displayType;
	}else if (isNS4) { //NS4
		if(intType==0){
			displayType='hide';
		}else{
			displayType='show';
		}
		document.layers[strLN].visibility=displayType;
	}else if (isIE4 || isIE5) { //IE
		if(intType==0){
			displayType='hidden';
		}else{
			displayType='visible';
		}
		document.all[strLN].style.visibility=displayType;
	}
};



function makeNullNumber(intNumber){
var strNumberTMP='';	
	if(parseInt(intNumber)<10){
		strNumberTMP='0' + intNumber;
	}else{
		strNumberTMP=intNumber;
	}
	return strNumberTMP;
};



function createToolTip(intToolTipLeft,intToolTipTop,intToolTipWidth,intToolTipHeight,strToolTipText){
	if (isNS6) {
		strToolTip +='<div id="tooltip1" style="position:absolute; left:' + intToolTipLeft + '; top:' + intToolTipTop + '; width:' + (parseInt(intToolTipWidth)+10) + '; height:' + intToolTipHeight + '; z-index:5; visibility: hidden; overflow: hidden; background-color: transparent;">';
	}else if (isNS4) {
		strToolTip += '<layer id="tooltip1" left="' + intToolTipLeft + '" top="' + (parseInt(intToolTipTop)-100) + '" width="' + (parseInt(intToolTipWidth)+10) + '" height="' + intToolTipHeight + '" z-index="5" visibility="hide">';
	} else if (isIE4 || isIE5) {
		strToolTip += '<div id="tooltip1" style="position:absolute; left:' + intToolTipLeft + '; top:' + intToolTipTop + '; width:' + (parseInt(intToolTipWidth)+10) + '; height:' + intToolTipHeight + '; z-index:5; visibility: hidden; overflow: hidden; background-color: transparent;">';
	}
	
	strToolTip+='<table width="' + intToolTipWidth + '" border="0" cellspacing="0" cellpadding="1">\n';
	strToolTip+='<tr>\n<td align="left" valign="top" class="tblbordertooltip">\n';
	strToolTip+='<table width="' + intToolTipWidth + '" border="0" cellspacing="0" cellpadding="2">\n';
	strToolTip+='<tr>\n<td align="left" valign="top" class="tbltooltip">' + strToolTipText + '</td>\n';
	strToolTip+='</tr>\n</table>\n';
	strToolTip+='</td>\n</tr>\n</table>';
	if (isNS6) {
		strToolTip += '</div>\n';
	}else if (isNS4) {
		strToolTip += '</layer>\n'
	} else if (isIE4 || isIE5) {
		strToolTip += '</div>\n';
	}
};



function showhideLayerTooltip(strLN,intStatus){
var strVisibility;	 
	 if (navigator.appName == 'Netscape' && document.layers != null) {
	 	if(intStatus==1){
			strVisibility='show';
		}else{
			strVisibility='hide';
		}
		document.layers[strLN].visibility=strVisibility;
	 }else if (document.all != null) { //IE
		if(intStatus==1){
			strVisibility='visible';
		}else{
			strVisibility='hidden';
		}
		document.all[strLN].style.visibility=strVisibility;
	}
};
		function openPopupPresse(strUrl, intWidth, intHeight) {
			winWidth = String(parseInt(intWidth));
			winHeight = String(parseInt(intHeight));
			var presse_popup = window.open(strUrl, "popup1", "width=" + intWidth + ",height=" + intHeight + ",top=" + (screen.availHeight - intHeight) / 2 + ",left=" + (screen.availWidth - intWidth) / 2);
			var resizeWidth = parseInt(intWidth + 10);
			var resizeHeight = parseInt(intHeight + 29);
			presse_popup.resizeTo(resizeWidth, resizeHeight);
			presse_popup.focus();
		}