<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>Admira</title>
		<meta http-equiv="cache-control" content="max-age=0" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<meta http-equiv="expires" content="Thu, 01 Jan 1970 00:00:00 GMT" />
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
		<script>
			var EMERGENCY_TIMER = 0;
			EMERGENCY_TIMER = setTimeout(function(){
				location.reload(true);
			},45000);
		</script>
		<script>
	    var LOADED_WITH_MISSING_SCRIPTS = false;
	    var total_scripts = 0;
	    var loaded_scripts = 0;
	    var error_scripts = 0;
	    var repaired_scripts = 0;

	    function load_backup_script(error_file){
	      try{
	        var backup_script = document.createElement('script');
	        console.log("Replacing script : "+error_file);
	        error_file = error_file.replace("app/","app_backup/");
	        console.log("With script : "+error_file);
	        backup_script.setAttribute('src', error_file);
	        backup_script.setAttribute('onload', function(){repaired_scripts++;});
	        document.getElementsByTagName('head')[0].appendChild(backup_script);
	      }catch(e){
	        console.log("Failed to repair script : "+error_file);
	      }
	    }
	  </script>

        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova/2.7.0/cordova.webos.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/configuration.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/deviceInfo.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/inputSource.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/power.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/signage.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/sound.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/storage.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/cordova-cd/1.5/video.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" type="text/javascript" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webos_scap/custom.js"></script>

        <!-- LIBRARIES -->
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/webOS.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/moment.min.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/jquery-2.1.4.min.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/jquery.swfobject.1-1-1.min.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/sha.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/jszip.min.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/jszip-utils.min.js"></script>
				<script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/underscore-min.js"></script>
				<script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/lib/socket.io-1.4.5.js"></script>
				<!--[if IE]>
        <script type="text/javascript" src="app/lib/jszip-utils-ie.min.js"></script>
        <![endif]-->


        <!-- PLAYER -->
        <link rel="stylesheet" type="text/css" href="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/style/player.css">
				<link rel="preload" href="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/style/logo.svg" as="image">

        <!-- DATA ELEMENTS -->
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/elements/ConfigElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/elements/ContentElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/elements/TemplateElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/elements/BlockElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/elements/StatsElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/elements/ConditionsElement.js"></script>


        <!-- CONNECTORS -->
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/connectors/ApiConnector.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/connectors/ApiContentConnector.js"></script>
				<script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/connectors/SocketConnector.js"></script>

        <!-- CONTROLLERS -->
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/SystemController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/KeyboardController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/UserInterfaceController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/OperatingSystems/WebOsSystemController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/OnScreenAlertController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/SynchronizerController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/PlayerController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/XMLDataReader.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/DataManagerController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/DisplayController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/PlaylistController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/TimelineController.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/controllers/ConditionalController.js"></script>

        <!-- DISPLAY ELEMENTS -->
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayTemplate.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayContentElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayImageElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayWebElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayWebUrlElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayVideoElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayFlashElement.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/display_elements/DisplayBlock.js"></script>

        <!-- SERVICES -->
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/BasicService.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/RegisterService.js"></script>
				<script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/ScreenService.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/FileManagerService.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/TransferService.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/ManagerService.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/StatisticService.js"></script>
				<script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/TimerService.js"></script>
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/services/ConditionalService.js"></script>


        <!-- MAIN APP-->
        <script onload="loaded_scripts++;" onerror="error_scripts++;load_backup_script(this.getAttribute('src'));" src="/media/cryptofs/apps/usr/palm/services/com.lg.app.signage.webos/app/main_webos_ext.js"></script>
				<script>
		      TOTAL_SCRIPTS = loaded_scripts + error_scripts;
		      console.log("Total Scripts : "+TOTAL_SCRIPTS);
		      console.log("Loaded Script -> "+loaded_scripts+"/"+TOTAL_SCRIPTS);
		      if((loaded_scripts+repaired_scripts) >= TOTAL_SCRIPTS){
		        console.log("Repaired scripts : "+repaired_scripts);
		        console.log("Total scripts loaded ... "+(loaded_scripts+repaired_scripts)+"/"+TOTAL_SCRIPTS);
		      }else{
		        console.log("Missing scripts ... try to reload page in 25s");
		        LOADED_WITH_MISSING_SCRIPTS = true;
		      }
		    </script>


	</head>
	<body>
        <div id="starter" style="position:absolute;left:0px;top:0px;background-color:#4a7221;color:white;z-index:102;width:100%;">WebOS 3++ -- System is starting ... please wait.</div>
        <div id="playerLog" class="log" style="z-index:104;position:absolute;top:0px;left:0px;width:50% !important;height:100%;display:none"></div>
        <div id="transferLog" class="log" style="z-index:100;position:absolute;top:0px;left:50% !important;width:50% !important;height:100%;display:none"></div>
        <!--<div id='HDMIScreen' style="position:absolute;left:0px;top:0px;z-index:103;width:100%;"></div>-->
    </body>
</html>
