<!--
function SearchClear(elmName, text)
{
	elm = document.getElementById(elmName);

	if(elm.value == text)
	{
		elm.value = "";
		elm.focus();
	}
}

// function GetVoting(url, id)
// {
// 	$("#Voting"+id).load(url.replace(/&amp;/, '&'));
// }

function GetRating(url, id)
{
	$("#Rating"+id).load(url.replace(/&amp;/, '&'));
}

/*function GetVoting(url, id)
{
	$("#Voting"+id).load(url.replace(/&amp;/, '&'));
}
*/
function Voting(url, params)
{
	window.location = url+'?'+params.replace(/&amp;/, '&');
};

function CheckCounter(elm, maxLength)
{
	if(maxLength < elm.value.length)
	{
// 		alert(elm.value.length);
		elm.value = elm.value.substr(0, maxLength);
	}

	document.getElementById(elm.id+'Counter').innerHTML = elm.value.length;
}

function CheckCounterKeypress(obj, maxLength)
{
	if (maxLength > 0 && obj.value.length >= maxLength)
	{
		document.getElementById(obj.id+'Counter').innerHTML = 300;
		event.returnValue = false;
	}

	document.getElementById(obj.id+'Counter').innerHTML = obj.value.length;
}

function changeBannerPosition(bannerName, bannerCount)
{
	var activePosition = 0;

	for(var i = 1;  i <= bannerCount; i++)
	{
		if(elm = document.getElementById(bannerName+i))
		{
		   if(elm.style.display == '')
		   {
		 		activePosition = i+1;
		 		elm.style.display = 'none';
		   }
		}
	}

	if(!activePosition || activePosition > bannerCount)
	{
		activePosition = 1;
	}

	if(elm = document.getElementById(bannerName+activePosition))
	{
		elm.style.display = '';
	}
}
//-->

