// JavaScript Document
var newwindow;

function popupKulsolink(url){
		var width=650;
		var height=500;
					
					
    // set position to center
       var xMax=screen.width, yMax=screen.height;
    // calculate the window left-up corner
       var xOffset=(xMax - width )/2;
       var yOffset=(yMax - height)/2; 
				 
        // ezzel a firefoxnak gondja volt.
        // var windowname = url.replace(/[./]/gi, ""); // igy az url lesz pont es / nelkul az ablaknev
		var today = new Date();
        var windowname = today.getTime(); // ezredmasodperc pontossagu timestamp


	//alert(xOffset);
	newwindow=window.open(url, windowname, "width="+width+",height="+height+",toolbar=1,status=1,scrollbars=1,resizable=1,top="+yOffset+",left="+xOffset);
	return(false); 
		}//f kulsolink
function popup(url)
{
	var width=450;
	var height=350;
					
					
    // set position to center
       var xMax=screen.width, yMax=screen.height;
    // calculate the window left-up corner
       var xOffset=(xMax - width )/2;
       var yOffset=(yMax - height)/2; 
				 
        // ezzel a firefoxnak gondja volt.
        // var windowname = url.replace(/[./]/gi, ""); // igy az url lesz pont es / nelkul az ablaknev
	var today = new Date();
        var windowname = today.getTime(); // ezredmasodperc pontossagu timestamp


	//alert(xOffset);
	newwindow=window.open(url, windowname, "width="+width+",height="+height+",toolbar=0,status=0,scrollbars=1,resizable=1,top="+yOffset+",left="+xOffset);
	return(false); 
	}
	
	/********************************************/
	
function string_igazitasa(adat, elfoglalt_karakterek_szama)
{  // most jobbra igazitunk.
	out = '' + adat;
	
	// ha kilog, visszaadjuk alapbol.
	if (out.length > elfoglalt_karakterek_szama) return out;
	
	var space='';
	var i = 0;
	for		(i=0;i<elfoglalt_karakterek_szama-out.length;i++) 	{
			space = space + ' ';
			}//for
	return space + out;
}//szam_kimenet_kitoltese	




