// JavaScript Document

	var calendarDays  = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
	var browName = navigator.appName;
	
	 function checkdate(mesic,rok,stat)
	{	
	    if (browName=="Netscape") checkdateNN(mesic,rok,stat);
	    else checkdateALL(mesic,rok,stat);
	}
  
  function checkdateNN(mesic,rok,stat)
	{	
		
    if(rok % 4==0)calendarDays[1]=29;
		else calendarDays[1]=28;
		for (i=28;i<=31;i++) 
		{
			id=stat+i;
			window.document.getElementById(id).style.display='block';
		}
		for (i=31;i>calendarDays[mesic];i--) 
		{
			id=stat+i;
			window.document.getElementById(id).style.display='none'; 
		}
		
		
	}




	function checkdateALL(mesic,rok,stat)
	{	
		if(rok % 4==0)calendarDays[1]=29;
		else calendarDays[1]=28;
		for (i=28;i<=31;i++) 
		{
			id=stat+i;
			window.document.getElementById(id).style.color='black';
		}
		for (i=31;i>calendarDays[mesic];i--) 
		{
			id=stat+i;
			window.document.getElementById(id).style.color='white'; 
		}
		
	}
