var TransparencySetting = true;
function ResetTransparency() { var Block = document.getElementById("NetminSites"); var F1 = function() { Block.style.opacity = "0.3"; Block.style.filter = "alpha(opacity=30)"; }; var F2 = function() { Block.style.opacity = "0.4"; Block.style.filter = "alpha(opacity=40)"; }; var F3 = function() { Block.style.opacity = "0.5"; Block.style.filter = "alpha(opacity=50)"; }; var F4 = function() { Block.style.opacity = "0.6"; Block.style.filter = "alpha(opacity=60)"; }; var F5 = function() { Block.style.opacity = "0.7"; Block.style.filter = "alpha(opacity=70)"; }; var F6 = function() { Block.style.opacity = "0.8"; Block.style.filter = "alpha(opacity=80)"; }; var F7 = function() { Block.style.opacity = "0.9"; Block.style.filter = "alpha(opacity=90)"; }; var F8 = function() { Block.style.opacity = "1"; Block.style.filter = "alpha(opacity=100)"; }; setTimeout(F1,60); setTimeout(F2,120); setTimeout(F3,180); setTimeout(F4,240); setTimeout(F5,300); setTimeout(F6,360); setTimeout(F7,420); setTimeout(F8,480); }
function ChangeHeight(Block,NewHeight,Max) { Block.style.height = NewHeight+"px"; if (Max > 0) { if (NewHeight <= Max) { var NewTimeout = function() { ChangeHeight(Block,NewHeight+4,Max); }; setTimeout(NewTimeout,15); if (NewHeight > parseInt(Max-180) && TransparencySetting == true) { ResetTransparency(); TransparencySetting = false; } } } }
function HideSitesBar() { var Block = document.getElementById("NetminSites"); ChangeHeight(Block,0,0); Block.style.display = "none"; Block.style.opacity = "0.2"; Block.style.filter = "alpha(opacity=20)"; }
function ShowSitesBar() { var Block = document.getElementById("NetminSites"); Block.style.height = "0px"; Block.style.display = "block"; TransparencySetting = true; ChangeHeight(Block,4,Aukstis); }
function CheckSitesBar() { var Block = document.getElementById("NetminSites"); var CurrentState = Block.style.display; if (CurrentState == "none") { ShowSitesBar(); } else { HideSitesBar(); } }
function HotKejus(evt) { evt = (evt) ? evt : ((event) ? event : null); if (evt) { if (evt.keyCode == 27) { HideSitesBar(); } } }
function ShowSlogan() { var StartSec = 2000; var Block = document.getElementById("NetasSlogan"); var F1 = function() { Block.style.height = "2px"; }; var F2 = function() { Block.style.height = "4px"; }; var F3 = function() { Block.style.height = "6px"; }; var F4 = function() { Block.style.height = "8px"; }; var F5 = function() { Block.style.height = "10px"; }; var F6 = function() { Block.style.height = "12px"; }; var F7 = function() { Block.style.height = "14px"; }; var F8 = function() { Block.style.height = "16px"; }; var F9 = function() { Block.style.height = "18px"; }; var F10 = function() { Block.style.height = "20px"; }; var F11 = function() { Block.style.height = "22px"; }; var F12 = function() { Block.style.height = "24px"; }; setTimeout(F1,StartSec); setTimeout(F2,StartSec+60); setTimeout(F3,StartSec+120); setTimeout(F4,StartSec+180); setTimeout(F5,StartSec+240); setTimeout(F6,StartSec+300); setTimeout(F7,StartSec+360); setTimeout(F8,StartSec+420); setTimeout(F9,StartSec+480); setTimeout(F10,StartSec+540); setTimeout(F11,StartSec+600); setTimeout(F12,StartSec+660); }
document.onkeypress = HotKejus;
