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(window.netscape && window.screen && !DOM && !OP){DHTML=1;NS=1;}
}

function oID(ID){
	if(DOM){if(typeof document.getElementById(ID)=='object')return(document.getElementById(ID)); else return(void(0));
	}else if(MS){if(typeof document.all[ID]=='object')return(document.all[ID]);else return(void(0));
	}else if(NS){if(typeof document[ID]=='object')return(document[ID]);else return(void(0));}
}
function oName(p2){
	if(DOM){if(typeof document.getElementsByName(p2)=="object")return(document.getElementsByName(p2)[0]);	else return(void(0));
	}else if(MS){if(typeof document[p2]=="object")return(document[p2]);	else return(void(0));
	}else if(NS){if(typeof document[p2]=="object")return(document[p2]);	else return(void(0));}
}
DHTML_init();

var oWin=new oWIN();
var curMenu="";
var curSMenu="";
var oldSMenu="";

function hide(ID){
	oID(ID).style.visibility="hidden";
}
function show(ID){
	oID(ID).style.visibility="visible";
}
function hideD(ID){
	oID(ID).style.display="none";
}
function showD(ID){
	oID(ID).style.display="block";
}
function hideIF(Name){
	oID(Name).style.visibility="hidden";
}
function showIF(Name){
	oID(Name).style.visibility="visible";
}
function LoadIFrame(mytarget,file){
	oID(mytarget).src=file;
}
function move_abs(ID,left,top){
	oID(ID).style.left=left+'px';
	oID(ID).style.top=top+'px';
}

function move_absIF(ID,left,top){
	oID(ID).style.left=left+'px';
	oID(ID).style.top=top+'px';
}
function IMGsrc(ID,Img){
	oID(ID).src="";
	oID(ID).src=Img;
}

oWin=new oWIN();
var onLoadDone=false;



function iFrameRepose(){
	oWin.init();
}

function init(){
	iFrameRepose()
}
function myLoad(){
	window.setTimeout('showImpressum()',2000);
}
function showImpressum(){
	oID('Impressum').style.visibility='visible';
}
function ShowHMenu(){
	if(oID('ULSMenu_{$curMMenu}'))showD('ULSMenu_{$curMMenu}');
	showD('MMenu');
}

function Load(me,which){
	me.blur();
	hideD('divBackground');
	hideD('divContent');
	aWhich=which.split('_');
	oldMMenu=curMMenu;
	curMMenu=aWhich[0];
	oldSMenu=curSMenu;
	if(aWhich.length > 1){
		curSMenu=aWhich[1];
	}else{curSMenu=''}
	if(oldMMenu != ''){
		MMenuOut(oID('a_'+oldMMenu),oldMMenu);
		if(oID('ULSMenu_'+oldMMenu))hideD('ULSMenu_'+oldMMenu)
		if(oldSMenu != ''){
			SMenuOut(oID('a_'+oldMMenu+'_'+oldSMenu),oldMMenu+'_'+oldSMenu);
		}
	}
	if(oID('ULSMenu_'+curMMenu))showD('ULSMenu_'+curMMenu);
}

function MMenuOver(Which,Name){
window.defaultStatus=curMMenu+' '+Name;
	if((curMMenu!=Name)){
		oID('a_'+Name).style.color='#FFFFFF';
	}
}
function MMenuOut(Which,Name){
	if(Name!='Home'){
		if(curMMenu==Name){
			oID('a_'+Name).style.color='#FFFFFF';
		}else{
			oID('a_'+Name).style.color='BEBEB4';
		}
	}
}

function SMenuOver(Which,Name){
	if(curMMenu+'_'+curSMenu!=Name){
		oID('a_'+Name).style.color='#CC6633';
	}
}
function SMenuOut(Which,Name){
	if(curMMenu+'_'+curSMenu==Name){
		oID('a_'+Name).style.color='#CC6633';
	}else{
		oID('a_'+Name).style.color='#000000';
	}
}

window.onresize=iFrameRepose


function myOnload(){
	oID('divContent').style.overflow=myOverflow;
}


var curArch='';

function openArch(Edition){
	if(curArch == Edition){
		location.href=ArchLink
	}else{
		if(curArch != ''){
			hideD('div_'+curArch);
			oID('img_'+curArch).src='nav/ArrRight.gif'
		}
		curArch=Edition;
		showD('div_'+Edition);
		oID('img_'+Edition).src='nav/ArrDown.gif'
	}
	iFrameRepose()
}



function oWIN(){
	this.BodyName='Index';
	this.Width=0;
	this.Height=0;
	this.init=_oWIN_init;
	this.setName=_oWIN_SetName;
	this.resize2min=_oWIN_resize2min;
}
function _oWIN_SetName(BodyName){
	this.BodyName=BodyName;
}
function _oWIN_init(){
	if((document.all)&& (OP==0)){
		this.Width=oID(this.BodyName).offsetWidth;
		this.Height=oID(this.BodyName).offsetHeight;
	}else{
		this.Width=window.innerWidth;
		this.Height=window.innerHeight;
	}
	if(typeof this.Width=="string")this.Width=parseInt(this.Width);
	if(typeof this.Height=="string")this.Height=parseInt(this.Height);
}

function _oWIN_resize2min(minWidth,minHeight){
	if(this.Width < minWidth){
		window.resizeBy(minWidth-this.Width,0);
	}
	if(this.Height < minHeight){
		window.resizeBy(0,minHeight-this.Height);
	}
	this.init();
}

function mlncdm(maddress,mdomain){
	mailaddr=maddress+"@"+mdomain;
	location.href="mailto:"+mailaddr.replace(/ /g,".");
}
function mlncd(maddress,mdomain,what){
	mailaddr=maddress+"@"+mdomain;
	return mailaddr.replace(/ /g,".");
}

