function OpenVoteWindow ( VideoNum )
	{
		NewWindow ( 'http://www.pozareport.si/tam/video_vote.php?VideoNum=' + VideoNum, 'video' + VideoNum, 400, 620, 'no', 'center' );
	}
	var win=null;
	function NewWindow ( mypage, myname, w, h, scroll, pos ) 
	{ 
		if ( pos == "center" )
		{ 
			LeftPosition = ( screen.width ) ? ( screen.width - w ) / 2 : 100; 
			TopPosition = ( screen.height ) ? ( screen.height - h ) / 2 : 100; 
		}
		else
		{ 
			LeftPosition = 0; 
			TopPosition = 20; 
		} 
		
		settings = 'width='+ w + ',height = ' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; 
		win = window.open ( mypage, 90, settings); 
	}

function CreateBookmarkLink ()
{
	var bTitle = "Pozareport.si"; 
	var url = "http://www.pozareport.si";

	if (window.sidebar) {
		window.sidebar.addPanel(bTitle, url, "");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, bTitle); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
}

function ChangeNajboljType ()
{
	var najboljTypeEl = document.getElementById ( 'najboljType' );

	document.location = './?Id=najbolj_brano&BranoType=' + najboljTypeEl.options[najboljTypeEl.selectedIndex].value;
}

function ChangeImageSrc ( ImageID, ImageSrc )
{
	document.getElementById ( ImageID ).src = ImageSrc;
}

function SetLoading ( ElementID )
{
	document.getElementById ( ElementID ).innerHTML = '<img src="template/shared/images/lightbox/loading.gif" alt="Loading" />';
}

function UpdateElement ( ElementID, UrlToCall )
{
	var ajax = new AjaxDelegate ( 'ajax/' + UrlToCall, nfuUpdateElement, ElementID );
	ajax.Fetch ();
}

function nfuUpdateElement ( UrlToCall, Contents, ElementID)
{
	document.getElementById ( ElementID ).innerHTML = Contents;
}

function CheckSearchString ( TxtElement, CheckSections )
{
	if ( document.getElementById ( TxtElement ).value.length >= 3 )
	{
		if ( CheckSections == true )
		{
			var s_news = document.getElementById ( 's_news' );
			var s_blog = document.getElementById ( 's_blog' );
			var s_forum = document.getElementById ( 's_forum' );

			if ( s_news.checked == false && s_blog.checked == false && s_forum.checked == false )
			{
				alert ( 'Izbrati morate vsaj eno področje, po katerem želite iskati.' );
				return false;
			}
			else
				return true;
		}
		else
			return true;
	}
	else
	{
		alert ( 'Iskalni niz mora biti dolg vsaj 3 znake.' );
		return false;
	}
}