<!--  -->
var thisPage=""; // used for setArrow script             
var thisMember=""; // used for setPointer script   
var pgLoaded = 0;	
var IElpos=156;
var NSlpos=156;
function doOnStartUp() {
	pgLoaded = 1;
}
	
function setLoaded() {
	doOnStartUp();
}
      
// Announcement flash variables
var fCnt = 0; // flashCount
var fTimer; // flash timer
var fTime = 4000;
var fCycle;
var ffT = 0;
//

var objPrefix;
var showString;
var hideString;
var lastGroup = 'Main';
var timeCount = 8000;
var timerID = null;
var NS4 = navigator.appName == 'Netscape' && document.layers != null;
var IE4 = document.all != null;
var cando = NS4 || IE4;

if (NS4) {
        objPrefix = 'document.layers';
        showString = 'visible';
        hideString = 'hidden';
} else if (IE4) { // MSIE
        objPrefix = 'document.all';
        showString = 'visible';
        hideString = 'hidden';
}               

function dT(thisGroup) { // display topic
alert("hello")
        if ( ! cando ) { return; }
        hideTopic(lastGroup);
        lastGroup = thisGroup;
        // handle mainPix
        showObj(objPrefix + "[\'MainMask\']");
        // handle line items
        showObj(objPrefix + "[\'" + thisGroup + "Info\']");
        showObj(objPrefix + "[\'" + thisGroup + "Text\']");
}

function dT1() { // display topic
        if ( ! cando ) { return; }
        hideTopic(lastGroup);
}

function hideTopic(groupName) {
        // handle mainPix
        hideObj(objPrefix + "[\'MainMask\']");
        // handle line items
//      hideObj(objPrefix + "[\'" + groupName + "Lite\']");
        hideObj(objPrefix + "[\'" + groupName + "Info\']");
        hideObj(objPrefix + "[\'" + groupName + "Text\']");
}

function showObj(objString) {
        objName = eval(objString);
        if(objName) {
                if (NS4) objName.visibility = showString;
                else if (IE4) objName.style.visibility = showString;

                if (NS4) objName.left = NSlpos;
                else if (IE4) objName.style.left = IElpos;
        }
}

function showMM() {

        objString = objPrefix + "[\'" + "menu\']"
        objName = eval(objString);
                if (NS4) objName.left = 350;
                else if (IE4) objName.style.left = 350;

                if (NS4) objName.top = 15;
                else if (IE4) objName.style.top = 15;

                if (NS4) objName.visibility = showString;
                else if (IE4) objName.style.visibility = showString;
}

function hideObj(objString) {
        objName = eval(objString);
        if(objName) {
                if (NS4) objName.visibility = hideString;
                else if (IE4) objName.style.visibility = hideString;
        }
}

function sT() { // start timer
        if ( ! cando ) { return; }
        timerID = setTimeout("resetPage()",timeCount);
}

function resetPage() {
        hideTopic(lastGroup);
        lastGroup = "Main"
}

function hT() { // halt timer
        if ( ! cando ) { return; }
        if (timerID == null) {return; }
        clearTimeout(timerID);
        timerID = null;
}

function announceIt() { // highlights the announcement entries upon loading

        fCycle = fCnt % 4;
        switch(fCycle) {
        case 0:
                showObj(objPrefix + "[\'AnnText0\']");  
                if (ffT == 1) { // second time around
                        hideObj(objPrefix + "[\'AnnText3\']");
                }
                break;                  
        case 1:
                showObj(objPrefix + "[\'AnnText1\']");
                hideObj(objPrefix + "[\'AnnText0\']");
                break;
        case 2:
                showObj(objPrefix + "[\'AnnText2\']");
                hideObj(objPrefix + "[\'AnnText1\']");
                break;
        case 3:
                showObj(objPrefix + "[\'AnnText3\']");
                hideObj(objPrefix + "[\'AnnText2\']");
                ffT = 1;
                break;
        }

        fCnt++;
        
        if (fCnt <= 8) {        
        fTimer = setTimeout("announceIt()",fTime); 
        }

}

function loadIt() {showObj(objPrefix + "[\'" + "BanLt\']"); showObj(objPrefix + "[\'" + "BanRt\']"); }

loadIt();

function setLoaded() {
        doOnStartUp();
        announceIt(); 
}


function getCookieVal (offset) {
 var endstr = document.cookie.indexOf (";", offset)
 if (endstr == -1)
 endstr = document.cookie.length;
 return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
 var arg = name + "=";
 var alen = arg.length;
 var clen = document.cookie.length;
 var i = 0;
 while (i < clen) {
  var j = i + alen;
  if (document.cookie.substring(i, j) == arg)
  return getCookieVal (j);
  i = document.cookie.indexOf(" ", i) + 1;
  if (i == 0)
  break;
 }
 return null;
}

function DeleteCookie (name) {
 var exp = new Date();
 var cval = GetCookie (name);
 document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

function SetCookie (name, value, days) {
 expires = new Date();
 expires.setTime(expires.getTime()+ (24*60*60*1000*days) ); // 1 day
 document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString(); 
}

function SendDoc(){
var print=GetCookie ("elitprint");
//alert(print);
if (print=='Y')  
{
    document.location="vlitmenu.pl?tier=01&print=Y" 
}else if (print!='Y'){
    document.location="vlitmenu.pl?tier=01"; 
}else{
}           
//    document.location="elitmenu.pl?tier=01" 
}
