document.write('<script src="js/prototype/protoload/protoload.js" type="text/javascript"></script>');
document.write('<link href="js/prototype/protoload/protoload.css" rel="stylesheet" type="text/css" />');

function ProtoloadApp(element, className, timeUntilShow, hideMode, message)
{
	this.E = element ? $(element): "";
	this.className = (className == undefined)? 'waiting' : className;
	this.timeUntilShow = (timeUntilShow == undefined)? Protoload.timeUntilShow : timeUntilShow;
	this.hideMode = (hideMode == undefined)? Protoload.hideMode : hideMode;
	this.message = (message == undefined)? Protoload.message : message;

	this.start = function() {
		this.E.startWaiting(this.className, this.timeUntilShow, this.hideMode, this.message);
	}

	this.stop = function() {
		this.E.stopWaiting();
	}
}
function loadSection(_this, url, params, responseTo, method, className, onLoading)
{
	var _method = 'get', _params = '', _className = 'bigWaiting waiting_transparent_bg', _onLoading = 'none';

	if (method != undefined || method == '') _method = method;
	if (params != undefined  || params == '') _params = params;
	if (responseTo == undefined  || responseTo == '') alert('responseTo is not an object');
	if (className != undefined  || className == '') _className = className;
	if (_onLoading != undefined  || _onLoading == '') _onLoading = onLoading;

	var loadmessage = new ProtoloadApp(responseTo, _className, 0);
	loadmessage.start();

	new Ajax.Updater(responseTo, url, {
		method: _method,
		//contentType: 'application/x-www-form-urlencoded',
		parameters: _params,
		evalScripts: true,
		onComplete: function(transport) {
			loadmessage.stop();
			if (responseTo == 'main_content' && $(responseTo).getHeight() < 520) $(responseTo).style.height = 520 + 'px';
			$A($$('a')).each(function x(link) { link.onmouseover = function() {window.status = ''; return true; } } );
		},
		onException: function(transport){ alert('Something went wrong... ' + transport.responseText)/**/ }
	});
}


function showHideDescr(obj, el, currFileName)
{
	var element = $(el);
	var object = $(obj);
	if (element.visible()) {
		element.hide();
		obj.className = 'closed';
	}
	else {
		element.show();
		obj.className = 'open';
	}
	$('currFile').innerHTML = ' &gt; ' + currFileName;
}

function redirect(url) {
	document.location = url;
}