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 popUpOpenARS (winUrl)
{
//функция открывает заданный файл в окне с возможностью ресайза.
		winProp = "width=300,height=200,scrollbars=no,left=50,top=50, toolbar=no,location=no,status=no,resizable=yes,screenX=50,screenY=50";
		window.open(winUrl,'',winProp);
}

function getMarks(el, type) {
	new Ajax.Request('/getdata/?type='+type+'&proid='+$F(el), {
	  method: 'get',
	  onSuccess: function(transport) {
	    var data = transport.responseText.split('|');
	    if (data[0]) {
	    	var sel = $(data[0]);
	    	sel.options.length = 0;
	    	for (var i=1; i< data.length; i++) {
	    		var item = data[i].split('*');
	    		if (item[0]) {
	    			sel.options[sel.options.length] = new Option(item[1], item[0]);
	    		}
	    	}
	  	}
		}
		});
}
function getMarksForId(el, type, id) {
	new Ajax.Request('/getdata/?type='+type+'&proid='+$F(el)+'&id='+id, {
	  method: 'get',
	  onSuccess: function(transport) {
	    var data = transport.responseText.split('|');
	    if (data[0]) {
	    	var sel = $(data[0]);
	    	sel.options.length = 0;
	    	for (var i=1; i< data.length; i++) {
	    		var item = data[i].split('*');
	    		if (item[0]) {
	    			sel.options[sel.options.length] = new Option(item[1], item[0]);
	    		}
	    	}
	  	}
		}
		});
}
