
function bCheck() {
	var ver=navigator.appVersion;
	var agent=navigator.userAgent;
	var dom=document.getElementById?1:0;
	var opera5=agent.indexOf("Opera 5")>-1;
	var ie5=(ver.indexOf("MSIE 5")>-1 && dom && !opera5)?1:0;
	var ie6=(ver.indexOf("MSIE 6")>-1 && dom && !opera5)?1:0;
	var ie7=(ver.indexOf("MSIE 7")>-1 && dom && !opera5)?1:0;
	var ie4=(document.all && !dom && !opera5)?1:0;
	var ie=(ver.indexOf("MSIE ")>-1 && dom && !opera5)?1:0;
	var mac=agent.indexOf("Mac")>-1;
	var ns6=(dom && parseInt(ver) >= 5) ?1:0; 
	var ns4=(document.layers && !dom)?1:0;
	
	var bw=(ie && !mac);
	if (!bw) {
		//alert('This website is best viewed with MS Windows IE 5.5 and higher.');
	}

}


function showBusy(){
	if (typeof(Page_ClientValidate) != 'function' ||  Page_ClientValidate()){
		document.getElementById('pageDiv').style.visibility='hidden';
		document.getElementById('footer').style.visibility='hidden';
		document.getElementById('witVlak').style.visibility='hidden';
		document.getElementById('busy').style.display='block';
	}
}
function openPage(p){
	document.location=p;
	//document.location='http:\/\/'+p;
}
function memberOver(m){
	m.className = 'memberButtonOn';
}
function memberOff(m){
	m.className = 'memberButton';
}
function initPage(){
	//document.getElementById('pageDiv').style.height = document.body.clientHeight-240;
	setFooter();
}
var undefined;
function confirmDelete(btn){
	if(confirm(btn.value+'?')){ 
		var d = document.getElementById('___Delete');
		if(d!=undefined){
			d.value=btn.id;
		}
		
		return true
	};
	return false;
}
function setFooter() {
    if (document.getElementById) {
        var windowHeight = getWindowHeight();
        if (windowHeight > 0) {
            DEFAULTCONTENTHEIGHT = document.getElementById('pageDiv').offsetHeight;
            var footerElement = document.getElementById('footer');
            var footerHeight = footerElement.offsetHeight;
			var witVlak=document.getElementById('witVlak');
            footerElement.style.position = 'absolute';
            if (windowHeight - (DEFAULTCONTENTHEIGHT+footerHeight+14) >= 0) {
                footerElement.style.top = (windowHeight - footerHeight -5) + 'px'; 
				witVlak.style.height=(windowHeight-footerHeight)+'px';
            }
            else {
                footerElement.style.top = (DEFAULTCONTENTHEIGHT+8 ) + 'px'; 
				witVlak.style.height=windowHeight+'px';
			}
        }
    }
}
function getWindowHeight() {
    var windowHeight = 0;
    if (typeof(window.innerHeight) == 'number') {
        windowHeight = window.innerHeight;
    } 
    else {
        if (document.documentElement && document.documentElement.clientHeight) {
            windowHeight = document.documentElement.clientHeight;
        } 
        else {
            if (document.body && document.body.clientHeight) {
                windowHeight = document.body.clientHeight;
            }
        }
    }
    return windowHeight;
}

var DEFAULTCONTENTHEIGHT = 0;

