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


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.getElementById('previmage').innerHTML = "<IMG 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 == 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 UgyfelSzures(id){
	f = document.getElementById("szukitform_"+id);
	f.submit();
}

function urldialog(mid){
	ablak = open("./urldialog.php?mid="+mid, "", "toolbar=0, location=0, directories=0, status=0, menubar=0, resizable=0, width=240, height=100, scrollbars=0");
}


//---Ajax--------------------------------------------------------------------
var ajax_obj;

function loaded(nyelv){
	var MyClassHandler = {
		sayhello: function(result) {
			html = result;
			alert(html);
			//document.getElementById('tartalom').innerHTML = html;
		},
		rssolvas: function(result){
			html = result;
			document.getElementById('rss_div').innerHTML = html;
		}			
	}
	ajax_obj = new myclass(MyClassHandler);
	ajax_obj.rssolvas();
}










