function _(sId){return document.getElementById(sId);}

function showHide(el,show,dispStyle)
{
	if (!dispStyle) dispStyle = 'block';
	var _e = _(el);
	if (show)
		_e.style.display=dispStyle;
	else
		_e.style.display='none';
}
function togggle(el)
{
	var _e = document.getElementById(el);
	if(_e.style.display=='' || _e.style.display=='none')
		_e.style.display='block';
	else
		_e.style.display='none';
}
function showImg(path, title, winName)
{
	window.open('showImg.htm?i='+encodeURI(path)+'&title='+encodeURI(title),winName,'toolbar=no,status=yes,location=no,menubar=no,width=200,height=100,left=150,top=50');
}
function showImgGl(path,title,descr,winName)
{
	window.open('showImgGl.htm?i='+encodeURI(path)+'&amp;title='+encodeURI(title)+'&amp;descr='+encodeURI(descr),winName,'resizable=yes,toolbar=no,status=yes,location=no,menubar=no,width=200,height=100,left=150,top=0');
}
// -----------------------------------------------------------------------------

function fReq(virgullu)
{
	var names = virgullu.split(',');
	var elArr;
	var el;
	for (i=0; i<names.length; i++) {
		elArr = document.getElementsByName(names[i]);
		el = elArr[0];
		var ck = true;
		if (el.type == 'radio') {
			ck = false;
			for (j=0; j<elArr.length; j++)
				if (elArr[j].checked) ck = true;
		}
		if (el.value=='' || !ck) {
			alert(FREQ1+el.title+FREQ2);
			el.focus();
			return false;
		}
	}
	return true;
}

// -----------------------------------------------------------------------------

var gecisEfekt = Class.create();
gecisEfekt.prototype = {
	elems: null,
	numElems: 0 ,
	fnEffect: Effect.Appear,
	fnArgs: {duration: 0.7},
	mOver: false,
	pos: 1,
	initialize: function(sCss, fInterval, bPauseOnMouseOver, fnEffect, fnArgs) {
		this.elems = $$(sCss);
		if (this.elems.size() <= 0) {
			return false;
		}
		this.numElems = this.elems.size();
		this.fnEffect = fnEffect || this.fnEffect;
		this.fnArgs = fnArgs || this.fnArgs;

		if (bPauseOnMouseOver) {
			this.elems.each(function(s) {
				Event.observe(s, 'mouseover', function(){
					this.mOver = true;
				}.bind(this));
				Event.observe(s, 'mouseout', function(){
					this.mOver = false;
				}.bind(this));
			}.bind(this));
		}

		new PeriodicalExecuter(
			function() {
				if (!this.mOver) {
					this.elems[this.pos-1].hide();
					this.pos < this.numElems ? this.pos++ : this.pos = 1;
					this.fnEffect(this.elems[this.pos-1], this.fnArgs);
				}
			}.bind(this)
		, fInterval);
	}
};

// -----------------------------------------------------------------------------

