function clear(){
    if (document.login_form.username.value != "")
		document.login_form.userpass.focus();
    else
		document.login_form.username.focus();
}


function check_delete(eform){
    if (confirm("Figyelem!\nBiztos törli ezt az adatlapot?\nAz összes kapcsolódó adat törlésre kerül!!!"))
	eform.submit();
    else
	return false;
}

function check_delete_answer(eform){
    if (confirm("Figyelem!\nBiztos törli ezt a választ?\nAz összes kapcsolódó adat törlésre kerül!!!"))
	eform.submit();
    else
	return false;
}


function ablak(file,scroll,width,height,name) {
    nagyablak =window.open('',name,'top=0,left=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+scroll+',resizable=0,width='+width+',height='+height);
    nagyablak.document.open();
    nagyablak.document.write("<html><head><title>Popup</title><LINK rel=\"stylesheet\" href=\"themes/style_common.css\" type=\"text/css\"></head><body bgcolor=#ffffff leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>");
    nagyablak.document.write("<div align=center><a href='javascript:window.close()'><img src='"+file+"' border='1' alt='"+name+"' class=\"pic\"></a></div>");
    nagyablak.document.write("</body></html>");
    nagyablak.document.close();
} 


function pic_window(url,scroll,width,height){
	if (url != '') {
		window.open(url,'','scrollbars='+scroll+',width='+width+',height='+height+',top=0,left=0');
	}
}

function user_window(url,scroll,width,height){
	if (url != '') {
		window.open(url,'','scrollbars='+scroll+',width='+width+',height='+height+',top=0,left=0');
	}
}

function images_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=0,width=730,height=640,top=0,left=0');
	}
}

function gallery_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=0,width=800,height=640,top=0,left=0');
	}
}

function print_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=1,width=600,height=550,top=0,left=0');
	}
}

function email_window(url){
	if (url != '') {
		window.open(url,'','scrollbars=0,width=575,height=380,top=0,left=0');
	}
}

function prospektus() {
	window.open('http://www.skiing.hu/files/prospektus.html','Prospekt','top=0,left=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=1024,height=720');
} 

function features_list($url) {
	window.open($url,'','top=0,left=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=770,height=550');
	return false;
}

function check_email_form(eform){
    var hiba = "";
    
    if (eform.to_email.value == "") hiba = hiba + "Kérjük adja meg a címzett E-mail címét!\n";
    if (eform.from_name.value == "") hiba = hiba + "Kérjük adja meg az Ön nevét!\n";
    
    if (hiba != ""){
	alert(hiba);
	return false;
    }
        
    if (eform.to_name.value == "") hiba = hiba + "A címzett neve\n";
    if (eform.from_email.value == "") hiba = hiba + "Az Ön e-mail címe\n";
    if (eform.message.value == "") hiba = hiba + "Üzenet szövege\n";
    if (hiba != ""){
	if (confirm("A következő mezők nem lettek kitöltve:\n\n"+ hiba + "\nBiztos, hogy elküldi?"))
	    eform.submit();
	else{
	    return false;
	}    
    }
    else{
	eform.submit();
    }
}

function checkbox_change(chk){
	var x = document.filterform.elements["manufacturers["+chk+"]"];
	if (x.checked == true){
		x.checked = false;
	}else{
		x.checked = true;
	}
}
