// JavaScript Document
<!--
function IntoForm( intDay, intMonth, intYear )
{
	window.opener.document.Formularz.Data.value = intDay + '-' + intMonth + '-' + intYear
	self.close()
}
		
function ShowMonthAndYear()
{
	objDate = new Date()
	arrMonths = new Array( "Styczen", "Luty", "Marzec", "Kwiecien", "Maj", "Czerwiec", "Lipiec", "Sierpien", "Wrzesien", "Pazdziernik", "Listopad", "Grudzien" )
	
	document.write( arrMonths[ objDate.getMonth() ] + " - " + objDate.getFullYear() )
}
		
function ShowDaysNames()
{
	arrDays = new Array( "Po", "Wt", "Sr", "Cz", "Pt", "So", "Nd" )
			
	for( var i = 0; i <= 6; i++ )
	{
		document.write( "<td class=\"Calendar-Header\" width=\"23\" align=\"center\">" + arrDays[ i ] + "</td>" )
	}
}

function ShowNumbers( arrSpecialDays, arrEvents )
{
	intDayOfWeek = 1
			
	arrMonths = new Array( "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" )
	arrNumbers = new Array( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 )
	arrDaysNumbers = new Array( 7, 1, 2, 3, 4, 5, 6 )
	arrSpecialDaysBln = new Array()
			
	objDate = new Date()
	objDate_ = new Date( arrMonths[ objDate.getMonth() ] + " 1, " + objDate.getFullYear() )
	
	intMonth = objDate.getMonth()
	intMonth = parseInt( intMonth ) + 1
	
	if( intMonth < 10 ) { intMonth = "0" + intMonth }
	
	strBackgroundColor = ''
	strLink = ''
			
	document.write( "<tr>" )
			
	if( arrDaysNumbers[ objDate_.getDay() ] > 1  )
	{
		document.write( "<td style=\"font-size: 10px;\" colspan=\"" + ( arrDaysNumbers[ objDate_.getDay() ] - 1 ) + "\">&nbsp;</td>" )
		intDayOfWeek = arrDaysNumbers[ objDate_.getDay() ]
	}
			
	for( var i = 1; i <= arrNumbers[ objDate.getMonth() ]; i++ )
	{
		for( ii = 0; ii < arrSpecialDays.length; ii++ )
		{
			if( arrSpecialDays[ ii ] == i )
			{
				arrSpecialDaysBln[ i ] = true;
			}
		}
		
		if( arrSpecialDaysBln[ i ] == true )
		{
			strAction = " onmouseover=\"javascript:Highlight( 'Match_" + i + "_" + intMonth + "', 'on' )\" onmouseout=\"javascript:Highlight( 'Match_" + i + "_" + intMonth + "', 'off' )\""
			if( i == objDate.getDate() )
			{
				strBackgroundColor = ' style="background-color: #ACD1ED;"' + strAction
			}
			else
			{
				strBackgroundColor = ' style="background-color: #C2F19F;"' + strAction
			}
			strLink = "<a class=\"Calendar\">" + i + "</a>"
		}
		else
		{
			strBackgroundColor = ''
			strLink = i
		}
		
		if( i == objDate.getDate() )
		{
			if( strBackgroundColor == '' )
			{
				strBackgroundColor = ' style="background-color: #FFA200;"'
			}
			
			document.write( "<td class=\"Calendar-Day\"" + strBackgroundColor + ">" + strLink + "</td>" )
		}
		else if( intDayOfWeek == 6 || intDayOfWeek == 7 )
		{
			if( strBackgroundColor == '' )
			{
				strBackgroundColor = ' style="background-color: #E6E6E6;"'
			}
			
			document.write( "<td class=\"Calendar-Day\"" + strBackgroundColor + ">" + strLink + "</td>" )
		}
		else
		{
			document.write( "<td class=\"Calendar-Day\"" + strBackgroundColor + ">" + strLink + "</td>" )
		}
				
		if( intDayOfWeek == 7 )
		{
			document.write( "</tr><tr>" )
			intDayOfWeek = 0
		}
				
		intDayOfWeek++
	}
			
	if( intDayOfWeek < 7 )
	{
		document.write( "<td colspan=\"" + ( 7 - intDayOfWeek ) + "\" style=\"font-size: 10px;\">&nbsp;</td>" )
	}
			
	document.write( "</tr>" )
}

function ShowEvent( strEvent, strDisplay )
{
	if( strDisplay == 'none' )
	{
		//setTimeout( "document.getElementById( 'Calendar-Event' ).style.display = 'none'", 5000 )
		document.getElementById( 'Calendar-Event' ).style.display = 'none'
	}
	else
	{
		document.getElementById( 'Calendar-Event' ).innerHTML = strEvent
		document.getElementById( 'Calendar-Event' ).style.display = strDisplay
	}
}

function Highlight( elementId, strHighlight )
{
	if( strHighlight == 'on' )
	{
		document.getElementById( elementId ).style.background = "#ACD1ED"
	}
	else
	{
		document.getElementById( elementId ).style.background = ""
	}
}
//-->