function ow(file, wid, hei, bars, resiz, status) {

	xpos = (window.screen.width/2) - (wid/2);
	ypos = (window.screen.height/2) - (hei/2);

	specs = "toolbar=" + bars;
	specs+= ", width=" + wid;
	specs+= ", height=" + hei;
	specs+= ", left=" + xpos;
	specs+= ", top=" + ypos;
	specs+= ", status=" + status;
	specs+= ", scrollbars=" + bars;
	specs+= ", resizable=" + resiz;
	specs+= ", location=no, menubar=0, directories=0 ";

	window.open(file, "_blank", specs);

}










// ajax request  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #
function createREQ(url)
{
	var req = false;

	try
	{
		req = new XMLHttpRequest();
	}
	catch (trymicrosoft)
	{
		try
		{
			req = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (othermicrosoft)
		{
			try
			{
				req = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (failed)
			{
				req = false;
			}
		}
	}

	if (req)
	{
		REQ = req;
		REQurl = '/ajax/' + url;
	}

	if (!req)
		alert("Error initializing XMLHttpRequest!");
}










// element position calculate   #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #
function findXpos(obj)
{
	var x = 0;
	while (obj.offsetParent)
	{
		x+= obj.offsetLeft
		obj = obj.offsetParent;
	}
	return x;
}

function findYpos(obj) {
	var y = 0;
	while (obj.offsetParent)
	{
		y+= obj.offsetTop
		obj = obj.offsetParent;
	}
	return y;
}
// END element position calculate










function pleasewait()
{
//	var iebody=(document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body;
	if (window.innerWidth) //if browser supports window.innerWidth
	{
		dwid = window.innerWidth;
		dhei = window.innerHeight;
		DOSCx = pageXOffset;
		DOSCy = pageYOffset;
	}
	else if (document.all) //else if browser supports document.all (IE 4+)
	{
		var ie = 1;
		dwid = document.body.clientWidth;
		dhei = document.body.clientHeight;
		DSOCx = document.body.scrollLeft;
		DOSCy = document.body.scrollTop;
	}

	// utolso elem y pos
	var lastY = findYpos(document.getElementById('lastelement'));

	// takaro
	var fc = document.getElementById('full_cover');
	fc.style.height = lastY + 20;
	fc.style.display = 'block';

	// takaro iframe kocsog explorer
	if (ie==1)
	{
		var fcIF = document.getElementById('full_cover_IF');
		fcIF.style.height = lastY + 20;
		fcIF.style.display = 'block';
	}

	// please wait cucc
	var pw = document.getElementById('pleasewait');
	pw.style.left = (dwid/2) - 90;
	pw.style.top = DOSCy + (dhei/2) - 60;
	pw.style.visibility = 'visible';



}










