<!--

	function showFlash(movie, name, width, height) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width + '" height="' + height + '" id="' + name + '" align="middle">');
		document.write('<param name="allowScriptAccess" value="sameDomain" />');
		document.write('<param name="movie" value="' + movie + '" />');
		document.write('<param name="quality" value="high" />');
		document.write('<param name="wmode" value="transparent" />');
		document.write('<param name="bgcolor" value="#ffffff" />');
		document.write('<embed src="' + movie + '" wmode="transparent" quality="high" bgcolor="#ffffff" width="' + width + '" height="' + height + '" name="' + name + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('</object>');
	}

	function newImage(arg) {
		if (document.images) {
			rslt = new Image();
			rslt.src = arg;
			return rslt;
		}
	}
	
	function changeImages() {
		if (document.images) {
			for (var i=0; i<changeImages.arguments.length; i+=2) {
				document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
			}
		}
	}

	function layerVisibility (id, vis) {
		document.getElementById(id).style.visibility=vis;
	}

	function changeLayerVisibility (id) {
		if (document.getElementById(id).style.display == "none") {
			document.getElementById(id).style.display = "block";
		} else {
			document.getElementById(id).style.display = "none";
		}
	}

	function changeBackground(id, bgColor) {
		document.getElementById(id).style.background = bgColor;
	}

	function img_popup(kep, width, height) {
		wnd = popUp("img_popup.php?kep=" + kep,"wnd", height, width);
	}

	function popUp(url, windowName, height, width) {
		var wnd = window.open(url, windowName, "height="+height+",width="+width+",status=no,menubar=no,resizable=no,directories=no,locationbar=no");
		wnd.focus();
	}

	function popUpScroll(url, windowName, height, width) {
		var wnd = window.open(url, windowName, "height="+height+",width="+width+",status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes");
		wnd.focus();
	}

	function popUpTimeOut(url, windowName, height, width, msec) {
		var tid = window.setTimeout("popUp("+url+","+windowName+","+height+","+width+")",msec);
	}

	function popUpResizable(url, windowName, height, width) {
		var wnd = window.open(url, windowName, "height="+height+",width="+width+",status=yes,menubar=no,resizable=yes,directories=no,locationbar=yes,scrollbars=yes");
		wnd.focus();
	}

	function imagePick(target_field, target_preview, _x, _y) {
		var pickerWindow = popUp("webutils/image_picker.php?trgt_fld="+target_field+"&trgt_prw="+target_preview+"&_x="+_x+"_y="+_y, "pickerWindow", "120", "320");
	}

	function filePick() {
		var pickerWindow = popUp("webutils/file_picker.html", "pickerWindow", "200", "100");
	}

	function clock() {
		var runTime = new Date();
		var hours = runTime.getHours();
		var minutes = runTime.getMinutes();
		var seconds = runTime.getSeconds();
		if (hours == 0) {
			hours = 12;
		}
		if (hours <= 9) {
			hours = "0" + hours;
		}
		if (minutes <= 9) {
			minutes = "0" + minutes;
		}
		if (seconds <= 9) {
			seconds = "0" + seconds;
		}
		movingtime = hours + ":" + minutes + ":" + seconds;
		if (document.layers) {
			document.layers.clocklayer.document.write(movingtime);
			document.layers.clocklayer.document.close();
		}
		else {
			document.all.clocklayer.innerHTML = movingtime;
		}
		setTimeout("clock()", 1000)
	}

	// char converter
	/////////////////
	
	function fromCode(code) {
		return String.fromCharCode(code);
	}
	
	function convert(text) {
		flood = 0;
		while (text.indexOf("&#") != -1) {
			i = text.indexOf("&#") + 2;
			cserelendo = parseInt(text.substring(i,i+3));
			mire = fromCode(cserelendo);
			mit = text.substring(i-2,i+4);
			text = text.replace(mit, mire);
		}
		return text;
	}
	
	function toCode(code) {
		return code.charCodeAt(0);
	}
	
	function convertBack(text) {
	
		stdChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVXYZ0123456789 -!@#$%^&*(),./;'[]\?:{}|+_~";
		
		i = 0;
		while (i<text.length && !(i>1000)) {
			if (stdChars.indexOf(text.charAt(i)) < 0) {
				text = text.replace(text.charAt(i),"&#" + toCode(text.charAt(i)) + ";");
				i += 5;
			}
			i += 1;
		}
	
		return text;
	}
	
	
	// regisztracio
	///////////////

	function chkMail(mail) {
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(mail)) {
			return true;
		} else {
			return false;
		}
	}

	function isNum(sText) {
		var ValidChars = "0123456789";
		var IsNumber = true;
		var Char;
		
		for (i = 0; i < sText.length && IsNumber == true; i++) { 
			Char = sText.charAt(i); 
			if (ValidChars.indexOf(Char) == -1) {
				IsNumber = false;
			}
		}
		return IsNumber;
	}
	
	function isFloat(sText) {
		var ValidChars = "0123456789,.";
		var IsNumber = true;
		var Char;
		
		for (i = 0; i < sText.length && IsNumber == true; i++) { 
			Char = sText.charAt(i); 
			if (ValidChars.indexOf(Char) == -1) {
				IsNumber = false;
			}
		}
		return IsNumber;
	}

	function getRadioValue(radioArray) {
		var res = null;
		for (i = 0; i < radioArray.length; i++) {
			if (radioArray[i].checked) {
				res = radioArray[i].value;
				break;
			}
		}
		return res;
	}
	
	
	// fCMS gallery
	///////////////
	
	function fGalleryShow(gallery_id, width, height) {
		var window_width = width;
		var window_height = height;
		var window_top = (screen.height - window_height) / 2;
		var window_left = (screen.width - window_width) / 2;
		newWindow = window.open('fcms_gallerypopup.php?gallery_id=' + gallery_id, 'fGalleryPopup', 'width = ' + window_width + ', height = ' + window_height + ', top = ' + window_top + ', left = ' + window_left + ', scrollbars = no, resizable = no, status = yes');
		newWindow.focus();
	}
	
	
	// classcserelgeto
	//////////////////
	
	function changeClass(id, className) {
		obj = document.getElementById(id);
		if (obj) obj.className = className;
	}
	
	
	// common
	/////////
	
	function jumpTo(url) {
		window.location.href = url;
	}
	
	
	// layer show/hide
	//////////////////
	
	function Is() {
		  agent  = navigator.userAgent.toLowerCase();
		  this.major = parseInt(navigator.appVersion);
		  this.minor = parseFloat(navigator.appVersion);
		  this.ns    = ((agent.indexOf('mozilla')   !=   -1) &&
							((agent.indexOf('spoofer')   ==   -1) &&
							(agent.indexOf('compatible') ==   -1)));
		  this.ns4   = (this.ns && (this.major      <=    4)&&
							(this.minor                  <     5));
		  this.ns6   = (this.ns && (this.major      >=    5));
		  this.ie    = (agent.indexOf("msie")       !=   -1);
		  this.ie4   = (this.ie && (this.major      ==    4) &&
							(agent.indexOf("msie 5.0")   ==   -1));
		  this.ie5   = (this.ie && (this.major      ==    4) &&
							(agent.indexOf("msie 5.0")   !=   -1));
	}
	
	var is = new Is();
	
	if (is.ns4) {
		 doc = "document.";
		 sty = "";
	} else if (is.ie) {
		 doc = "document.all.";
		 sty = ".style";
	} else if (is.ns6) {
		 doc = "document";
		 sty = ".style";
		 htm = ""
		 xpos = "event.x";
		 ypos = "event.y";
	}

	function menu_nyito(layer) {
	
		 if (is.ns6) {
			  Menu_Object = eval(doc + ".getElementById(layer)" + sty);
		 } else {
			  Menu_Object = eval(doc + layer + sty);
		 }
	
		 if (eval(Menu_Object.visible)) {
			  clearTimeout(Menu_Object.hide);
		 }
		 Menu_Object.visibility = 'visible';
	
	}
	
	function menu_csuko(layer) {
	
		 if (is.ns6) {
			  Menu_Object = eval(doc + ".getElementById(layer)" + sty);
		 } else {
			  Menu_Object = eval(doc + layer + sty);
		 }
		 Menu_Object.visible = true;
		 menu_csuk(layer);
	
	}
	
	function menu_csuk(layer) {
	
		 if (is.ns6) {
			  Menu_Object = eval(doc + ".getElementById(layer)" + sty);
		 } else {
			  Menu_Object = eval(doc + layer + sty);
		 }
	
		 if (eval(Menu_Object.visible)) {
			  clearTimeout(Menu_Object.hide);
		 }
		 Menu_Object.visibility = 'hidden';
	
	}
	
	
	// epitesz-gallery
	//////////////////
	
	function showEpiteszGallery() {
		popUpResizable("gallery/index.php", "epiteszGallery", 600, 800);
	}

//-->
