var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Verarbeiten aller FSCommand-Meldungen in einem Flash-Film
function katalog_DoFSCommand(command, args) {
	var katalogObj = isInternetExplorer ? document.all.katalog : document.katalog;
	//ist aus kompatibilätsgründen kein fscommand mehr, sondern getUrl
	if (command == "zoom") {
	    //Hier das Javascript rein um den Zoomlayer zu aktivieren
	    var myFrame	= document.getElementById('zoomframe');
	    //alert(args);
        var parameter = args.split(",");
        //alert(parameter);
        var src = "zoom.php?laufendeNr="+parameter[0]+"&width="+parameter[1]+"&height="+parameter[2]+"&x="+parameter[3]+"&y="+parameter[4];
        myFrame.src=src;
		switchZoom();
    } 
}

// Hook für Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub katalog_FSCommand(ByVal command, ByVal args)\n');
	document.write('Call katalog_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// Overview
function showOverview(param) {
	// this.location.href='overview.php?rubrik='+param;
	if (myOView.style.display == 'none'  || myOView.style.display == '' ) {
		myOFrame.src= param;
		myOView.style.display = 'block';
		myOFrame.style.display = 'block';
		myKat.style.top = '-550px';
	}
}


function CreateControl(DIVID, CLSID, OBJID, NAME, WIDTH, HEIGHT, URL, SCALE, WMODE, BGCOLOR, SWLIVE, SCRIPTACCESS ) {
	  var d = document.getElementById(DIVID);
	  d.innerHTML = '<object classid=' + CLSID + ' id=' + OBJID + ' name=' + NAME +	' width=' + WIDTH + ' height=' + HEIGHT  +'><param name="URL" value=' + URL + '><param name="SCALE" value=' + SCALE + '><param name="WMODE" value=' + WMODE + '><param name="SRC" value=' + URL + '><embed src=' + URL + '	width= ' + WIDTH + ' height=' + HEIGHT + '	hspace=0 vspace=0 quality=high type=application/x-shockwave-flash name=' + NAME + ' scale=' + SCALE + ' wmode=' + WMODE + ' bgcolor=' + BGCOLOR + ' swliveconnect=' + SWLIVE + ' allowscriptaccess=' + SCRIPTACCESS + '></embed>';
}

function showHelp(theURL,winName,features) {
  window.open('inc/hilfe/index.php?id=netcathelplight', 'hilfe', 'width=725,height=750,scrollbars=auto');
}

function switchZoom() {
	if (myZoom.style.display == 'none'  || myZoom.style.display == '' ) {
		myZoom.style.display = 'block';
		myFrame.style.display = 'block';
		myKat.style.top = '-550px';
	} else {
		myKat.style.top = '0px';
		myZoom.style.display = 'none';
		myFrame.style.display = 'none';
		myFrame.src = 'blank.html';
	}
}

function exitZoom() {
		myKat.style.top = '0px';
		myZoom.style.display = 'none';
		myFrame.style.display = 'none';
		myFrame.src = 'blank.html';
		myOView.style.display = 'none';
		myOFrame.style.display = 'none';
		myOFrame.src = 'blank.html';
}

function init() {
	myKat		= document.getElementById('katcontainer');
	myZoom		= document.getElementById('zoomdiv');
	myFrame		= document.getElementById('zoomframe');
	myOView		= document.getElementById('viewdiv');
	myOFrame	= document.getElementById('viewframe');
}

window.onload = init;

