// JavaScript Document

function call_form_field()
{	
	window.frames['rejtettFrame'].document.fileform.kepfile.click();
	window.frames['rejtettFrame'].document.fileform.kepfile.focus();
}
function bekuldoOpener()
{
	w = 345;
	h = 500;
	bal = (screen.width/2)-Math.round(w/2);
	felso = (screen.height/2)-Math.round(h/2);
	window.open("receptAkcio.php","kulod","width="+ w +", height="+ h +", left="+ bal +", top="+ felso + ", scrollbars=1")
}

function blind_submit(nev,cim,telefon,mail,szulev,csaladtag,kiccsalad,recept,dataved)
{
	parent.window.frames['rejtettFrame'].document.fileform.nev.value = nev
	parent.window.frames['rejtettFrame'].document.fileform.cim.value = cim
	parent.window.frames['rejtettFrame'].document.fileform.telefon.value = telefon;
	parent.window.frames['rejtettFrame'].document.fileform.mail.value = mail
	parent.window.frames['rejtettFrame'].document.fileform.szulev.value = szulev
	parent.window.frames['rejtettFrame'].document.fileform.csaladtag.value = csaladtag
	parent.window.frames['rejtettFrame'].document.fileform.kiccsalad.value = kiccsalad
	parent.window.frames['rejtettFrame'].document.fileform.recept.value = recept
	parent.window.frames['rejtettFrame'].document.fileform.dataved.value = dataved
	parent.window.frames['rejtettFrame'].document.fileform.submit();
}
function printelo(id)
{
	window.open("printRecept.php?id="+id,"prnt","width=450,height=520,scrollbars=1,menubar=1");
}
function rcpSender(id)
{
	window.open("sendRecept.php?id="+id,"snd","width=450,height=300");
}
function printlepes(id)
{
	window.open("printLepes.php?id="+id,"prntLepes","width=450,height=520,scrollbars=1,menubar=1");
}

function iecheck()
{
	var pos = navigator.userAgent.indexOf("MSIE ");
	if (pos == -1) return false;
	var version = navigator.userAgent.substring(pos + 5);
	return (((version.indexOf("5.5") == 0) || (version.indexOf("6") == 0)  || (version.indexOf("7") == 0)) && (navigator.platform == ("Win32")));
}


function insertFlash(swf,size,cel)
{
	var str = "";
	if(iecheck())
	{
		str +='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0" name="myFlash" id="myFlash" width="'+size[0]+'" height="'+size[1]+'">';
		str +='	<param name="movie" value="'+swf+'?browser=ie" />';
		str +='	<param name="quality" value="high" />';
		str +=' <param name="scale" value="noscale" />';
		str +=' <param name="menu" value="false" />';
		str +='</object>';

	}
	else
	{
		
		str +='<object type="application/x-shockwave-flash" data="'+swf+'?browser=moz" name="myFlash" id="myFlash" width="'+size[0]+'" height="'+size[1]+'">';
		str +='<param pluginurl="http://www.macromedia.com/go/getflashplayer">';
		str +='	<param name="menu" value="false" />';
		str +='	<param name="quality" value="high" />';
		str +=' <param name="scale" value="noscale" />';
		str +='</object>';
	}
	document.getElementById(cel).innerHTML = str;
}