function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// Functionen für die WBTs
var command;
var value;

var window_scaling_factor;

var PopUP;
var Glossary;

var popup_name;


//FSCommand für Debug-Zwecke only:
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function myFlash_DoFSCommand(command, value) {
  var myFlash = InternetExplorer ? myFlash : document.myFlash;


window.alert ("Kommando: " +command+ ", Wert: " +value);


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 myFlash_FSCommand(ByVal command, ByVal args)\n');
  document.write(' call myFlash_DoFSCommand(command, args)\n');
  document.write('end sub\n');
  document.write('</SCRIPT\> \n');
}
}

function los(url)
	{
	
var browser_name;
var browser_version;
browser_name=navigator.appName;
browser_version=navigator.appVersion;


if ((screen.height < 768) && (browser_name == "Netscape" && browser_version < "5" && browser_version >= "4"))
	{
	window.alert("This WEB based Training requires a screen resolution of at least 1024 x 768 pixel and does not work with Netscape 4.x!");
	}
else if (browser_name == "Netscape" && browser_version < "5" && browser_version >= "4")
	{
	window.alert("This WEB based Training does not work with Netscape 4.x. Please use a higher version!");
        }
else if (screen.width < 1024)
	{
	window.alert("This WEB based Training requires a screen resolution of at least 1024 x 768 pixel!");
	}
else
	{
	window.open(url, "WEB_based_Training", "width=920, height=690, left=0, top=0, status=no, toolbar=no, menubar=no, location=no, resizable=yes, titlebar=no, scrollbars=no, fullscreen=no");
	}
	}

function los_cd3(url)
	{
	
var browser_name;
var browser_version;
browser_name=navigator.appName;
browser_version=navigator.appVersion;


if ((screen.height < 768) && (browser_name == "Netscape" && browser_version < "5" && browser_version >= "4"))
	{
	window.alert("This WEB based Training requires a screen resolution of at least 1024 x 768 pixel and does not work with Netscape 4.x!");
	}
else if (browser_name == "Netscape" && browser_version < "5" && browser_version >= "4")
	{
	window.alert("This WEB based Training does not work with Netscape 4.x. Please use a higher version!");
        }
else if (screen.width < 1024)
	{
	window.alert("This WEB based Training requires a screen resolution of at least 1024 x 768 pixel!");
	}
else
	{
	window.open(url, "WEB_based_Training", "width=920, height=690, left=0, top=0, status=no, toolbar=no, menubar=no, location=no, resizable=yes, titlebar=no, scrollbars=no, fullscreen=no");
	}
	}

function win_Open(popup_name, window_scaling_factor)
	{

//	window.alert ("PopUP-Datei: " +popup_name+ ", Größenfaktor: " +window_scaling_factor);

var 	breiten_faktor;
var	hoehen_faktor;

if (screen.height >= 1200)
{
breiten_faktor = 0.4;
hoehen_faktor = 0.5;
}

else if (screen.height >= 1024)
{
breiten_faktor = 0.25;
hoehen_faktor = 0.85;
}

else if (screen.height >= 864)
{
breiten_faktor = 0.23;
hoehen_faktor = 0.9;
}

else if (screen.height >= 768)
{
breiten_faktor = 0.22;
hoehen_faktor = 1;
}

else if (screen.height >= 600)
{
breiten_faktor = 0.2;
hoehen_faktor = 1;
}

else
{
breiten_faktor = 0.19;
hoehen_faktor = 0.99;
}

/*
breiten_faktor = screen.width / 4654.545;
hoehen_faktor = 768 / screen.height;
*/

var	breite = Math.round(screen.width * breiten_faktor);
var	hoehe = Math.round(screen.height * window_scaling_factor * hoehen_faktor);

var	links = Math.round(screen.width - breite - 15);
var	oben = Math.round(screen.height - hoehe - 60);

//	window.alert("Breite: " + breite + " Höhe: " + hoehe + " Links: " + links + " Oben: " + oben + " Breitenfaktor : " + breiten_faktor + " Höhenfaktor : " + hoehen_faktor + " Screen_Width: " + screen.width);

	PopUP = window.open(popup_name,"pop_up","width="+breite+",height="+hoehe+",left="+links+",top="+oben+", resizable=yes, scrollbars=yes, toolbar=no, menubar=no, status=no, location=no, titlebar=yes, fullscreen=no");
	
//	PopUP.setTimeout('window.close()', 5000);
	
//	window.open(popup_name,"pop_up","width="+breite+",height="+hoehe+",left="+links+",top="+oben+", resizable=yes, scrollbars=yes, toolbar=no, menubar=no, status=no, location=no, titlebar=yes, fullscreen=no");

/*
        PopUP = window.open(popup_name,"pop_up","width="+breite+",height="+hoehe+",left="+links+",top="+oben+", resizable=yes, scrollbars=yes, toolbar=no, menubar=no, status=no, location=no, titlebar=yes, fullscreen=no");

  	PopUP.resizeTo(breite,hoehe);
  	PopUP.moveTo(links,oben);
*/
}

function open_glossar(url)
	{

var	breite = Math.round(screen.width * 0.7);
var	hoehe = Math.round(screen.height * 0.7);

var	links = 10;
var	oben = 30;


	
	 if ((Glossary == "") || (Glossary == null))
		{
//	        window.alert("Das Glossary kommt!");
		Glossary = window.open(url,"Glossary","width="+breite+",height="+hoehe+",left="+links+",top="+oben+", resizable=yes, scrollbars=yes, toolbar=no, menubar=no, status=no, location=no, titlebar=yes, fullscreen=no");
		Glossary.focus();
		}
		else
		{
//        	window.alert("Das Glossary war schon da!");
		Glossary.close();
		Glossary = window.open(url,"Glossary","width="+breite+",height="+hoehe+",left="+links+",top="+oben+", resizable=yes, scrollbars=yes, toolbar=no, menubar=no, status=no, location=no, titlebar=yes, fullscreen=no");
		}
		}

function ontop()
	{
	window.self.focus();
//	window.setTimeout("ontop()",250);
}

function close_PopUP()
{
 if ((PopUP == "") || (PopUP == null))
{
}
else
{
PopUP.close();
}
}

function close_both()
{
 if (! ((PopUP == "") || (PopUP == null)))
{
PopUP.close();
}
 if (! ((Glossary == "") || (Glossary == null)))
{
// window.alert("Das Glossary geht!");
Glossary.close();
}
else
{
}
}

function open_help(url)
	{

var	breite = Math.round(screen.width * 0.7);
var	hoehe = Math.round(screen.height * 0.7);

/*
var	links = Math.round(1 * (screen.width - breite));
var	oben = Math.round(1 * (screen.height - hoehe));
*/

var	links = 10;
var	oben = 30;

	Help = window.open(url,"Help","width="+breite+",height="+hoehe+",left="+links+",top="+oben+", resizable=yes, scrollbars=yes, toolbar=no, menubar=no, status=no, location=no, titlebar=yes, fullscreen=no");

	}


function time_out()
{
window.self.focus();
// setTimeout('window.alert("Achtung: Das Hilfe-Fenster schließt sich jetzt!")',180000);
setTimeout('window.close()',180001);
}
