var a = new Array();
a[0]=new Image;
a[0].src='images/home.gif';
a[1]=new Image;
a[1].src="images/home_over.gif";

a[2]=new Image;
a[2].src='images/pdf_download.gif';
a[3]=new Image;
a[3].src="images/pdf_download_over.gif";

a[4]=new Image;
a[4].src='images/impressum.gif';
a[5]=new Image;
a[5].src="images/impressum_over.gif";

a[6]=new Image;
a[6].src='images/kontakt.gif';
a[7]=new Image;
a[7].src="images/kontakt_over.gif";

a[8]=new Image;
a[8].src='images/deutsch.gif';
a[9]=new Image;
a[9].src="images/deutsch_rot.gif";

a[10]=new Image;
a[10].src='images/english.gif';
a[11]=new Image;
a[11].src="images/english_rot.gif";

function roll(img, nb, text) {
	eval("img.src=a["+nb+"].src");
        document.getElementById('menu_text').firstChild.nodeValue = text;
}

var b = new Array();

b[0]=new Image;
b[0].src='images/feil_schwarz_links.gif';
b[1]=new Image;
b[1].src="images/feil_links.gif";

b[2]=new Image;
b[2].src='images/pdf_download.gif';
b[3]=new Image;
b[3].src="images/pdf_download_over.gif";

b[4]=new Image;
b[4].src='images/drucker.gif';
b[5]=new Image;
b[5].src="images/drucker_over.gif";

function roll_bottom(img, nb, text) {
	eval("img.src=b["+nb+"].src");
        document.getElementById('bottom_text').firstChild.nodeValue = text;
}

var FN = {
	height: '264px',
	width: '320px',
        top: '450px',
        left: '210px',
        posx: 0,
        posy: 0,
        dragx: 0,
        dragy: 0,
        cursor: '',
        dragobject: null,
	htmlText:'',
	display: function() {
		FN.container = document.createElement("div");
		FN.container.id = "movibox";
                FN.container.name = "movibox";
                FN.container.style.position = 'absolute';
		FN.container.style.height = FN.height;
		FN.container.style.width = FN.width;
                FN.container.style.top = FN.top;
                FN.container.style.left = FN.left;
                FN.container.style.zIndex = 200;
		FN.container.style.visibility = 'hidden';
		document.getElementsByTagName("body")[0].appendChild(FN.container);
                FN.draginit();
	},
	show: function(url) {
            FN.container.innerHTML = '<div onMouseDown="FN.dragstart();" style="background-image: url(images/grau_movie.gif); height:16px; padding-right:5px; padding-top:5px" align="right"><a href="javascript:FN.destroy()"><img src="images/close.gif" border="0"/></a></div><embed src="' + url + '" type="video/quicktime" width=320 height="295" autoplay="true" controls="true"></embed>'; 
	    FN.container.style.visibility = 'visible';
	},
        destroy: function() {
                FN.container.innerHTML = '';
                FN.container.style.visibility = 'hidden';
        },
        draginit: function () {
               // Initialisierung der Überwachung der Events
               FN.cursor = FN.container.style.cursor;
               document.onmousemove = FN.drag;
               document.onmouseup = FN.dragstop;
        },
        dragstart: function () {
               //Wird aufgerufen, wenn ein Objekt bewegt werden soll.
               FN.container.style.cursor = 'move';
               FN.dragobjekt = FN.container;
               FN.dragx = FN.posx - FN.dragobjekt.offsetLeft;
               FN.dragy = FN.posy - FN.dragobjekt.offsetTop;
        },
        dragstop: function () {
               //Wird aufgerufen, wenn ein Objekt nicht mehr bewegt werden soll.
               if (FN.posx >= FN.container.offsetLeft && FN.posy >= FN.container.offsetTop && FN.posx <= FN.container.offsetLeft + 321 && FN.posy <= FN.container.offsetTop + 17) {
                       FN.container.style.cursor = 'pointer';
                } else FN.container.style.cursor = FN.cursor;
               FN.dragobjekt=null;
        },
        drag: function (ereignis) {
                //Wird aufgerufen, wenn die Maus bewegt wird und bewegt bei Bedarf das Objekt.
                FN.posx = document.all ? window.event.clientX : ereignis.pageX;
                FN.posy = document.all ? window.event.clientY : ereignis.pageY;
                if(FN.dragobjekt != null) {
                      FN.dragobjekt.style.left = (FN.posx - FN.dragx) + "px";
                      FN.dragobjekt.style.top = (FN.posy - FN.dragy) + "px";
                } else {
                      if (FN.posx >= FN.container.offsetLeft && FN.posy >= FN.container.offsetTop && FN.posx <= FN.container.offsetLeft + 321 && FN.posy <= FN.container.offsetTop + 17) {
                             FN.container.style.cursor = 'pointer';
                      } else FN.container.style.cursor = FN.cursor;
                }
        }
}