<!--
function OpenPhoto(id, title, table)
{
var Window_Properties = "menubar=no, toolbar=no, location=no, resizable=no, scrollbars=no, height=320, width=280";
var PhotoWin = window.open("photowindow.php?id="+id+'&title='+title+'&table='+table,'',Window_Properties);
}
function voteResults(id)
{
	var Window_Properties = "menubar=yes, toolbar=yes, location=no, resizable=yes, scrollbars=yes, height=320, width=600";
	var answer = 0;
	var end = document.forms['voting'].elements.length;
	for (i = 0; i < end; i++) 
	{
		if(document.forms('voting').elements.item(i).checked==true)
		{
			answer = i+1;
		}
	}
	var voteWindow = window.open("voting.php?id="+id+'&answer='+answer,'',Window_Properties);
}
function results(id)
{
	var Window_Properties = "menubar=yes, toolbar=yes, location=no, resizable=yes, scrollbars=yes, height=320, width=600";
	var voteWindow = window.open("voting.php?id="+id,'',Window_Properties);
}
function changePath(lang,section)
{
 //FOR rzhavsky/site/  if(document.location.pathname.substr(6,11)=='program.php')
 //FOR rzhavsky.com  if(document.location.pathname.substr(1,11)=='program.php')     
 if(document.location.pathname.substr(1,11)=='program.php')  
 {	
	location.href=location.pathname+'?section='+section+'&newLanguage='+lang;
 }
 //else if((document.location.href.indexOf('id')!=-1) || (document.location.href.indexOf('curPage')!=-1))
 else if(document.location.href.indexOf('curPage')!=-1)
 {
 	str = new String();
	var numb;
	str = document.location.href;
	if (str.match('newLanguage')==null)
	{
		numb = str.length;//FOR rzhavsky.com numb = str.length
	}
	else
	{
		numb = str.length - 16;
	}	
	str = str.substring(0, numb);
	location.href = str+'&newLanguage='+lang;
	

 }
 else
 {	
 	location.href=location.pathname+'?newLanguage='+lang;	
 }	
}
function printWindow(sector,id,lang)
{
	var Window_Properties = "menubar=yes, toolbar=yes, location=yes, resizable=yes, scrollbars=yes";
	var url = new String();
	url = location.href;
	var PhotoWin = window.open("print.php?sector="+sector+"&id="+id+'&language='+lang+'&url='+url,'',Window_Properties);

}
//-->