var appImgZoomWnd = null;

function openPage(url,wndname,width,height,center,scrollbars,resize,status) 
{ 
	var left = 25; 
	var top = 25; 

	if(center == true) 
	{ 
		left = (screen.width - width)/2; 
		top = (screen.height - height)/2; 
	} 

	scrollbars = ( (scrollbars == undefined) || (scrollbars == false) ) ? 0 : 1;
	resize = ( (resize == undefined) || (resize == false) ) ? 0 : 1;

	var winStats='toolbar=no,location=no,directories=no,menubar=no,'; 
		winStats+='scrollbars='+scrollbars+',resizable='+resize+',width='+width+',height='+height; 
		winStats+= ((status) ? ',status=yes' : ',status=no');


	if (navigator.appName.indexOf("Microsoft")>=0) 
		winStats+=',left='+left+',top='+top; 
	else 
		winStats+=',screenX='+left+',screenY='+top; 
	
	apopup=window.open(url,wndname,winStats) 
	apopup.window.focus(apopup) 

	return apopup;
} 

function postLogin()
{
	var form = document.forms['frmLogin'];

	if( check_input(form.password,'text','Type the password!') )
	    form.submit();
}

function postSignup()
{
	var form = document.forms['frmSignup'];

	if( check_input(form.name,'text','Add meg a neved!') )
	    if( check_input(form.tel,'text','Add meg a telefonszámod!') )
	        if( check_input(form.birthyear,'text','Add meg a születési éved!') )
	            if( check_input(form.color_hair,'text','Add meg a hajszínedet!') )
	                if( check_input(form.color_eye,'text','Add meg a szemszínedet!') )
	                    if( check_input(form.height,'text','Add meg a magasságodat!') )
	                        if( check_input(form.weight,'text','Add meg a súlyodat!') )
	                            if( check_file(form.file_attch1,'','Válassz ki két képet!') )
	                                if( check_file(form.file_attch2,'','Válassz ki két képet!') )
                                	    form.submit();
}