var right_host = 'ynikom.ru';
var this_site_url = top.location.href;

if(this_site_url=='http://www.'+right_host+'/'){
window.onload=function() {
changeTree('menu5');
MM_preloadImages('/images/map1.gif','/images/map_pskov.gif', '/images/map_murom.gif');
}
}else{
window.onload=function() {
MM_preloadImages('/images/map1.gif','/images/map_pskov.gif', '/images/map_murom.gif');
}
}

function BigImage(img,w,h)
{
  var obj_window = 
window.open(img,"","toolbar=no,directories=no,status = no,resizable=yes,menubar=no,scrollbars=auto,width="+w+", height="+h);
	obj_window.focus();
}
var current = '';

function showEl(id)
{
      document.getElementById(id).style.visibility = 'visible';
	  document.getElementById(id).style.display = 'inline';
}
function hideEl(id)
{
   if( document.getElementById(id) )
   {
      document.getElementById(id).style.visibility = 'hidden';
	  document.getElementById(id).style.display = 'none';
}	  
}
function changeTree(id)
{
   if( document.getElementById(id).style.visibility == 'hidden' )
   {
      showEl(id);
	  if( current!='' && current!=id)
	      hideEl(current); 
	  current = id;	
   }
   else
   {  
      hideEl(id);
   }
}

function ChangeMap(img)
{
  if (document.images && document.images['RegionsMap'] )
	document.images['RegionsMap'].src = img;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function show_dropdown(id)
{
	var v = document.getElementById(id).style.display;
	if (v == "none")
	  document.getElementById(id).style.display = "block";
	else
	  document.getElementById(id).style.display = "none";
}