


function Preview(num,filenev){
	document.form1.action = filenev;
	document.form1.target="self";
	document.form1.prev.value=num;
}


function FlayerNagyit(n){
	ablak = open("flayer.php?ciid="+n, "", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=640, height=480, scrollbars=0");

}



function Rogzit(filenev){
	document.form1.action = filenev;
	document.form1.target="";
	document.form1.prev.value='';
}



function KepDialog(n,mod){
	//if(mod == 1){
		ablak = open("kepdialog.php?mod=1&num="+n, "kepdialog", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=417, height=342, scrollbars-1");
	//} else {
	//	ablak = open("./admin/kepdialog.php?mod=2&num="+n, "kepdialog", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=417, height=342, scrollbars-1");
	//}

}


function KepDialog2(n,d){
	//if(mod == 1){
		ablak = open("../ajanlatok/kepdialog.php?mod=1&num="+n, "kepdialog", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=417, height=342, scrollbars-1");
	//} else {
	//	ablak = open("./admin/kepdialog.php?mod=2&num="+n, "kepdialog", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=417, height=342, scrollbars-1");
	//}

}


function KepDialog3(n,d){
	//if(mod == 1){
		ablak = open("kepdialog.php?mod=1&num="+n+"&curr_dir="+d, "kepdialog", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=417, height=342, scrollbars-1");
	//} else {
	//	ablak = open("./admin/kepdialog.php?mod=2&num="+n, "kepdialog", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=417, height=342, scrollbars-1");
	//}

}



function KepDlgPreview(dir){
	fn = document.kepform.filenev.options[document.kepform.filenev.selectedIndex].value;
	document.images.previmg.src=dir+fn;
}


function KepDlgBeszur(dir,num){
	if(document.kepform.filenev.selectedIndex > -1){
		fn = document.kepform.filenev.options[document.kepform.filenev.selectedIndex].value;
		if(num == -1){
			opener.document.images.previmg.src = dir+fn;
			opener.document.form1.kep.value=fn;
		}		
		if(num == 0){
			opener.document.form1.kep.value=fn;
		}
		if(num == 1){
			opener.document.images.previmg.src = dir+fn;
			opener.document.kepform.kep.value=fn;
			//alert(fn);
		}
		if(num == 2){
			opener.document.images.previmg2.src = dir+fn;
			opener.document.kepform.kep2.value=fn;
		}
		if(num == 3){
			opener.document.images.previmg3.src = dir+fn;
			opener.document.csaladfaform.kep3.value=fn;
		}
		self.close();
	}
}


function TartalomUrit(url){
	window.parent.document.getElementById("tartalom").src = "ures.html";
	//if(url != ''){
	//	window.parent.document.getElementById("preview").src = url;
	//}
}


function PreviewFrissit(url){
	if(url != ''){
		window.parent.document.getElementById("preview").src = url;
	}
}


function MenuAktiv(classnev,id){
	currlayer = document.getElementById("menu_layer"+id);
	currlayer.className = classnev;
}

function CreatePreview(){
	konyvtar = document.form1.konyvtar.options[document.form1.konyvtar.selectedIndex].text;
	ablak = open("./createpreview.php?dir="+konyvtar, "", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=320, height=240, scrollbars=0");
}


function Vissza(){
	history.go(-1);
}


function IrodaEllenorzes(){
	if(document.irodaform.pwd.value != document.irodaform.pwd2.value){
		alert("A két jelszó nem egyezik");
	} else {
		if(document.irodaform.pwd.value != "" && document.irodaform.fnev.value != ""){
			document.irodaform.submit();
			TartalomUrit('');
		} else {
			alert("A felhasználó név és jelszó kitöltése kötelező!");
		}
	}

}


function AjanlatEllenorzes(){
	document.kepform.submit();
}


function AjanlatPreview(){
	document.previewform.aid.value = document.kepform.aid.value;
	document.previewform.cim.value = document.kepform.cim.value;
	document.previewform.kep.value = document.kepform.kep.value;
	document.previewform.web.value = document.kepform.web.value;
	document.previewform.ar.value = document.kepform.ar.value;
	document.previewform.leiras.value = document.kepform.leiras.value;
	document.previewform.telepules.value = document.kepform.telepules.value;
	document.previewform.utazas.value = document.kepform.utazas.value;
	document.previewform.szallas.value = document.kepform.szallas.value;
	document.previewform.ellatas.value = document.kepform.ellatas.value;
	document.previewform.ind_ev.value = document.kepform.ind_ev.value;
	document.previewform.erk_ev.value = document.kepform.erk_ev.value;
	document.previewform.ind_ho.value = document.kepform.ind_ho.value;
	document.previewform.erk_ho.value = document.kepform.erk_ho.value;
	document.previewform.ind_nap.value = document.kepform.ind_nap.value;
	document.previewform.erk_nap.value = document.kepform.erk_nap.value;
	document.previewform.submit();
}


function BannerPreview(w,h){
	filenev = document.form1.kep.value;
	btid = document.form1.btid.value
	ablak = open("./banner_preview.php?filenev="+filenev+"&btid="+btid, "");
}


function Kezdolap(obj){
	url = "http://www.korfuinfo.hu";

	OPERA = (navigator.userAgent.indexOf("Opera") != -1)
	IE = (navigator.appName=='Microsoft Internet Explorer') && !OPERA;
	
	if (IE) {
		obj.style.behavior='url(#default#homepage)';
		obj.setHomePage(url);
	} else {
		alert("Ez a funkció csak Internet Explorer böngésző alatt érhető el!");
	}
}


function Kedvenc() {
	title = "Korfuinfo.hu - Minden, amit Korfuról tudni érdemes..."; 
	url = "http://www.korfuinfo.hu";
	
	OPERA = (navigator.userAgent.indexOf("Opera") != -1)
	IE = (navigator.appName=='Microsoft Internet Explorer') && !OPERA;
	
	if (IE) {
		window.external.AddFavorite( url, title);

	} else {
		window.sidebar.addPanel(title, url,"");
	}
	
}


function AjanlatLapoz(num){
	document.ajanlat_keresesform.pos.value=num;
	document.ajanlat_keresesform.submit();
}


function Rendezes(mezo,irany){
	document.ajanlat_keresesform.rmezo.value=mezo;
	document.ajanlat_keresesform.rirany.value=irany;
	AjanlatLapoz(0);
}


function Reszletek(web){
	//alert(web);
	ablak = open(web, "");
}



