
function bookmarksite(title, url) {
	if (document.all)
		window.external.AddFavorite(url, title);
	else if (window.sidebar)
		window.sidebar.addPanel(title, url, "")
}
//---------------------------------------------------------------

function confirmSubmit() {
	var agree = confirm("Are you sure?");
	if (agree) return true ; else return false ;
}
//---------------------------------------------------------------

/*
	Removes the spaces from begin of string and from end.
	It means, if string is "  string   " it makes "string"
	Params:
		str string [string witch need to check]
*/
function trimString (str) {

	while (str.charAt(0) == ' ')
		str = str.substring(1);
	while (str.charAt(str.length - 1) == ' ')
		str = str.substring(0, str.length - 1);

	return str;
}
//---------------------------------------------------------------

function swapImages (id, first, second)
{
	var first_id = "img_" + id;
	var second_id = "img_" + (++id);

//	document.getElementById(first_id).className = first;
//	document.getElementById(second_id).className = second;

	document.getElementById(first_id).style.display = "none";
//	document.getElementById(second_id).style.display = "block";
	
}
//---------------------------------------------------------------

function show (id)
{
	document.getElementById(id).style.display = "block";
}
//---------------------------------------------------------------

function hide (id)
{
	document.getElementById(id).style.display = "none";
}
//---------------------------------------------------------------
