function setBookmark() {
	if (window.sidebar) {
		window.sidebar.addPanel(document.title, location.href, '');
	}
	else if (document.all) { 
		window.external.AddFavorite(location.href, document.title);
	}
	else {
		alert('Function is not available');
	}
	return false;
}

function setHomepage() {
	if (document.all) {
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage(location.href);
		return false;
	}
	return true;
}

var search_text = "";

function search_onfocus()
{
        if(!search_text) {
            document.getElementById("s").value="";
        }
}

function search_onblur()
{
	search_text = document.getElementById("s").value;
	if(!search_text) {
		document.getElementById("s").value = searchdef_text;
	}
}

function showcalendar()
{
	calendar = 1 - calendar;
	if (calendar == 1)
	{
		document.getElementById("date_calendar").style.display = "block";
	}
	else
	{
		document.getElementById("date_calendar").style.display = "none";
	}
}

function calendar_list(arg)
{
	var month = 0;
	var year = 0;
	month = document.getElementById("month").value;
	year = document.getElementById("year").value;
	if (arg == -1)
	{
		if (month == 1)
		{
			month = 12;
			year = year - 1;
		}
		else
		{
			month = month - 1;
		}
	}
	else if (arg == 1)
	{
		if (month == 12)
		{
			month = 1;
			year = eval(year) + 1;
		}
		else
		{
			month = eval(month) + 1;
		}		
	}
	document.getElementById("month").value = month;
	document.getElementById("year").value = year;
	document.calendar_form.submit();
}

	function sizeDef()
	{
		currentSize = 0;
		dw_fontSizerDX.reset();
	}
	
	function sizeMiddle()
	{
		if (currentSize > 2)
		{
			currentSize = -2;
			dw_fontSizerDX.adjust(currentSize);
		}
		else if (currentSize == 0)
		{
			currentSize = 2;
			dw_fontSizerDX.adjust(currentSize);
		}
		currentSize = 2;
	}
	
	function sizeMax()
	{
		if (currentSize == 2)
		{
			currentSize = 2;
			dw_fontSizerDX.adjust(currentSize);
		}
		else if (currentSize == 0)
		{
			currentSize = 4;
			dw_fontSizerDX.adjust(currentSize);
		}			
		currentSize = 4;
	}

