"use strict";

// will not be obfuscated
var TTAPI;

function Continue_01() {
	// Don't remove this function! It can be overwritten in player configs!
}

onload = function () {
	TTAPI = findAPI(parent);
	if (typeof TTAPI === "undefined") {
		return false;
	}

	g_objCrossBrowserModel.AddEventListener(document, "contextmenu", g_objCrossBrowserModel.EventPreventDefault);

	var objInfo = document.getElementById("ttwpdlgexitinfo2");

	if (objInfo) {
		objInfo.innerHTML = TTAPI.objTextpool.heap["cbtcontrol"]["ttweDialogEndClientText"]._text;
	}
	objInfo = document.getElementById("ttwpdlgexitinfo1");
	if (objInfo) {
		objInfo.innerHTML = TTAPI.objTextpool.heap["static_texts"]["modularCloseInfo1"]._text;
	}

	// Custom-JS laden?
	var sJSFile = TTAPI.GetProperty("addexitjs1");
	if (sJSFile) {
		TTAPI.objCrossBrowserModel.LoadJavaScriptFile(TTAPI.GetPathByProperty("addexitjs1") + sJSFile, window);
	}

	// load customized css file?
	var sExitCSS = TTAPI.GetProperty("addexitcss1");
	if (sExitCSS) {
		TTAPI.objCrossBrowserModel.LoadCSSFile(TTAPI.GetPathByProperty("addexitcss1") + sExitCSS, window, Continue_01);
	}
	else {
		Continue_01();
	}
	return true;
};
