function popup(url,width,height) {
        window.open(url,null,'width='+width+', height='+height+', menubar=no, scrollbars=no, resize=no');
}

function popup_rand(url,width,height) {
        var rand = Math.floor(Math.random() * 100000);
        window.open(url,rand,'width='+width+', height='+height+', menubar=no, scrollbars=no, resize=no');
}

function popup_rand_center(url,width,height) {
        var rand = Math.floor(Math.random() * 100000);
        var winl = (screen.width - width) / 2;
        var wint = (screen.height - height) / 2;
        window.open(url,rand,'width='+width+', height='+height+', top='+wint+', left='+winl+', menubar=no, scrollbars=no, resize=no');
}


function popup_wbar(url,width,height) {
        window.open(url,null,'width='+width+', height='+height+', menubar=no, scrollbars=yes, resize=no');
}

function passwordField(){
	
	if ( document.getElementById('passwordfield').type == 'text' ){
		
		document.getElementById('loginfield').value='';
			
		document.getElementById('pass').innerHTML='<input type="password" name="param[pass]" class="loginform" id="passwordField">';
			
		
	}
}


function confirmRcDelete ( id, set_id ){
    
    if ( confirm("Valóban törölni akarod?") ){
        document.location.href='index.php?main=main&page=sajat&sub=del&id=' + id + "&set_id=" + set_id;
    }
    
}

function confirmFullRcDelete ( user_id, id ){
    
    if ( confirm("Valóban törölni akarod?") ){
        document.location.href='index.php?main=main&page=sajat&sub=del_set&id=' + id +'&user_id=' + user_id;
    }
    
}
