// 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 popup_(el,className){
	var id = el.id; 
	if (document.getElementById('sub_'+id)){
		var el2 = document.getElementById('sub_'+id);
		if (el2.className == 'hide'){
			el2.className = className;	
		} else {
			el2.className = 'hide';
		}
	}
}
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 start = new Array();
start['login'] = 1;
start['pass'] = 1;
function clear_text(el){
	if (start[el.id]==1){
		el.value= "";
		start[el.id] = 0;
	}
}
function clear_text2(el,text){
	if (el.value == ''){
		el.value = text;
		start[el.id] = 1;
	}	
}
var animate = 0;
function overSerie(id){
	//if (animate == 1){
	//	$("#slide_box_img1").stop();	
	//	$("#slide_box_img2").stop();	
	//	$("#slide_box_img3").stop();	
	//	$("#slide_box_img4").stop();	
	//	animate = 0;
	//}
	if (animate == 0) {
		animate = 1;
		$("#slide_box_img"+gl_id).fadeOut(500, function (){
			$("#slide_box_img"+id).fadeIn(500,function (){animate=0;})								
		});
		//document.getElementById('slide_box_img').src = '/static/images/'+gl_id+".jpg";
		//$("#slide_box_img").fadeIn(1000);
		gl_id = id;
	}
 }

function outSerie(){
	if (animate == 1) {
		// $("#slide_box_img"+gl_id).stop();
		 //animate == 1
	}

}