        <div id="skipmodal" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
              <div class="modal-content">

                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                  <h4 class="modal-title" id="myModalLabel"><?php echo $a043;?></h4>
                </div>
                <div class="modal-body">
                	<p>Your waiting time elapsed. Now select next action.</p>
                </div>
					<div class="modal-footer">
						<!-- LEFT BUTTONS -->
						<button type="button" style="float:left" class="btn btn-default" onclick="continuewatching();">CONTINUE IN WATCHING</button>
						<!-- RIGHT BUTTONS -->
						<a href="javascript:document.frmvideo.submit();" class="btn btn-default" id="buttonv"> SKIP</a>
					</div>

              </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        
         <div id="banner modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
              <div class="modal-content">

                <div class="modal-header">
                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                  <h4 class="modal-title" id="myModalLabel"><?php echo $a043;?></h4>
                </div>
                <div class="modal-body">
                	<p>Your waiting time elapsed. Now select next action.</p>
                </div>
					<div class="modal-footer">
						<!-- LEFT BUTTONS -->
						<button type="button" style="float:left" class="btn btn-default" onclick="continuewatching();">CONTINUE IN WATCHING</button>
						<!-- RIGHT BUTTONS -->
						<a href="javascript:document.frmvideo.submit();" class="btn btn-default" id="buttonv"> SKIP</a>
					</div>

              </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->

<div id="cookiealert" style="visibility: hidden;position: fixed; width: 100%; bottom: 0px;" class="alert alert-info">
  <button type="button" class="close" data-dismiss="alert" onclick="hideMe()">×</button>
  <p>
    <strong>COOKIES POLICY:</strong> By using our website,  you agree that we may save cookies on your device. Cookies help to improve our service.
  </p>
</div>
  <!-- jQuery CDN and fallback -->
  <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
  <script>window.jQuery || document.write('<script src="data/templates/frontend/superhero/assets/js/jquery.js">\x3C/script>')</script>

  <!-- Main Scripts-->
  <script src="data/templates/shortend/superhero/assets/js/bootstrap.min.js"></script>
  <script src="data/templates/shortend/superhero/assets/js/plan.ui.js"></script>
  <!-- Bootstrap Select -->
  <script src="data/templates/shortend/superhero/assets/js/bootstrap-select.min.js"></script>

  <script src="system/general/components/jsoncookies/jquery.cookie.js"></script>
<script>
    function runOnLoad(){
        	if($.cookie('alert-box') == null) {
         	$.cookie('alert-box', 'closed', { expires: 7 });
         	document.getElementById("cookiealert").style.visibility = "visible";
        	} else if( $.cookie('alert-box') === 'closed' ){
				document.getElementById("cookiealert").style.visibility = "hidden";
			}
			 $(function(){ 
     			var navMain = $("#main-nav");

    			navMain.on("click", "a", null, function () {
        			navMain.collapse('hide');
    			 });
 });
 	var did = 0;
	var rotate = 0;
	
	}
var timecalculation = 0;
$('body').addClass('noscroll');
	function calctime()
		{	
			timecalculation = timecalculation + 1;
			<?php 
			if($LINK_adtype == 'interstitial'){
			?>
    		if (timecalculation < <?php echo $sa['intdur'];?>){
    			var wait = <?php echo $sa['intdur'];?> - timecalculation;
	  			document.getElementById('buttonint').innerHTML = 'Please wait ' + wait + 's';
  			}else{
  				var Continuea = document.getElementById("areav5");
  				Continuea.innerHTML = '<button onclick="javascript:document.frmvideo.submit();" id="buttonbanner" style="position: fixed; width: 30%; max-width: 30%; padding: 10px; top: 0px; left: 35%;" class="btn btn-success"><i class="fa fa-angle-double-right"></i> Continue</button>';
  				<?php
				if ($sa['autocontinue'] == '1') {
				?>
					document.frmvideo.submit();
					Continuea.innerHTML = '<button onclick="javascript:document.frmvideo.submit();" id="buttonbanner" style="position: fixed; width: 30%; max-width: 30%; padding: 10px; top: 0px; left: 35%;" class="btn btn-success"><i class="fa fa-angle-double-right"></i> Redirecting...</button>';
  				<?php
				}else {
				?>
					Continuea.innerHTML = '<button onclick="javascript:document.frmvideo.submit();" id="buttonbanner" style="position: fixed; width: 30%; max-width: 30%; padding: 10px; top: 0px; left: 35%;" class="btn btn-success"><i class="fa fa-angle-double-right"></i> Continue</button>';
				<?php
				}
				?>	
  			}
  			<?php 
  			}else if($LINK_adtype == 'banner'){
			?>
    		if (timecalculation < <?php echo $sa['bandur'];?>){
    			var wait = <?php echo $sa['bandur'];?> - timecalculation;
	  			document.getElementById('buttonbanner').innerHTML = 'Please wait ' + wait + 's';
  			}else{
  				var Continuea = document.getElementById("areav5");
  				Continuea.innerHTML = '<button onclick="javascript:document.frmvideo.submit();" id="buttonbanner" style="position: fixed; width: 30%; max-width: 30%; padding: 10px; top: 0px; left: 35%;" class="btn btn-success"><i class="fa fa-angle-double-right"></i> Continue</button>';
  				<?php				
  				if ($sa['autocontinue'] == '1') {
				?>
					document.frmvideo.submit();
					Continuea.innerHTML = '<button onclick="javascript:document.frmvideo.submit();" id="buttonbanner" style="position: fixed; width: 30%; max-width: 30%; padding: 10px; top: 0px; left: 35%;" class="btn btn-success"><i class="fa fa-angle-double-right"></i> Redirecting...</button>';
  				<?php
				}else {
				?>
					Continuea.innerHTML = '<button onclick="javascript:document.frmvideo.submit();" id="buttonbanner" style="position: fixed; width: 30%; max-width: 30%; padding: 10px; top: 0px; left: 35%;" class="btn btn-success"><i class="fa fa-angle-double-right"></i> Continue</button>';
				<?php
				}
				?>	
  			}
  			<?php 
  			}
			?>
		}
var t=setTimeout("calctime()",1000);
function ResizeBanner(){
   if (innerWidth > "950") {
   	document.getElementById("bannerimageid").setAttribute("style","position: fixed; width: " + innerWidth/2 + "px; height: " + innerWidth/16 + "px; padding: 10px; bottom: 0px; left: " + innerWidth/4 + "px;");
   }
   if (innerWidth < "951") {
   	document.getElementById("bannerimageid").setAttribute("style","position: fixed; width: " + innerWidth + "px; height: " + innerWidth/6 + "px; padding: 10px; bottom: 0px; left: 0%;");
   }
}

window.setInterval(function(){
  ResizeBanner();
}, 1000);

var loadednum = 0;
var textnumnow = 0;
function checkIframeLoaded() {
	loadednum = loadednum + 1;
	var loadedtxt = 1;
	if (loadednum > 2) {
		if(!$("#i_frame").contents().find("body").length) {
   		loadedtxt = 0;
		}
		if(!$("#i_frame").length) {
   	 	loadedtxt = 0;
		}
		if($("#i_frame").contents().find("body").html()==null) {
   	 	loadedtxt = 0;
		}
		if(loadedtxt == 0) {
   	 	document.getElementById("notloaded").setAttribute("style","background: none repeat scroll 0% 0% rgb(255, 255, 255); color: rgb(0, 0, 0); padding: 0px; padding-top: 40px; height: 100%; width: 100%;");
   	 	document.getElementById("i_frame").setAttribute("style","display: none;");
   	 	if (loadednum > 6) {
   	 		document.getElementById("loadtext").innerHTML = 'Advertisement could not be loaded, ad contains scripts that would to redirect you out from this window.';
			}else {
				document.getElementById("loadtext").innerHTML = '<i class="fa fa-circle-o-notch fa-spin"></i> Loading please wait...';
			}
		}else {
			document.getElementById("notloaded").setAttribute("style","display: none;");
			document.getElementById("i_frame").setAttribute("style","padding-top: 40px;");
			calctime();
		}	
	}else {
			document.getElementById("loadtext").innerHTML = '<i class="fa fa-circle-o-notch fa-spin"></i> Loading please wait...';
	}	
	var atime=setTimeout("checkIframeLoaded()",1000);
}
	</script>
</body></html>

