
	function getPageSize()
	{
		var xScroll, yScroll;
	
		if (window.innerHeight && window.scrollMaxY) {
			xScroll = window.innerWidth + window.scrollMaxX;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
	
		var windowWidth, windowHeight;

		if (self.innerHeight) {	// all except Explorer
			if(document.documentElement.clientWidth){
				windowWidth = document.documentElement.clientWidth;
			} else {
				windowWidth = self.innerWidth;
			}
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}
	
		// for small pages with total height less then height of the viewport
		if(yScroll < windowHeight){
			pageHeight = windowHeight;
		} else {
			pageHeight = yScroll;
		}

		// for small pages with total width less then width of the viewport
		if(xScroll < windowWidth){
			pageWidth = xScroll;
		} else {
			pageWidth = windowWidth;
		}
	
		arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
		return arrayPageSize;
	}

	function submitenter(myfield,e)
	{
		var keycode;
		if (window.event)
			keycode = window.event.keyCode;
		else if (e)
			keycode = e.which;
		else
			return true;
		if (keycode == 13)
		{
			dologin();
			return false;
		}
		else
			return true;
	}

	/*
	function openTerms(w, h, u)
	{
		win = open(u, "terms", "width=" + w + ",height=" + h + ",status=no,menubar=no,resizable=no,location=no,scrollbars=yes");
	}

	function chgThematic(obj, id)
	{
		var objs = document.getElementsByTagName('div');
		
		for (var i = 0; i < objs.length; i++)
		{
			if(objs[i].className == "class" + id)
			{
				if (obj.checked)
				{
					objs[i].style.display = '';
				} else 
				{
					objs[i].style.display = 'none';
					for (var j = 0; j < document.wsForm.elements.length; j++)
					{
						if(document.wsForm.elements[j].type == "checkbox" && document.wsForm.elements[j].className == "class" + id)
						{
							document.wsForm.elements[j].checked = false;
						}
					}
				}
			}
		}
	}
	*/
	function oc(cbo, dvn)
	{
		if (cbo.checked)
		{
			document.getElementById(dvn).style.display = "none";
		} else 
		{
			document.getElementById(dvn).style.display = "block";
		}
	}
	
	function oc2(url, type, value)
	{
		if (type == "registration")
		{
			document.getElementById("registration").style.display = "block";
			document.getElementById("inquire").style.display = "none";
		} else
		{
			document.getElementById("registration").style.display = "none";
			document.getElementById("inquire").style.display = "block";
		}
		
		// form reset
		
		if (url.indexOf("?") < 0)
		{
			url += "?";
		}
		
		var td = dojo.xhrPost({
			url: url + "&xhr=resetRegistration&value=" + value + "&type=" + type,
			mimetype: "text/plain",
			encoding: "utf-8",
			load: function (data)
			{
				// ign.
			},
			error: function (data)
			{
				alert(lngArr['common']['xhrError']);
			}
		});
		
		// megváltoztatjuk az árakat
		
		chgConferencePrices(value, url);
		
		document.location.href = '#form';
	}
	
	function removeParticipant(id)
	{
		var pParent = document.getElementById("participants");
		pParent.removeChild(document.getElementById(id));
		document.wsForm.numOfPersons.value--;
	}
	
	function addParticipant(url)
	{
		var outHtml = '';
		var num = document.wsForm.numOfPersons.value;
		
		if (num >= maxParticipants)
		{
			alert(lngArr['registration']['limitReached']);
			return;
		}
		
		num++;
		
		if (url.indexOf("?") < 0)
		{
			url += "?";
		}
		
		var td = dojo.xhrPost({
			url: url + "&xhr=getTemplate&i=" + num,
			mimetype: "text/html",
			encoding: "utf-8",
			load: function (data)
			{
				document.wsForm.numOfPersons.value++;
				outHtml += '<div id="participant_' + num + '">';
				outHtml += data;
				outHtml += '<div class="nfc"></div>';
				outHtml += '<img style="cursor:pointer;" onclick="removeParticipant(\'participant_' + num + '\');" src="' + templateDir + '/gfx/butt_removedelegate.gif" onmouseover="this.src=\'' + templateDir + '/gfx/butt_removedelegate_over.gif\';" onmouseout="this.src=\'' + templateDir + '/gfx/butt_removedelegate.gif\';" />';
				outHtml += '<div class="nfc dottedSeparator"></div>';
				outHtml += '</div>';
				document.getElementById("participants").innerHTML += outHtml;
			},
			error: function (data)
			{
				alert(lngArr['common']['xhrError']);
			}
		});
	}
	
	function chgConferencePrices(id, url)
	{
		var pObj = document.getElementById("prices");
		if (pObj)
		{
			if (url.indexOf("?") < 0)
			{
				url += "?";
			}
		
			var td = dojo.xhrPost({
				url: url + "&xhr=getConferencePrices&ID=" + id,
				mimetype: "text/json-comment-filtered",
				encoding: "utf-8",
				load: function (data)
				{
					var pData = eval(data); // json adattömb
					outHhtml = '';
					for (var i = 0; i < pData.length; i++) // feltöltjük a cuccal
					{
						if (pData[i]['name'] != '')
						{
							outHhtml += '<input type="radio" name="price" id="p_' + pData[i]['ID'] + '" value="' + pData[i]['ID'] + '" /><label for="p_' + pData[i]['ID'] + '">&nbsp;' + pData[i]['name'] + ' - ' + pData[i]['price'] + '</label>';
							outHhtml += '<br />';
						}
					}
					pObj.innerHTML = outHhtml;
				},
				error: function (data)
				{
					alert(lngArr['common']['xhrError']);
				}
			});
		}
	}