- Сообщений: 955
- Спасибо получено: 138
Это форк Vinaora Nivo Slider, пришлось переименовать, в силу требования JED. Даже старую версию качать можно было только с варезных сайтов, нашпигованную троянами. Зачем оно такое, согласитесь.
<?php
$session = JFactory::getSession();
$first = $session->get('first', 1);
if ($first){
?>
<style type="text/css">
html{
overflow:hidden;
}
#flash_preview{
position:absolute;
z-index:10000;
width:100%;
background:#fff;
}
#flash_previewwrap{
position:absolute;
top:0;
left:0;
width:100%;
z-index:9999;
background:#fff;
}
#close{
position:absolute;
display:block;
width:200px;
height:50px;
line-height:50px;
top:20px;
z-index:11000;
cursor:pointer;
color:#fff;
font-family:Verdana;
background:transparent;
font-size:18px;
}
</style>
<script type="text/javascript">
window.addEvent('domready', function() {
setTimeout(closeblock, 14000);
resizeflash();
window.onresize= resizeflash;
});
function resizeflash()
{
var elwrap = document.getElementById('flash_previewwrap');
var elclose = document.getElementById('close');
var el = document.getElementById('flash_preview');
var w = getClientWidth();
var h = getClientHeight();
var w = getClientWidth();
var fl = document.getElementById('fl');
fl.setAttribute("width", w);
fl.setAttribute("height", h);
elclose.style.left = (w-elclose.clientWidth)/2+'px';
elwrap.style.left = '0px';
el.style.left = '0px';
elwrap.style.width = w+'px';
elwrap.style.height = h+'px';
el.style.width = w+'px';
el.style.height = h+'px';
}
function getClientHeight()
{
return document.compatMode=='CSS1Compat' ? (document.documentElement.clientHeight):document.body.clientHeight;
}
function getClientWidth()
{
return document.compatMode=='CSS1Compat' ? document.documentElement.clientWidth:document.body.clientWidth;
}
function closeblock()
{
var b = document.getElementsByTagName('html');
b[0].style.overflow = 'auto';
var elwrap = document.getElementById('flash_previewwrap');
elwrap.style.display = 'none';
}
</script>
<?php
}
?>
<?php
if ($first){
?>
<div id="flash_previewwrap">
<img src="flash/logo.png" id="close" onclick="closeblock();" />
<a href="#" id="close" onclick="closeblock();">Пропустить заставку</a>
<div id="flash_preview">
<object id="fl" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" height="100" width="100"><param name="wmode" value="opaque" /><param name="quality" value="high" /><param name="movie" value="flash/start.swf" /><embed wmode="opaque" height="100%" pluginspage="http://www.macromedia.com/go/getflashplayer" quality="high" src="flash/start.swf" type="application/x-shockwave-flash" width="100%"></embed></object>
</div></div>
<script type="text/javascript">
var elwrap = document.getElementById('flash_preview');
var el = document.getElementById('flash_preview');
var w = getClientWidth();
var h = getClientHeight();
elwrap.style.width = w+'px';
elwrap.style.height = h+'px';
el.style.width = w+'px';
el.style.height = h+'px';
</script>
<?php
}
if ($first){
$session->set('first', 0);
}
?>
<?php
$session = JFactory::getSession();
$first = $session->get('first', 1);
if ($first){
?>
<img src="flash/logo.png" id="close" onclick="closeblock();" />
<a href="#" id="close" onclick="closeblock();">Пропустить заставку</a>
<script type="text/javascript">
window.addEvent('domready', function() {
setTimeout(closeblock, 10000);
resizeflash();
window.onresize= resizeflash;
});
setTimeout("closeblock()", 10000);
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.