if (document.images)
{
	aktuelles = new Image; aktuelles.src = "/images/aktuelles.gif";
	services = new Image; services.src = "/images/services.gif";
	loesungen = new Image; loesungen.src = "/images/loesungen.gif";
	unternehmen = new Image; unternehmen.src = "/images/unternehmen.gif";
}

/* Function that swaps images. */

function di20(id, newSrc) {
    var theImage = FWFindImage(document, id, 0);
    if (theImage) {
        theImage.src = newSrc;
    }
}

/* Functions that track and set toggle group button states. */

function FWFindImage(doc, name, j) {
    var theImage = false;
    if (doc.images) {
        theImage = doc.images[name];
    }
    if (theImage) {
        return theImage;
    }
    if (doc.layers) {
        for (j = 0; j < doc.layers.length; j++) {
            theImage = FWFindImage(doc.layers[j].document, name, 0);
            if (theImage) {
                return (theImage);
            }
        }
    }
    return (false);
}

function openPopUp(url, title, width, height)
{
	if (width > screen.width) width = screen.width -20;
	if (height > screen.height) height = screen.height -20;

	var x = Math.floor(screen.width / 2) - Math.floor(width /2);
	var y = Math.floor(screen.height / 2) - Math.floor(height /2);

	var desc = 'location=no,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no,top=' + String(y) + ',left=' + String(x) + ',height=' + String(height) + ',width=' + String(width);
	var wind = window.open(url, title, desc);
	wind.focus();
}

function OpenWindow_off()
{
	var name = 'Imwin' + Math.round(Math.random() * 1000);
	var myWindow = window.open('',name,'statusbar=no,resizable=yes,scrollbars=yes,screenX=0,screenY=0,status=0,width=404,height=340');
	myWindow.document.open();
	myWindow.document.write("<html>    <head><title>LYNET Kommunikation Webcam");
	myWindow.document.write("</title></head><body bgcolor='#ffffff'><CENTER>");
	myWindow.document.write("<p><FONT FACE='Verdana,Helvetica,Arial'><b>Webcam vor&uuml;bergehend deaktiviert</b></font></p>");
	myWindow.document.write("</CENTER></body></html>");
	myWindow.document.close();
	myWindow.focus();
}

function OpenWindow()
{
	var name = 'Imwin' + Math.round(Math.random() * 1000);
	if ((navigator.appName == "Microsoft Internet Explorer")&&   (navigator.platform != "MacPPC")&&(navigator.platform != "Mac68k"))
	{
		bname = navigator.appName;
		bver = parseInt(navigator.appVersion);
		if (bname == "Microsoft Internet Explorer" && bver < 4)
		{
			alert("You need at least Internet Explorer 4.0     to run this feature!")
		}
		else
		{
			var myWindow = window.open('',name,'statusbar=no,resizable=yes,scrollbars=yes,screenX=0,screenY=0,status=0,width=404,height=340');
			myWindow.document.open();
			myWindow.document.write("<html>    <head><title>LYNET Kommunikation Webcam");
			myWindow.document.write("</title>    </head><body bgcolor='#ffffff'><CENTER>");
			myWindow.document.write('<OBJECT ID="CamImage" WIDTH=352 HEIGHT=288 ');
			myWindow.document.write('CLASSID=CLSID:917623D1-D8E5-11D2-BE8B-00104B06BDE3    CODEBASE="http://pic.lynet.de/activex/AxisCamControl.ocx#Version=1,0,1,25">');
			myWindow.document.write('<PARAM     NAME="URL" VALUE="http://pic.lynet.de/cgi-bin/fullsize.srvpushb"></OBJECT>');
		}
	}
	else
	{
		var myWindow = window.open('',name,'statusbar=no,resizable=yes,scrollbars=yes,screenX=0,screenY=0,status=0,width=369,height=305');
		myWindow.document.open();
		myWindow.document.write("<html><head><title>LYNET Kommunikation Webcam</title></head><body bgcolor='#ffffff'><CENTER>");
		myWindow.document.write('<IMG SRC="http://pic.lynet.de/cgi-bin/fullsize.srvpushb?dxi=1007463921" WIDTH="352" HEIGHT="288">');
	}
	myWindow.document.write("</CENTER></body></html>");
	myWindow.document.close();
	myWindow.focus();
}

function openPopupmatrix(src)
{
  param = 'width=760,height=410,innerHeight=410,innerWidth=760,status=no,menubar=no,locationbar=no,toolbar=no';
  window.open(src,'matrix',param);
}