// <!--
// Browser identification
var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_ns    = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') ==-1));
var is_ns4up = (is_ns && (is_major >= 4));
var is_ie    = (agt.indexOf("msie") != -1);
var is_ie4up = (is_ie  && (is_major >= 4));
var is_docom = (document.getElementById);
var is_nn6   = (!document.all && document.getElementById);
if (is_ie) {
        is_docom = 0;
}
if (is_docom) {
        is_ns    = 0;
        is_ns4up = 0;
}

// PopUp Menus...
var LAYER = 0;
var lastMenu = false;
var timeOut = 1000;
var timeoutId = false;

//NS4 = (document.layers) ? 1 : 0;
//IE = (document.all) ? 1 : 0;
NS = (is_ns4up) ? 1 : 0;
IE = (is_ie4up) ? 1 : 0;
DC = (is_docom) ? 1 : 0;
NN6 = (is_nn6)  ? 1 : 0;
LAYER = (NS || IE || DC || NN6) ? 1 : 0;

if (IE || NN6) {
  SHOW = "visible";
  HIDE = "hidden";
} else if (NS || DC) {
  SHOW = "show";
  HIDE = "hide";
}


// Floating menu
function createLayers(menuName,topPos) {
        if (LAYER) {
         	if (NS) {
 			screenWidth = window.innerWidth;
        		document.layers[menuName].left = 165;
                        document.layers[menuName].top  = topPos;
                } else if (DC || NN6) {
                        screenWidth = window.innerWidth;
                        document.getElementById(menuName).style.left = 165;
 			document.getElementById(menuName).style.top  = topPos;
        	} else if (IE) {
          		//topPos = topPos + 15;
                       	screenWidth = document.body.clientWidth + 18;
          		document.all[menuName].style.pixelLeft = 165;
          		document.all[menuName].style.pixelTop  = topPos;
           	}
        }
}



function kick(menuName,status,topPos) {
        if (LAYER) {
                if (status) {
                        createLayers(menuName,topPos);
                        if (NS) {
                                document.layers[menuName].visibility = SHOW;
                	} else if (DC || NN6) {
                   		document.getElementById(menuName).style.visibility = SHOW;
                  	} else if (IE) {
                      		document.all[menuName].style.visibility = SHOW;
                	}
                } else {
 			if (NS) {
                                document.layers[menuName].visibility = HIDE;
			} else if (DC || NN6) {
                		document.getElementById(menuName).style.visibility = HIDE;
                        } else if (IE) {
                    		document.all[menuName].style.visibility = HIDE;
         	        }
 		}
        }
}





function popUp(menuName,show,topPos) {
	if (LAYER) {
		if (lastMenu) {
			kick(lastMenu,false,topPos);
		}
		if (show) {
			kick(menuName,true,topPos);
		}
	lastMenu = menuName;
	clearTimeout(timeoutId);
	}
}

function hide(menuName,topPos) {
	toFunc = "popUp('" + menuName + "',false,'" + topPos + "')";
	timeoutId = setTimeout (toFunc,timeOut);
}

// Live...
function eradio(file) {
var w=260;
var h=300;
var l=(40);
var t=(20);

        window.open (file,'_blank','scrollbars=0,status=0,menubar=0,resizable=0,location=0,toolbar=0,width=' + w + 
',height=' + h + ',left=' + l + ',top=' + t);}

// forum
function pop_forum_form(file) {
var w=330;
var h=360;
var l=(40);
var t=(20);

window.name="_target";
        window.open (file,'_blank','scrollbars=0,status=0,menubar=0,resizable=0,location=0,toolbar=0,width=' + w + 
',height=' + h + ',left=' + l + ',top=' + t);}


// Livex.
function xradio(file) {
var w=300;
var h=500;
var l=(screen.width-w-40);
var t=(20);

        window.open (file,'_blank','scrollbars=1,status=0,menubar=0,resizable=1,location=0,toolbar=0,width=' + w + 
',height=' + h + ',left=' + l + ',top=' + t);}

// Contact
function kontakt(file) {
var w=300;
var h=405;
var l=(screen.width-w-40);
var t=(20);

        window.open (file,'_blank','scrollbars=0,status=0,menubar=0,resizable=1,location=0,toolbar=0,width=' + w + 
',height=' + h + ',left=' + l + ',top=' + t);}


// Send Email
function mailem(id) {
var w=300;
var h=500;
var l=(screen.width-w-40);
var t=(20);

        window.open ('/_mailem/' + 
id,'_blank','scrollbars=0,status=0,menubar=0,resizable=0,location=0,toolbar=0,width=' + w + ',height=' + h + 
',left=' + l + ',top=' + t);
}

// Vysledky...
function vysledky(file) {
var w=590;
var h=450;
var l=(40);
var t=(20);

        window.open (file,'_blank','scrollbars=1,status=0,menubar=0,resizable=0,location=0,toolbar=0,width=' + w + 
',height=' + h + ',left=' + l + ',top=' + t);}


// -->

