        function checkCasSelect(rokid,mesicid,denid,hodid,minid) {
                rok=document.getElementById(rokid);
                mesic=document.getElementById(mesicid);
                den=document.getElementById(denid);
                hod=document.getElementById(hodid);
                min=document.getElementById(minid);

                vybrano=false;
                if (min.selectedIndex>0) vybrano=true;
                if (hod.selectedIndex==0 && vybrano) {
                        hod.selectedIndex=1;
                        vybrano=true;
                }
                if (hod.selectedIndex>0) vybrano=true;
                if (den.selectedIndex==0 && vybrano) {
                        den.selectedIndex=1;
                        vybrano=true;
                }
                if (den.selectedIndex>0) vybrano=true;
                if (mesic.selectedIndex==0 && vybrano) {
                        mesic.selectedIndex=1;
                        vybrano=true;
                }
                if (mesic.selectedIndex>0) vybrano=true;
                if (rok.selectedIndex==0 && vybrano) {
                        rok.selectedIndex=1;
                        vybrano=true;
                }
                if (rok.selectedIndex>0) vybrano=true;
        }

        function checkCasSelectJenMesic(rokid,mesicid,denid) {
                rok=document.getElementById(rokid);
                mesic=document.getElementById(mesicid);
                den=document.getElementById(denid);

                vybrano=false;
                if (den.selectedIndex==0 && vybrano) {
                        den.selectedIndex=1;
                        vybrano=true;
                }
                if (den.selectedIndex>0) vybrano=true;
                if (mesic.selectedIndex==0 && vybrano) {
                        mesic.selectedIndex=1;
                        vybrano=true;
                }
                if (mesic.selectedIndex>0) vybrano=true;
        }

			function changecss(theClass,element,value) {
				var cssRules;
				if (document.all) {
					cssRules = 'rules';
				}
				else if (document.getElementById) {
					cssRules = 'cssRules';
				}
				var added = false;
				for (var S = 0; S < document.styleSheets.length; S++) {
					for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
						if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
				    		if(document.styleSheets[S][cssRules][R].style[element]) {
				    			document.styleSheets[S][cssRules][R].style[element] = value;
				    			added=true;
								break;
				    		}
				   		}
				  	}
			
				  	if(!added){
				  		if(document.styleSheets[S].insertRule){
							document.styleSheets[S].insertRule(theClass+' { '+element+': '+value+'; }',document.styleSheets[S][cssRules].length);
						} else if (document.styleSheets[S].addRule) {
							document.styleSheets[S].addRule(theClass,element+': '+value+';');
						}
				  	}
				}
			}
			
