function open_l(name) {


 		//elem = eval("document.all."+name);
		if (document.getElementById(name)!=null)
		{
 		elem = document.getElementById(name);
		if (elem.style.display == "none" || !elem.style.display) {
			elem.style.display = "block";
		} else {
			elem.style.display = "none";
		}
		}
	}

	var winH;
	var winW;
	var winUrl;
	var winProp;
	var scrol;

function popUpOpen (winUrl, winW, winH)
{
//функция открывает заданный файл в заданных размерах окна
		scrol = 1;
		winProp = "toolbar=0,resizable=0,fullscreen=0,scrollbars="+scrol+",left=50,top=50,height="+winH+",width="+winW;
		window.open(winUrl,'',winProp);
}

function popUpOpenNS (winUrl, winW, winH)
{
//функция открывает заданный файл в заданных размерах окна без скроллинга
		scrol = 0;
		winProp = "toolbar=0,resizable=0,fullscreen=0,scrollbars="+scrol+",left=50,top=50,height="+winH+",width="+winW;
		window.open(winUrl,'',winProp);
}

function Foto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}


// ## Скрипт отправки сообщения об ошибке ##
// ## ----------------------------------- ##
var loc = window.location;
var mis;
nN = navigator.appName;

function winop()
{// Путь к php скрипту транспортеру
phploc = "/_shell/error_send.php";
windop = window.open
(phploc,"mywin","height=455,width=520");}

function getText(e)
{        if (!e) e= window.event;
        if((e.ctrlKey) && ((e.keyCode==10)||(e.keyCode==13)))
        {if(nN == 'Microsoft Internet Explorer')
{if(document.selection.createRange())
{var range = document.selection.createRange();
        mis = range.text;
winop();}}
else
{if (window.getSelection())
{mis = window.getSelection();
winop();}

else if(document.getSelection())
{mis = document.getSelection();
winop();}}
    return true;}
    return true;}

document.onkeypress = getText;

// ## ----------------------------------- ##