var URL,smh;
URLs=new Array('bilexa-ag.com','www.bilexa-ag.com','192.168.0.9/bilexa-ag.com','www.creapower.com/bilexa','bilexa.at','www.bilexa.at','bilexa.ch','www.bilexa.ch');
Startdatei='index.php';
Sprache='de';
for(i=0;i<URLs.length;i++) {if(location.href.indexOf(URLs[i])>-1) {URL='http://'+URLs[i]+'/'}}

function initMain(n1,n2,n3,n4) {
	fokusSM();
	document.onclick=fokusSM;
	if(top.location.href.indexOf(URL)<0||top.location.href==location.href) {
		top.location.replace(URL+Startdatei+'?'+top.location.href);
	} else {initMain1(n1,n2,n3,n4)}
}
function initMain1(n1,n2,n3,n4) {
	if(top.frames.nav1) {
		f1=top.frames.nav1;
		if(f1.L0==1) {f1.kX(n1,n2,n3,n4);return}
	}
	setTimeout('initMain1('+n1+','+n2+','+n3+','+n4+')',20);
}
/*
function initNav0(tNav) {
	fokusSM();
	document.onclick=fokusSM;
	if(top.location.href.indexOf(URL)<0||top.location.href==location.href) {
		top.location.replace(URL+Startdatei+'?'+top.location.href);
		return;
	}
	if(top.frames.nav1) {
		f1=top.frames.nav1;
		if(f1.L0==1) {f1.k0(tNav);return}
	}
	setTimeout('initNav0()',20);
}
*/
function elem(v) {return document.getElementById(v)}
function imgsrc(n,l) {return document.getElementsByName(n)[0]}
function obj(o) {return elem(o).style}
function bgC(o,c) {obj(o).backgroundColor=c}
function zeige(o,si) {v=obj(o);if(si==1) {v.visibility='visible'} else {v.visibility='hidden'}}
function fokusSM() {if(SM()) top.frames.termine.Fen.focus()}
function SM() {
	if(top.frames.termine) {
		f=top.frames.termine.Fen;
		if(typeof f=='object') {if(!f.closed) return true}
	}
	return false;
}
function bildgross(bild,text,w,h) {
	maxB=screen.width-40;
	maxH=screen.height-100;
	scr='';
	if(w>maxB) {w=maxB;scr=',scrollbars=yes'}
	if(h>maxH) {h=maxH;scr=',scrollbars=yes'}
	if(pp()) {
		popup_close();
		setTimeout('bildgross("'+bild+'","'+text+'","'+w+'","'+h+'")',20);
	} else {
		eval('popup_handle=window.open("'+URL+'/'+Sprache+'/bildgross.php?Bild='+bild+'&Text='+text+'","bildgross","width='+w+',height='+h+',left=20,top=20'+scr+'")');
	}
}
function openInfo(file) {
	if(pp()) {
		popup_close();
		setTimeout('openInfo("'+file+'")',20);
	} else {
		popup_handle=window.open(file,'info','width=450,height=450,left=20,top=20,scrollbars=yes');
	}
}
function popup_close() {if(pp()) {if(!eval('top.frames.inhalt.popup_handle.closed')) {eval('top.frames.inhalt.popup_handle.close()')}}}
function pp() {
	if(typeof top.frames.inhalt=='object') {
		if(typeof top.frames.inhalt.popup_handle=='object') {
			if(top.frames.inhalt.popup_handle.closed) {return false} else {return true}
		}
	} else {return false}
}
function hM(t1,t2,t3) {location.href='mai'+'lto:'+t1+String.fromCharCode(64)+t2+'.'+t3}
