hs.align = "center";
hs.fadeInOut = true;
hs.cacheAjax = false;
outlineType = 'rounded-white',
wrapperClassName = 'highslide-wrapper drag-header';

//jQuery.noConflict();
function ParentWin(url)
{
   if(jQuery.browser.msie)
   {
      try {
         window.opener.location.href = url;
         window.opener.focus();
      } catch (e) {
         win = window.open(url,'Site','fullscreen=yes');
      }
   }
   else
   {
      if (window.opener==null) {
         window.open(url,'Site','fullscreen=yes');
      }
      else {
         window.opener.location.href = url;
         window.opener.focus();
      }
   }
   return false;
}

function show_div(d1,d2)
{
   document.getElementById(d1).style.display='block';
   document.getElementById(d2).style.display='none';
}

function show_threediv(d1,d2,d3)
{
   document.getElementById(d1).style.display='block';
   document.getElementById(d2).style.display='none';
   document.getElementById(d3).style.display='none';
}

function show_fourdiv(d1,d2,d3,d4)
{
   document.getElementById(d1).style.display='block';
   document.getElementById(d2).style.display='none';
   document.getElementById(d3).style.display='none';
   document.getElementById(d4).style.display='none';
}

function sStyle(uid)
{
   hd01=document.getElementById(uid);
   hd01.style.display = "block";
}
function rStyle(uid)
{
   hd01=document.getElementById(uid);
   hd01.style.display = "none";
}

function OpenWin(url,width,height)
{
   win = window.open(url,'Player','width='+width+',height='+height+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1');
   jQuery(win).focus();
   return false;
}

function getElementsByClass(searchClass,node,tag) {
   var classElements = new Array();
   if ( node == null )
   node = document;
   if ( tag == null )
   tag = '*';
   var els = node.getElementsByTagName(tag);
   var elsLen = els.length;

   var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
   for (i = 0, j = 0; i < elsLen; i++) {
      if ( pattern.test(els[i].className) ) {
         classElements[j] = els[i];
         j++;
      }
   }
   return classElements;
}


function ShowAllDiv(divclass)
{
   jQuery(".radio_list .line .group_chan").show();
   jQuery(".radio_list .line //img[alt='']").attr('src','/Esdbpics/arrp.png');
}

function HideAllDiv(divclass)
{
   jQuery(".radio_list .line .group_chan").hide();
   jQuery(".radio_list .line //img[alt='']").attr('src','/Esdbpics/arrpr.png');
}

function OpenBlock1(block)
{
   if(jQuery("#"+block).css('display') == 'none'){
      jQuery("#"+block).show();
      jQuery("#img"+block).attr('src','/Esdbpics/arrp.png');
   }
   else {
      jQuery("#"+block).hide();
      jQuery("#img"+block).attr('src','/Esdbpics/arrpr.png');
   }
   return false;
}

function FlashPlay(url)
{
   document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
   document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"');
   document.write(' width="20" height="20" align="middle" title="Слушать">');
   document.write('<param name="allowScriptAccess" value="sameDomain">');
   document.write('<param name="wmode" value="transparent">');
   document.write('<param name="movie" value="/Esdbpics/play_but101.swf?file=' + url + '">');
   document.write('<param name="quality" value="high"><param name="bgcolor" value="#fffff">');
   document.write('<embed src="/Esdbpics/play_but101.swf?file=' + url + '"');
   document.write('quality="high" bgcolor="#ffffff" width="20" height="20"');
   document.write('align="middle" wmode="transparent"  allowScriptAccess="sameDomain" ');
   document.write('type="application/x-shockwave-flash"  title="Слушать" ');
   document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />');
   document.write(' </embed></object>');
}


function PlMenu(d1,d2,d3,d4)
{
   document.getElementById(d1).style.display='none';
   document.getElementById(d2).style.display='none';
   document.getElementById(d3).style.display='none';
   document.getElementById(d4).style.display='block';
   document.getElementById(d1+'mn').style.background='#FFC10F';
   document.getElementById(d2+'mn').style.background='#FFC10F';
   document.getElementById(d3+'mn').style.background='#FFC10F';
   document.getElementById(d4+'mn').style.background='#FFE89B';
}

function hideYaLogo(d1)
{
   document.getElementById(d1).style.background='#FFFFFF';
}

/********** Adriver AsyncJS loader V1.1 *************/
function debug(){}

function adriver (ph, prm, defer) {  
	try {
		this.ph = ph; 
		this.prm = {};
		for (var i in this.defaults) this.prm[i] = this.defaults[i];
		for (var i in prm) this.prm[i] = prm[i];
		for (var i in this.prm) this.req += i + "=" + this.prm[i] + "&";
		if(!adriver.items){ 
			adriver.items = {};
			this.addHandlers();
			this.checkFlash();
		}
		this.p = document.getElementById(ph);
		this.p.adriver = this;
		adriver.items[ph] = this;
		defer || this.load(); 
	}catch(e){}
}

adriver.prototype.ver = "1.1";
adriver.prototype.flashVer = [0];
adriver.prototype.domReady = false;
adriver.prototype.handlers = [];
adriver.prototype.defaults = {};
adriver.prototype.h = document.getElementsByTagName("head").item(0);
adriver.prototype.req = "http://ad.adriver.ru/cgi-bin/erle.cgi?";

		
adriver.prototype.loadScript = function(req, m){ //m - flag. set when loading from mirror
try {
		m || (req += "ph=" + this.ph + "&rnd=" + Math.round(Math.random()*10000));
		var s = document.createElement("script");
		s.setAttribute("type", "text/javascript");
		s.setAttribute("charset", "windows-1251");
		s.setAttribute("src", req);
		this.s = s;
		this.h.insertBefore(s, this.h.firstChild); 
	}catch(e){}
}

adriver.prototype.detachScript = function (){ try{ this.h.removeChild(this.s) }catch(e){}}

adriver.prototype.load = function (){	try{ this.loadScript(this.req) }catch(e){}}

adriver.prototype.onDomReady = function (f) {try{ this.domReady ? f() : this.handlers.push(f) }catch(e){}}


/************ dom ready state check **********************/

adriver.prototype.runHandlers = function(old_handler){
	try {
		if (old_handler){old_handler() }
		if (!this.domReady){
			adriver.prototype.domReady = true;
			var f; while (f = this.handlers.shift()) f();
		}
	}catch(e){}
}

adriver.prototype.addHandlers = function(){
	try {
		var d = document, t = this, safariTimeout;

		if (/WebKit/i.test(navigator.userAgent)) {
			safariTimeout = setInterval(function(){if (/loaded|complete/.test(d.readyState)) {clearInterval(safariTimeout); t.runHandlers() }}, 100);
		} else if (d.addEventListener) {
			d.addEventListener("DOMContentLoaded", function(){t.runHandlers()}, false);
		} else if (d.all && !window.opera) {
			var s = d.createElement("script");
			s.setAttribute("type", "text/javascript");
			s.setAttribute("src", "");			
			s.setAttribute("defer", "true");
			s.onreadystatechange = function(){if (this.readyState == "complete") t.runHandlers()} 
			this.h.insertBefore(s, this.h.firstChild); 
		}
		var old_handler = window.onload;
		window.onload = function(){t.runHandlers(old_handler)};
	} catch (e){}
}


adriver.prototype.checkFlash = function(req){
	debug("checking flash");
	try {
		if (req) return (this.flashVer[0] >= req);

		var d, n = navigator, m, f = 'Shockwave Flash';
		if((m = n.mimeTypes) && (m = m["application/x-shockwave-flash"]) && m.enabledPlugin && (n = n.plugins) && n[f]) {d = n[f].description}
		else if (window.ActiveXObject) { debug ("activeX flash detect"); try { d = (new ActiveXObject((f+'.'+f).replace(/ /g,''))).GetVariable('$version');} catch (e) {debug ("error in activeX detection")}} 
		debug ("version obj: " + d);
		if (d) adriver.prototype.flashVer = d.replace(/\D+/,'').split(/\D+/);
	
		debug ("flash " + this.flashVer + " detected");
	} catch (e){}
	return false;
}

//============optional components=================//

adriver.prototype.setAnchor = function (){this.anchor = this.addDiv(this.p, {position:"relative"});}

adriver.prototype.addPanel = function (id, params, inner){ 
	debug("add panel" + id);
	var panel = null;
	try {
		if (!this.panels){
			this.panels = {};
		}
		panel = this.addDiv(this.anchor, params, inner)  
		this.panels[id] = panel;
	}catch(e){}
	return panel;
}

adriver.prototype.addDiv = function (o, params, inner){
	var n = null;
	try {
		n = document.createElement("DIV");
		for (var i in params){ n.style[i] = params[i] } 
		if (inner) n.innerHTML = inner;
		o.insertBefore(n, o.firstChild); 
	}catch(e){}
	return n;
}

function adriver_dispatcher(ph, panel, command, arg){
	debug("dispatching " + command + ": " + arg + " to " + ph + "." + panel);
	try {
		var a = adriver.items[ph];
		if (a && a.dispatch) a.dispatch(panel, command, arg);
	} catch (e) {}
}

//============optional components=================//
