function make_calendar() {
	function Calendar(Year, Month, Day, ContainerId)
	{
		Calendar.MonthNames = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
		this.oDate = new Date();
		this.Year = (Year == null) ? this.oDate.getFullYear() : Year;
		this.Month = (Month == null) ? this.oDate.getMonth() : Month - 1;
		this.Day = (Day == null) ? 0 : Day;
		this.oDate = new Date(this.Year, this.Month, 1);
		this.NextMonth = new Date(this.Year, this.Month + 1, 1);
		this.WeekStart = this.oDate.getDay();
		this.MonthDays = Math.round((this.NextMonth.getTime() - this.oDate.getTime()) / 86400000) + 1;
		this.HTML = '<table class="tblCalendar">';
		this.HTML += '<tr><td colspan="7" class="cal_title">' + Calendar.MonthNames[this.Month] + ' ' + this.Year + '</td></tr>';
		this.HTML += '<tr class="cal_week"><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>';
		this.HTML += '<tr>';
		for(DayCounter = 0; DayCounter < this.WeekStart; DayCounter++)
		{
			this.HTML += '<td>&nbsp;</td>';
		}
		for(DayCounter = 1; DayCounter < this.MonthDays; DayCounter++)
		{
			if((DayCounter + this.WeekStart) % 7 == 1) this.HTML += '<tr>';
			if(DayCounter == this.Day)
			this.HTML += '<td class="cal_today">' + DayCounter + '</td>';
			else this.HTML += '<td>' + DayCounter + '</td>';
			if((DayCounter + this.WeekStart) % 7 == 0) this.HTML += '</tr>';
		}
		for(j = (42 - (this.MonthDays + this.WeekStart)), DayCounter = 0; DayCounter <= j; DayCounter++)
		{
			this.HTML += '<td>&nbsp;</td>';
			if((j - DayCounter) % 7 == 0) this.HTML += '</tr>';
		}
		this.HTML += '</table>';
		if(ContainerId != null)
		{
			this.Container = document.getElementById(ContainerId);
			if(this.Container)
			document.getElementById(ContainerId).innerHTML = this.HTML;
			else
				document.write('<div id="' + ContainerId + '">' + this.HTML + '</div>');
		}
		else
		{
			do
			{
				ContainerId = 'tblCalendar' + Math.round(Math.random() * 1000);
			}
			while(document.getElementById(ContainerId));
			document.write('<div id="' + ContainerId + '">' + this.HTML + '</div>');
		}
		return ContainerId;
	}


		var currentTime = new Date();
		var month = currentTime.getMonth() + 1;
		for(k = 5; k <= 10; k++)
		{
			if ( k == month){
				var today = currentTime.getDate();
			}
			else {
				var today = null ;
			}
			var thisDiv = "calendar" + k ;
			id = Calendar(2011, k, today, thisDiv);
		}
		var june_array = jQuery("#array_may").text();
		june_array = june_array.replace(/ /gi , "");
		june_array = june_array.split(",");
		june_array_length = june_array.length;
		for(i = 0; i <= june_array_length - 1 ; i++)
		{
			var the_day = june_array[i].valueOf();
			jQuery("#calendar5 table td").each(function() {
			if(this.innerHTML == the_day)
				{
					jQuery(this).addClass("zauzeto");
				}
			});
		}
		
		var june_array = jQuery("#array_june").text();
		june_array = june_array.replace(/ /gi , "");
		june_array = june_array.split(",");
		june_array_length = june_array.length;
		for(i = 0; i <= june_array_length - 1 ; i++)
		{
			var the_day = june_array[i].valueOf();
			jQuery("#calendar6 table td").each(function() {
			if(this.innerHTML == the_day)
				{
					jQuery(this).addClass("zauzeto");
				}
			});
		}
		
		var june_array = jQuery("#array_july").text();
		june_array = june_array.replace(/ /gi , "");
		june_array = june_array.split(",");
		june_array_length = june_array.length;
		for(i = 0; i <= june_array_length - 1 ; i++)
		{
			var the_day = june_array[i].valueOf();
			jQuery("#calendar7 table td").each(function() {
			if(this.innerHTML == the_day)
				{
					jQuery(this).addClass("zauzeto");
				}
			});
		}
		
		var june_array = jQuery("#array_august").text();
		june_array = june_array.replace(/ /gi , "");
		june_array = june_array.split(",");
		june_array_length = june_array.length;
		for(i = 0; i <= june_array_length - 1 ; i++)
		{
			var the_day = june_array[i].valueOf();
			jQuery("#calendar8 table td").each(function() {
				if(this.innerHTML == the_day)
				{
					jQuery(this).addClass("zauzeto");
				}
			});
		}
		
		var june_array = jQuery("#array_september").text();
		june_array = june_array.replace(/ /gi , "");
		june_array = june_array.split(",");
		june_array_length = june_array.length;
		for(i = 0; i <= june_array_length - 1 ; i++)
		{
			var the_day = june_array[i].valueOf();
			jQuery("#calendar9 table td").each(function() {
				if(this.innerHTML == the_day)
				{
					jQuery(this).addClass("zauzeto");
				}
			});
		}
		
		var june_array = jQuery("#array_october").text();
		june_array = june_array.replace(/ /gi , "");
		june_array = june_array.split(",");
		june_array_length = june_array.length;
		for(i = 0; i <= june_array_length - 1 ; i++)
		{
			var the_day = june_array[i].valueOf();
			jQuery("#calendar10 table td").each(function() {
				if(this.innerHTML == the_day)
				{
					jQuery(this).addClass("zauzeto");
				}
			});
		}
		
}
/* Ubaci apartmane */

function ubaciHtml(d) {
    var a = "#moreApartments",
        c = jQuery(d).find("#dnn_ctr402_Default_ViewType_dlProperty");
    jQuery(a).append(c);
}
function loadContent(a,b) {
    jQuery.get("/tabid/" + a + "/mid/402/dnnprintmode/true/agentType/ViewSearch/CustomFieldIDs/30/SearchValues/" + b + "/Default.aspx?SkinSrc=[G]Skins%2f_default%2fNo+Skin&ContainerSrc=[G]Containers%2f_default%2fNo+Container", ubaciHtml)
}

/* Bookmarks */
function CreateBookmarkLink() {
url = window.location;
if (window.sidebar) { // Mozilla Firefox Bookmark
window.sidebar.addPanel(bookmarkTitle, url, "");
} else if (window.external) { // IE Favorite
window.external.AddFavorite(url, bookmarkTitle);
}
else if (window.opera && window.print) { // Opera Hotlist
return true;
}
}

      

