
function yo(s)
{
  s=s.replace('%','@');
  s=s.replace('+','.');
  s=s.replace('%','@');
  s=s.replace('+','.');
  s=s.replace('+','.');
  document.writeln('<a href="mailto:'+s+'">'+s+'</a>');
}

function yoyo(phone, s,icq,skype)
{
 document.writeln('<table>');
 if (phone) document.writeln('<tr><td><b>Тел.:</b></td><td>'+phone+'</td></tr>');
 if (s)
 {
    document.writeln('<tr><td><b>Mail.:</b></td><td>');
    yo(s);
    document.writeln('</td></tr>');
 }
 if (icq) document.writeln('<tr><td><b>ICQ:</b></td><td>'+icq+'</td></tr>');
 if (skype) document.writeln('<tr><td><b>Skype:&nbsp;</b></td><td>'+skype+'</td></tr>');
  document.writeln('</table>');
}

function foto(link,path)
{
  if (link) document.writeln(
        '<a onmouseover="ishow(this)" onmouseout="ihide(this)"  href="http://'+link+'"  rel="nofollow" class="preview"><span style="background-image: url('+path+')"></span><img src="/img/admin/logo1.gif" width="14" height="14" border="0" alt="" title=""/></a>'
    );
  else
  document.writeln('<img src="/img/admin/logo2.gif" width="14" height="14" border="0" alt="" title="Фотоотчет временно отсутствует" />');

}

function ishow(q)
{
 q.setAttribute("class", "show");
 if (document.all) q.className='show';

}
function ihide(q)
{
 q.setAttribute("class", "hide");
 if (document.all) q.className='hide';
}

function filter_announce($filter_link)
{
	var months = document.getElementById('announce_filter_month');
	var selected_month = months.selectedIndex;
	var selected_month_id = months[selected_month].id;
	
	var years = document.getElementById('announce_filter_year');
	var selected_year = years.selectedIndex;
	var selected_year_id = years[selected_year].id;
	
	var cities = document.getElementById('announce_filter_city');
	var selected_city = cities.selectedIndex;
	var selected_city_id = cities[selected_city].id;
	
	window.location=$filter_link + selected_city_id + '/' + selected_month_id + '/' + selected_year_id;
};

function filter_person($filter_link)
{
	var cities = document.getElementById('person_filter_city');
	var selected_city = cities.selectedIndex;
	var selected_city_id = cities[selected_city].id;
	
	window.location=$filter_link + selected_city_id;
};

function filter_foto($filter_link)
{
	var months = document.getElementById('foto_filter_month');
	var selected_month = months.selectedIndex;
	var selected_month_id = months[selected_month].id;
	
	var years = document.getElementById('foto_filter_year');
	var selected_year = years.selectedIndex;
	var selected_year_id = years[selected_year].id;
	
	var cities = document.getElementById('foto_filter_city');
	var selected_city = cities.selectedIndex;
	var selected_city_id = cities[selected_city].id;
	
	window.location=$filter_link + selected_city_id + '/' + selected_month_id + '/' + selected_year_id;
};
