var
AWP_VERSION_IE="5,2,0,60"
//,AWP_VERSION_NN=5.2
,AWP_OPEN_GLOSSARY_IN_IFRAME=0
,AWP_VERSION_NN=6
,AWP_ALTERNATE_DESIGN=0
//AWP_PARAMS sind Parameter, die an die URL vorgestellt werden.. wenn man also
//z.B. "debug=1" reinschreibt, ist bei jeder Lektion der Debugmodus aktiviert, ausser man gibt bei
//einer Lektion debug=0 an.
// audiodefault gibt den Wert an, falls das LMS sagt, der Content
// soll den Default-Wert nehmen. -1=off, [1-100] volume level.
//audioonlevel bestimmt den Wert den der Kurs zurückgeben soll--Es muss ein Wert zwiechen 1 und 100 sein(volume Level)!
,AWP_PARAMS="audiodefault=-1&width=800&height=600&forceapi=scorm12,hacp,nocookies&debug=1&ignorecmi=cmi.student_preference.language=de"
,AWP_LANGUAGE="de"

// AWarePlayerPluginURL gibt die Seite an, auf die weiter verwiesen wird, wenn der AuthorWare WebPlayer
// nicht erkannt wurde
,AWP_PluginURL="$LMDIR$jump.htm"
,AWP_PluginNURL="$LMDIR$jumpn.htm"
//,AWP_PostProxy="$LMDIR$postproxy.php"
,AWP_PostProxy=""
// wenn man die nächste Variable auf "true" setzt, wird der oben angeführten URL
// ein ?backurl=<aktuelle url> angefügt.
,AWP_AddBack=false

// noPlugin1 u. 2 legt die Meldung fest, die ausgegeben wird, wenn kein Plugin installiert ist.
// Dazwischen wird die AWarePlayerPluginURL eingefügt.
,AWP_NOPLUGIN=''
,AWP_WMODE = 'window'
,AWP_LOADING1=''
,AWP_LOADING2=''
,AWP_LOADING_HTML4=''
,AWP_LOADING_HTML3=''
,AWP_DOWNLOADFILE_RUN_HTML= ''
,AWP_DOWNLOADFILE_HTML= ''

,AWP_GLOSSARIES=[]
,AWP_MENU=[]
,AWP_BM_ENTRY_WA= ''
,AWP_BM_ENTRY= ''
,AWP_BM_WINDOW= ''
,AWP_DESIGN = "vista"
,AWP_BM_WINDOWPARAMS=""
// AWP Help-Datei
,AWP_HELP=AWP_ALTERNATE_DESIGN?"$LMDIR$Help/hilfe_small.htm":"$LMDIR$Help/hilfe_full.htm"
//,AWP_HELP="$LMDIR$Help/hilfe_small.htm"
// How to quit the window, Netscape 6 und Mozilla works only with setTimeout function
//,AWP_QUIT="window.parent.close()"

//////////////////////////////////////////////////////////////////////
//    this quit-param is for Content Launcher - ECDL4 Version       //
//																	//
//,AWP_QUIT="window.top.frames[1].setTimeout('ShowInfoTab()',100)"
//																	//
//////////////////////////////////////////////////////////////////////
,AWP_QUIT="setTimeout('window.parent.close()',10)"
//,AWP_QUIT="window.top.frames[1].setTimeout('ShowInfoTab()',100)"
//,AWP_QUIT="var tWnd=window;while(tWnd.parent!=null && tWnd.parent!=tWnd)tWnd=tWnd.parent;tWnd.close()"
//,AWP_QUIT="contentlauncher.close()"

//Main-Menus
AWP_MENU['nav']=[
 ["exit","=quit"]
,["audio","=audio_set"]
];

AWP_MENU['main']=[
 ["Hilfe","gEBDL.help()"]
,["Drucken","gEBDL.print()"]
,["Glossar","gEBDL.glossary()"]
];

//'main' Submenu
AWP_MENU['test']=[
 ["Eintrag1","alert('Eintrag1')"]
,["Eintrag2","alert('Eintrag2')"]
];

AWP_MENU['extras']=[
// ["glossar","=glossar"]
 ["lesezeichen setzen","=bookmark_page"]
,["lesezeichen verwalten","=bookmark_manage"]
,["lesezeichen drucken","CMIBookmarkWindow()"]
];

AWP_PATHS={};
AWP_PATHS["DESIGN"]="$(MMPLAYER)/../design/vista";
AWP_PATHS["PLAYER_CONTENT"]="$(MMPLAYER)/content/de/";
AWP_PATHS["PRELOADER_STRINGS"]="$(MMPLAYER)/preloader_strings.xml";
AWP_PATHS["DIALOG_FILE"]="$(MMPLAYER)/dialog.xml";
AWP_PATHS["PLAYER_CONTAINER"]="$(MMPLAYER)";

AWP_GLOSSARIES['default'] = '../content/de/glossary1.xml';

gEBDL = {
	 help: function(aParams) {
		var hilfefenster = window.open(AWP_PATHS["PLAYER_CONTENT"]+"hilfe.html","HELP","scrollbars=1,menubar=0,locationbar=0,personalbar=0,statusbar=0,width=300,height=300,x=200,y=100");
	}
	,glossary: function(aParams) {
		HOSTING_OBJECT.InvokeMethod("glossary","dummy",["dummy","dummy"],null,null);	//call a dummy function in glossary
		var glossarywindow = CMIShowGlossaryEntry();
	}
	,print: function(aParams) {
		//~ var printwindow = HOSTING_OBJECT.InvokeMethod("mmplayer_js","Print",[],null,null);
		var printwindow = window.print();
	}
	,confirm_exit: function(aParams) {
		HOSTING_OBJECT.InvokeMethod("glue", "Initialize", {
			 dialog_file : AWP_PATHS["DIALOG_FILE"]
			,component_path : AWP_PATHS["DESIGN"]
			,params : ["command","close"]
			,width : 230
			,height : 150
			,title : "Title"
			,template : "confirm_exit"
			,language : AWP_LANGUAGE
			,backgroundcolor : "#C0C0C0"
			,bordersize : 2
			,bordercolor : "#0000aa"
			,titleheight : 20
			,titlebackgroundcolor : "#0000aa"
			,titlefontcolor : "#FFFFFF"
			,titlefontface : "Arial"
			,titlefontsize : 10
			,closebuttonsize : 8
			,closebuttoncolor : "#C0C0C0"
		}, null, null)
	}
	,confirm_incomplete: function(aParams) {
		HOSTING_OBJECT.InvokeMethod("glue","Initialize",{
			 dialog_file : AWP_PATHS["DIALOG_FILE"]
			,component_path : AWP_PATHS["DESIGN"]
			,params : ["scoid",aParams["SCOID"],"force",1]
			,width : 230
			,height : 150
			,title : "Title"
			,template : "confirm_incomplete"
			,language : AWP_LANGUAGE
			,backgroundcolor : "#C0C0C0"
			,bordersize : 2
			,bordercolor : "#0000aa"
			,titleheight : 20
			,titlebackgroundcolor : "#0000aa"
			,titlefontcolor : "#FFFFFF"
			,titlefontface : "Arial"
			,titlefontsize : 10
			,closebuttonsize : 8
			,closebuttoncolor : "#C0C0C0"
			},null,null)
	}
	,show_menu:function(aParams) {
		ELEMENTS['menu'].disabled = false;
		SetScreenLayout('');
		HOSTING_OBJECT.InvokeMethod("menu.menu","show",aParams,this, this.hide_menu);
	}
	,hide_menu:function() {
		ELEMENTS['menu'].disabled = true;
		SetScreenLayout('');
	}
	,confirm_abort: function(aParams) {
		HOSTING_OBJECT.InvokeMethod("glue","Initialize",{
			 dialog_file : AWP_PATHS["DIALOG_FILE"]
			,component_path : AWP_PATHS["DESIGN"]
			,params : ["scoid",aParams["SCOID"],"force",1]
			,width : 230
			,height : 150
			,title : "Title"
			,template : "confirm_abort"
			,language : AWP_LANGUAGE
			,backgroundcolor : "#C0C0C0"
			,bordersize : 2
			,bordercolor : "#0000aa"
			,titleheight : 20
			,titlebackgroundcolor : "#0000aa"
			,titlefontcolor : "#FFFFFF"
			,titlefontface : "Arial"
			,titlefontsize : 10
			,closebuttonsize : 8
			,closebuttoncolor : "#C0C0C0"
			},null,null)
	}
}
MakeCallable("ebdl", gEBDL, "");

