//#########################################
// coding 2005 Ralf H. Schuebel / www.ad1.de
// jegliche Aenderung am Quellcode dieses Dokumentes
// und seiner Bestandteile nur mit ausdrücklicher,
// schriftlicher Genehmigung.
//#########################################

if(top.frames.length > 0) top.location.href=self.location;

// ################################### //
USA=navigator.userAgent.toUpperCase();
ie4 = ((USA.indexOf("MSIE 4") > 0) || (USA.indexOf("MSIE 5") > 0)  || (USA.indexOf("MSIE 6") > 0) && (USA.indexOf("Opera") < 0)) ? 1 : 0
n4 = ((USA.indexOf("MOZILLA/4") >= 0) && (navigator.appName=="Netscape")) ? 1 : 0
n6 = (USA.indexOf("GECKO") > 0) ? 1 : 0
op = (navigator.userAgent.indexOf("OPERA") > 0) ? 1 : 0

nodom = 0;

dom = (document.getElementById) ? 1 : 0 ;
if(dom){
	ie4 = 0;
} else {
	nodom = 1;
}

// ################################### //

// ################################### //
function prep(pObj,pSrc){
	if(document.images){
		eval(pObj+' = new Image()')
		eval(pObj+'.src = "'+pSrc+'"')
	}
}

prep('vide10','../p/wm2006-o.gif')
prep('vide11','../p/wm2006-x.gif')

// ################################### //

gdly = 444 
sph = "<img src=\"../p/bl.gif\" width=\"1\" height=\"5\" alt=\"\">"
scah = screen.availHeight
scaw = screen.availWidth
go = 0
Xo = 0
Yo = 0
wid = 624
wid2 = 800 // w mm4
hioffs = 20
dbowmin = 888
wwi = 0
whi = 0
dboh = 0
agit = "x"
subk = 0
subcl = 0
Li = 0
Re = 0
Ob = 0
Un = 0
isover = 0

function wop(dok, we, ho, winame){
	li = (scaw-we)/4
	ob = (scah-ho)/4
	eval("window.open\(\""+dok+"\",\""+winame+"\",\"scrollbars=no,status=no,width="+we+",height="+ho+",left="+li+",top="+ob+"\"\)");
}

// ###################################### //

medir = "wm"

function mwop(dok){

var we = 240
var ho = 176
if(document.forms["mepl"].MeFo[0].checked) medir = "wm"
if(document.forms["mepl"].MeFo[1].checked) medir = "qt"
if(document.forms["mepl"].MeFo[2].checked) medir = "rm"
//	li = (scaw-we)/1.2
//	ob = (scah-ho)/2
	li = 228
	ob = 120
	eval("window.open\(\"../media/"+medir+"/"+dok+".html\",\"MP\",\"scrollbars=no,status=no,dependent=yes,width="+we+",height="+ho+",left="+li+",top="+ob+"\"\)");
}

// ###################################### //

function movx(mid,an){
	document.images["vide"+mid].src = eval("vide"+mid+an).src
}

// ######################################

var sag = "";

function ie4click(){
		if (ie4)	{
		void(sag);
		return false;
		}
}

function nclick(e){
		if(n4||n6)	{
			if (e.which==2||e.which==3){
				void(sag);
				return false;
			}
		}
}

if (n4) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=nclick;
} else {
	document.onmouseup=nclick;
	document.oncontextmenu=ie4click;
}
document.oncontextmenu=new Function("return false")

// ###################################### //

function hideA(){

if(dom){
 document.getElementById("aktuell").style.visibility = "hidden";
}

}

// ###################################### //

function showA(){

if(dom){
document.getElementById("aktuell").style.top = 33;
 document.getElementById("aktuell").style.visibility = "visible";
} else {
	alert("Diese Funktion ist bei Ihrem Browser leider nicht verfügbar.");
}

}

// ###################################### //

	
	var vacc = new Array(500, 64, 32, 12, 8, 6, 4, 3, 2, 1)
	vacc.reverse();
	var vpos = -600 // abgleichen mit Angabe in telo5.css
	ti = (vacc.length-1)

function SliDo(){
	// window.status = "jf: " + jf + " | cookie: " + document.cookie;	
	if(jf == 0){
		vpos = vpos+vacc[ti]
		if(ie4){
				eval("document.all.aktuell.style.top = vpos")
		}
		if(dom){
				eval("document.getElementById(\"aktuell\").style.top = vpos")
		}
		if(ti>0){
			eval("window.setTimeout(\"SliDo()\", 12)")
		} else {
			jf = 1;
		}
	
		ti = ti-1

	 	// window.status = vpos
	}
}

// ################################### //

var active_object = null;

// Position angeklicktes Objekt
var start_x = 0;
var start_y = 0;

// Aktuelle Position Mauszeiger
var mouse_x = 0;
var mouse_y = 0;


// Überwachung der Mausereignisse
function get_ready() {
  document.onmousemove = start_moving;
  document.onmouseup =   stop_moving;
}


// Bereitet Bewegung vor
function prepare_move(obj) {
  active_object = obj;
  start_x = mouse_x - active_object.offsetLeft;
  start_y = mouse_y - active_object.offsetTop;
}


// Beendet Bewegung
function stop_moving() {
  active_object=null;
}


// Wird bei Mausbewegung aktiviert und berechnet neue Pos Quadrat
function start_moving(event) {
  mouse_x = document.all ? window.event.clientX : event.pageX;
  mouse_y = document.all ? window.event.clientY : event.pageY;
  if(active_object != null) {
    active_object.style.left = (mouse_x - start_x) + "px";
    active_object.style.top = (mouse_y - start_y) + "px";
  }
}

// ################################### //

function goon(){
	void(null);
}
