// JavaScript Document
	function closeFlash()
	{
		document.getElementById("flash_layer").style.display = "none";
	}

	function load_ny_flash()
	{
		var bodyW = document.body.clientWidth;
		var bodyH = document.body.clientHeight;

		var bnLeft = (bodyW - parseInt(document.getElementById("flash_layer").style.width)) / 2;
		var bnTop = (bodyH - parseInt(document.getElementById("flash_layer").style.height)) / 2;
		bnTop = (bnTop <= 0) ? 50 : bnTop;

		document.getElementById("flash_layer").style.left = parseInt(bnLeft) + "px";
		document.getElementById("flash_layer").style.top = parseInt(bnTop) + "px";

		document.getElementById("flash_layer").style.display = "block";
	}
	
var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height)
	{
		if (popUpWin)
		{
			if (!popUpWin.closed) popUpWin.close();
		}

		popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top);
	}

    function makesure() {
 if (confirm('Вы действительно хотите удалить эту запись?')) {
  return true;
 } else {
  return false;
 }
}

function flexToggle(el) {
  if (el.className == 'flexOpen') {
    el.className = 'flexShut';
  } else {
    el.className = 'flexOpen';
  }
}

function ge()
{
  var ea;
  for( var i = 0; i < arguments.length; i++ ) {
    var e = arguments[i];
    if( typeof e == 'string' )
      e = document.getElementById(e);
    if( arguments.length == 1 )
      return e;
    if( !ea )
      ea = new Array();
    ea[ea.length] = e;
  }
  return ea;
}


function hide()
{
  for( var i = 0; i < arguments.length; i++ ) {
    var element = ge(arguments[i]);
    if (element && element.style) element.style.display = 'none';
  }
}

function shown(el) {
    el = ge(el);
    return (el.style.display != 'none');
}

function shide(el) {if (shown(el)) {hide(el);} else {show(el);}}



function placeholderSetup(id) {
	var el = ge(id);
	if(!el) return;
	if(el.type != 'text') return;
	if(el.type != 'text') return;

	var ph = el.getAttribute("placeholder");
	if( ph && ph != "" ) {
		el.value = ph;
		el.style.color = '#777';
		el.is_focused = 0;
		el.onfocus = placeholderFocus;
		el.onblur = placeholderBlur;
	}
}

function placeholderFocus() {
  if(!this.is_focused) {
    this.is_focused = 1;
    this.value = '';
    this.style.color = '#000';

    var rs = this.getAttribute("radioselect");
    if( rs && rs != "" ) {
      var re = document.getElementById(rs);
      if(!re) { return; }
      if(re.type != 'radio') return;

      re.checked=true;
    }
  }
}

function placeholderBlur() {
  var ph = this.getAttribute("placeholder")
  if( this.is_focused && ph && this.value == "" ) {
		this.is_focused = 0;
    this.value = ph;
    this.style.color = '#777';
  }
}
function RunSwf()

{

document.write('    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="135" height="84" id="knopka01+" align="middle">\n');
document.write('    <param name="allowScriptAccess" value="sameDomain" />                                                                                                                                                                  \n');
document.write('    <param name="allowFullScreen" value="false" />                                                                                                                                                                           \n');
document.write('    <param name="movie" value="images/knopka01+.swf?finsfera=http://www.e-learningcenter.ru/finsfera/ " />                                                                                                                  \n');
document.write('    <param name="quality" value="high" />                                                                                                                                                                                    \n');
document.write('    <param name="bgcolor" value="#000000" />                                                                                                                                                                                  \n');
document.write('   <embed src="images/knopka01+.swf?finsfera=http://www.e-learningcenter.ru/finsfera/ " quality="high" bgcolor="#000000" width="135" height="84" name="knopka01+" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('    </object>\n');
document.write('</td><td>\n');
document.write('    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="135" height="84" id="knopka02+" align="middle">\n');
document.write('    <param name="allowScriptAccess" value="sameDomain" />\n');
document.write('    <param name="allowFullScreen" value="false" />\n');
document.write('    <param name="movie" value="images/knopka02+.swf?promish=http://www.e-learningcenter.ru/promish/" />\n');
document.write('    <param name="quality" value="high" />\n');
document.write('    <param name="bgcolor" value="#000000" />\n');
document.write('    <embed src="images/knopka02+.swf?promish=http://www.e-learningcenter.ru/promish/" quality="high" bgcolor="#000000" width="135" height="84" name="knopka01+" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('    </object>\n');
document.write('</td></tr>\n');
document.write('<tr><td>\n');
document.write('    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="135" height="84" id="knopka03+" align="middle">\n');
document.write('    <param name="allowScriptAccess" value="sameDomain" />\n');
document.write('    <param name="allowFullScreen" value="false" />\n');
document.write('    <param name="movie" value="images/knopka03+.swf?sferayslug=http://www.e-learningcenter.ru/sferayslyg/" />\n');
document.write('    <param name="quality" value="high" />\n');
document.write('    <param name="bgcolor" value="#000000" />\n');
document.write('    <embed src="images/knopka03+.swf?sferayslug=http://www.e-learningcenter.ru/sferayslyg/" quality="high" bgcolor="#000000" width="135" height="84" name="knopka01+" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('    </object>\n');
document.write('</td>\n');
document.write('<td>\n');
document.write('    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="135" height="84" id="knopka04+" align="middle">\n');
document.write('    <param name="allowScriptAccess" value="sameDomain" />\n');
document.write('    <param name="allowFullScreen" value="false" />\n');
document.write('    <param name="movie" value="images/knopka04+.swf?academ=http://www.e-learningcenter.ru/academ/" />\n');
document.write('    <param name="quality" value="high" />\n');
document.write('    <param name="bgcolor" value="#000000" />\n');
document.write('    <embed src="images/knopka04+.swf?academ=http://www.e-learningcenter.ru/academ/" quality="high" bgcolor="#000000" width="135" height="84" name="knopka01+" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('    </object>\n');
document.write('</td></tr><tr><td>\n');
document.write('    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="135" height="84" id="knopka05+" align="middle">\n');
document.write('    <param name="allowScriptAccess" value="sameDomain" />\n');
document.write('    <param name="allowFullScreen" value="false" />\n');
document.write('    <param name="movie" value="images/knopka05+.swf?rozn=http://www.e-learningcenter.ru/rozn/" />\n');
document.write('    <param name="quality" value="high" />\n');
document.write('    <param name="bgcolor" value="#000000" />\n');
document.write('    <embed src="images/knopka05+.swf?rozn=http://www.e-learningcenter.ru/rozn/" quality="high" bgcolor="#000000" width="135" height="84" name="knopka01+" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('    </object>\n');
document.write('</td><td>\n');
document.write('    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="135" height="84" id="knopka06+" align="middle">\n');
document.write('    <param name="allowScriptAccess" value="sameDomain" />\n');
document.write('    <param name="allowFullScreen" value="false" />\n');
document.write('    <param name="movie" value="images/knopka06+.swf?polit=http://www.e-learningcenter.ru/polit/" />\n');
document.write('    <param name="quality" value="high" />\n');
document.write('    <param name="bgcolor" value="#000000" />\n');
document.write('    <embed src="images/knopka06+.swf?polit=http://www.e-learningcenter.ru/polit/" quality="high" bgcolor="#000000" width="135" height="84" name="knopka01+" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('    </object>\n');


}
function RunSwf2()

{

document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" width="190" height="100">\n');
document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
document.write('<param name="movie" value="/images/partners.swf" />\n');
document.write('<param name="quality" value="high" />\n');
document.write('<param name="loop" value="true" />\n');
document.write('<param name="bgcolor" value="#ffffff" />\n');
document.write('<embed src="/images/partners.swf" quality="high" bgcolor="#ffffff" width="190" height="100"  align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
document.write('</object>\n');
}

 function AniOver(objId)
	{
		document.getElementById(objId).src = tree_highlited.src;
	}

	function AniOut(objId)
	{
		document.getElementById(objId).src = tree_default.src;
	}

    function ShowSplash(objId, imgW, imgH, borderW)
	{
		splash = document.getElementById(objId);

		var clientWidth = document.body.clientWidth;
		var clientHeight = document.body.clientHeight;

		var _top, _left;
		if (parseInt(clientWidth) > imgW) _left = parseInt((clientWidth - imgW) / 2);
		else _left = 5;

		if (parseInt(clientHeight) > imgH) _top = parseInt((clientHeight - imgH) / 2);
		else _top = 5;

		with (splash.style)
		{
			zIndex = 2;
			width = imgW;
			height  = imgH;
			top = _top;
			left = _left;
			display = "block";
		}
	}

	function HideSplash(objId)
	{
		splash = document.getElementById(objId);
		splash.style.display = "none";
	}