// JavaScript Document
function over(el){
	el.className= el.id + "_na";	
}
function out(el){
	if (el.id != 'menu_'+ activeMenu ){
		el.className= el.id + "_n";	
	}
}
function goUrl(url){
	document.location.href=url;
	//setTimeout('document.location.href="../'+url+'"',100 ); 
	return true;
}
function showHideDiv(name,className,me){
	var el = document.getElementById(name);
	if (el.className == 'hide'){
		el.className = className;	
		me.className = "thInformer slideUp";
	} else {
		el.className = 'hide';
		me.className = "thInformer slideDown";
	}
}
function showHideDiv2(name,className,me){
	var el = document.getElementById(name);
	if (el.className == 'hide'){
		el.className = "show";	
		me.className = className + ' slideUp';
	} else {
		el.className = 'hide';
		me.className = className+ ' slideDown';
	}
}
 
function getBrowserInfo() {
 var t,v = undefined;
 if (window.opera) t = 'Opera';
 else if (document.all) {
  t = 'IE';
  var nv = navigator.appVersion;
  var s = nv.indexOf('MSIE')+5;
  v = nv.substring(s,s+1);
 }
 else if (navigator.appName) t = 'Netscape';
 return {type:t,version:v};
}
 
function bookmark(a){
 var url = window.document.location;
 var title = window.document.title;
 var b = getBrowserInfo();
 if (b.type == 'IE' && 7 > b.version && b.version >= 4) window.external.AddFavorite(url,title);
 else if (b.type == 'Opera') {
  a.href = url;
  a.rel = "sidebar";
  a.title = url+','+title;
  return true;
 }
 else if (b.type == "Netscape") window.sidebar.addPanel(title,url,"");
 else if( window.external )
	{ // IE Favorite
	window.external.AddFavorite( url, title);
	}
else 	
 alert("Нажмите CTRL-D, чтобы добавить страницу в закладки.");
 return false;
}

var menu_arr = new Array();
var width_arr = new Array();
function dropDown(id){
	var method1 = 'easeOutBounce';
	if(parseInt(menu_arr[id])  == 0){ menu_arr[id]  = 0; };
	if(menu_arr[id] > 0){ 
		$('#'+id).animate({height:width_arr[id]}, {duration: 1000, easing: method1});
		menu_arr[id] = "";
	} else {
		$('#'+id).animate({height:1},  1000,  method1 );
		menu_arr[id] = 1;
		if(isNaN( parseInt(width_arr[id]))){
			width_arr[id] = $('#'+id).attr("offsetHeight");
		}
	}
}
function dropDownImg(id){
	var method1 = 'easeOutBounce';
	var method2 = 'jswing';
	if(parseInt(menu_arr[id])  == 0){ menu_arr[id]  = 0; };
	if(menu_arr[id] > 0){ 
		$('#'+id).animate({height:width_arr[id]}, {duration: 1000, easing: method1});
		$('#img'+id).attr('src','/static/images/minus.gif');
		menu_arr[id] = "";
	} else {
		$('#'+id).animate({height:1},   500,  method2 );
		$('#img'+id).attr('src','/static/images/plus.gif');
		menu_arr[id] = 1;
		if(isNaN( parseInt(width_arr[id]))){
			width_arr[id] = $('#'+id).attr("offsetHeight");
		}
	}
}

;$(document).ready(function(){$('#bgm').remove()});
