<!--
//- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
var n = 0;
var ie =0;
var browser=0;
var loc;

  function OpenWindow(url)
  {
  window.open(url);
  }

	function ImageOpen(image,width, height)
	{
	zoom = window.open("image.htm?pic="+image, "image", 'width = ' + width + ', height = ' + height + ',resizable=0,scrollbars=no,menubar=no,status=no');
	}

	function DialogOpen(url)
	{
	zoom = window.open(url, "dialog", 'width = 300, height = 200,resizable=0,scrollbars=no,menubar=no,status=no');
	}

function Menu(obj){
	this.css=(n) ? eval('document.'+obj):eval('document.all.'+obj+'.style')
   	this.ref=(n) ? eval('document.'+obj+'.document'):eval('document');
	this.height=n?this.ref.height:eval(obj+'.offsetHeight')
	this.x=(n)? this.css.left:this.css.pixelLeft;
	this.y=(n)? this.css.top:this.css.pixelTop;
	this.hideIt=hideIt;	this.showIt=showIt; this.moveIt=moveIt
	return this
}
function showIt(){this.css.visibility="visible"}
function hideIt(){this.css.visibility="hidden"}
function moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
function init(){
	Lay=new Array()
  for (i=0;i<nmenu;i++) {
    i1=i+1;
		eval("Lay["+i+"]=new Menu('divLay"+i1+"')");
  }

	Mn=new Array()
	Mn[0]
}

function menu(num)
{
	if(browser)
	{
			for(i=0;i<Lay.length;i++)
			{
				if(i!=num) Lay[i].hideIt()

			}
			Lay[num].showIt();
	}
}


function closeIt()
{
	if(browser)
	{
			for(i=0;i<Lay.length;i++)
			{
				Lay[i].hideIt();

			}
		}
}
function initall() {
n = (document.layers) ? 1:0;
ie = (document.all) ? 1:0;
browser=((n || ie) && parseInt(navigator.appVersion)>=4)
if (browser) init();
}

function Winopen(url, id, width, height)
{
if (!width) width=350;
if (!height) height=400;
if (loc!=id)
{
	zoom=window.open(url, id, 'width = '+width+' , height = '+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2))
	loc=id;
} else {
	zoom.close();
	zoom=window.open(url, id, 'width = '+width+' , height = '+height+',resizable=0,scrollbars=0,menubar=0,status=0, left='+Math.max(0,(screen.width-width)/2)+', top='+Math.max(0,(screen.height-height)/2))
	}
}

function to_change(act,fr_name){
w=eval('frames["'+fr_name+'"].document');
var k;
	with(w){
		s=selection.createRange().text;
		if (s) {
			switch(act) {
				case 'b': s=eval("'<b>'+s+'</b>'"); break;
				case 'i': s=eval("'<i>'+s+'</i>'"); break;
				case 'u': s=eval("'<u>'+s+'</u>'"); break;
				case 'h': s=eval("'<h>'+s+'</h>'"); break;
				case 'ol': s=eval("'<oli>'+s+'</oli>'"); break;
				case 'ul': s=eval("'<uli>'+s+'</uli>'"); break;
				case 'a': {k=prompt("Введите URL. Для ссылки на внешний ресурс следует указывать полный URL страницы (приставка http:// обязательна)",""); if (k) s=eval("'<a href=\"'+k+'\">'+s+'</a>'");} break;
				case 'a_target': {k=prompt("Введите URL. Для ссылки на внешний ресурс следует указывать полный URL страницы (приставка http:// обязательна)",""); if (k) s=eval("'<a href=\"'+k+'\" target=\"_blank\">'+s+'</a>'");} break;
				case 'a_mail': {k=prompt("Введите электронный адрес",""); if (k) s=eval("'<a href=\"mailto:'+k+'\">'+s+'</a>'");} break;
			}
			selection.createRange().text=s;
		}
	}
}
//-->
