function stopEvent(evt) {
   if ( evt.stopPropagation )    // for good brousers
     evt.stopPropagation();
   else
     evt.cancelBubble = true;  // for IE
   }
function show_hide( this_obj ) {
	if (this_obj.className == 'palette_hidden')
		{
			this_obj.className = 'palette_visible';
			document.body.style.display="none";
			document.body.style.display="block";
		}
	else
		{
			this_obj.className = 'palette_hidden';	
			document.body.style.display="none";
			document.body.style.display="block";	
		}
}
function show_hide2( this_obj ) {
	if (this_obj.className == 'uncover')
		{
			this_obj.className = 'cover';
			document.body.style.display="none";
			document.body.style.display="block";
		}
	else
		{
			this_obj.className = 'uncover';	
			document.body.style.display="none";
			document.body.style.display="block";	
		}
}
function openWindow(path, w, h, title)
{
	if(w>screen.width) 
	{
		h = parseInt((screen.width/w)*h);
		w = screen.width;
		if(h>screen.height)
		{
			w = parseInt((screen.height/h)*w);
			h = screen.height;
		}
	}
	if(h>screen.height)
	{
		w = parseInt((screen.height/h)*w);
		h = screen.height;
		if(w>screen.width)
		{
				h = parseInt((screen.width/w)*h);
				w = screen.width;			
		}
	}
	var screenX = parseInt((screen.width-w)/2);
	var screenY = parseInt((screen.height-h)/2);

	var html ='<!DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML><HEAD><TITLE>'+title+'</TITLE><META http-equiv="Content-Type" content="text/html; charset=windows-1251"><LINK href="style.css" type="text/css" rel="stylesheet"></HEAD>';
		html += '<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">';
		html += '<img src="'+path+'" alt='+title+' width="'+w+'" height="'+h+'">';
		html +=	'</BODY></HTML>';
		myWin = open(path,'displayWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+w+',height='+h+',screenX='+screenX+',screenY='+screenY);
		// открыть объект document для последующей печати 
		myWin.document.open();
		myWin.document.write(html);
		myWin.document.close();  
	return false;
}



function show_hide3( this_obj, li_ssil ) {
           var ulak = document.getElementById(this_obj);
           if (ulak.style.display == "none")
		   {
			//$('#regions_items').find('div').each(function(data){
				//$(this).css('display', 'none');
			//});
			$('.HAAAA').css('display', 'none');
			$('.HAAAA').removeClass();
			$("#"+this_obj).addClass('HAAAA');
			ulak.style.display = "block";	
			$('.vbI').removeClass();			
			$(li_ssil).find('a').addClass('vbI');
		   } 
			else
		   {
			ulak.style.display = "none";
		   }
}

