function keret(file){
	var browser = navigator.appName;
	if (browser == 'Microsoft Internet Explorer'){
		winWidth=document.all?document.body.clientWidth:window.innerWidth;
		winHeight=screen.availHeight-110;
	} else {
		winWidth=document.all?document.body.clientWidth:window.innerWidth;
		winHeight=document.all?document.body.clientHeight:window.innerHeight;
	}
//	var winWidth = document.all?document.body.clientWidth:window.innerWidth;
//	var winHeight = document.all?document.body.clientHeight:window.innerHeight;
	var szelesseg = winWidth - 200;
	var magassag = winHeight - 30;
	var belsomagassag = magassag - 20;
	var balrol = (winWidth - szelesseg)/2;
//	alert (winWidth + "," + winHeight);
	
	var newdiv = document.createElement('div');
	var divIdName = 'kerettakaro';
	newdiv.setAttribute('id',divIdName);
	newdiv.style.width = '100%';
	newdiv.style.height = '100%';
	newdiv.style.top = "0px";
	newdiv.style.left = "0px";
	newdiv.style.position = 'fixed';
	newdiv.style.visibility = 'visible';
	newdiv.style.backgroundImage = 'url(images/lighttransp.png)';
	newdiv.style.backgroundRepeat = 'repeat';
	newdiv.style.zIndex = '2';

	document.body.appendChild(newdiv);

	var new2div = document.createElement('div');
	var divIdName = 'keret';
	new2div.setAttribute('id',divIdName);
	new2div.style.width = szelesseg + 'px';
	new2div.style.height = magassag + 'px';
	new2div.style.position = 'fixed';
	new2div.style.visibility = 'visible';
	new2div.style.left = balrol + 'px';
	new2div.style.top = '5px';
	new2div.style.padding = '5px';
	new2div.style.zIndex = '3';
	new2div.style.fontFamily = 'Arial, Helvetica, sans-serif';
	new2div.style.fontSize = '12px';
	new2div.style.backgroundColor = '#999999';

	document.body.appendChild(new2div);
	
	document.getElementById('keret').innerHTML = '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" height="20" valign="top"><strong>Dokumentum megjelenítés</strong></td><td align="right" height="20" valign="top"><a href="Javascript:bezar()" style="text-decoration:none; color:#FFFFFF;" onmouseover="this.style.color = \'#333333\'" onmouseout="this.style.color = \'#FFFFFF\'">Bezárás</a></td></tr></table><iframe src="docview.php?idvalue='+file+'" frameborder="0" width="100%" height="'+belsomagassag+'" scrolling="auto"></iframe>';

}

function keretkivonat(idvalue){
	var browser = navigator.appName;
	if (browser == 'Microsoft Internet Explorer'){
		winWidth=document.all?document.body.clientWidth:window.innerWidth;
		winHeight=screen.availHeight-110;
	} else {
		winWidth=document.all?document.body.clientWidth:window.innerWidth;
		winHeight=document.all?document.body.clientHeight:window.innerHeight;
	}
//	var winWidth = document.all?document.body.clientWidth:window.innerWidth;
//	var winHeight = document.all?document.body.clientHeight:window.innerHeight;
	var szelesseg = winWidth - 200;
	var magassag = winHeight - 30;
	var belsomagassag = magassag - 20;
	var balrol = (winWidth - szelesseg)/2;
//	alert (winWidth + "," + winHeight);
	
	var newdiv = document.createElement('div');
	var divIdName = 'kerettakaro';
	newdiv.setAttribute('id',divIdName);
	newdiv.style.width = '100%';
	newdiv.style.height = '100%';
	newdiv.style.top = "0px";
	newdiv.style.left = "0px";
	newdiv.style.position = 'fixed';
	newdiv.style.visibility = 'visible';
	newdiv.style.backgroundImage = 'url(images/lighttransp.png)';
	newdiv.style.backgroundRepeat = 'repeat';
	newdiv.style.zIndex = '2';

	document.body.appendChild(newdiv);

	var new2div = document.createElement('div');
	var divIdName = 'keret';
	new2div.setAttribute('id',divIdName);
	new2div.style.width = szelesseg + 'px';
	new2div.style.height = magassag + 'px';
	new2div.style.position = 'fixed';
	new2div.style.visibility = 'visible';
	new2div.style.left = balrol + 'px';
	new2div.style.top = '5px';
	new2div.style.padding = '5px';
	new2div.style.zIndex = '3';
	new2div.style.fontFamily = 'Arial, Helvetica, sans-serif';
	new2div.style.fontSize = '12px';
	new2div.style.backgroundColor = '#999999';

	document.body.appendChild(new2div);
	
	document.getElementById('keret').innerHTML = '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" height="20" valign="top"><strong>Kivonat megjelenítése nyomtatáshoz</strong></td><td align="right" height="20" valign="top"><a href="Javascript:bezar()" style="text-decoration:none; color:#FFFFFF;" onmouseover="this.style.color = \'#333333\'" onmouseout="this.style.color = \'#FFFFFF\'">Bezárás</a></td></tr></table><iframe src="palyazat_print.php?idvalue='+idvalue+'" frameborder="0" width="100%" height="'+belsomagassag+'" scrolling="auto"></iframe>';

}

function keretfile(file){
	var browser = navigator.appName;
	if (browser == 'Microsoft Internet Explorer'){
		winWidth=document.all?document.body.clientWidth:window.innerWidth;
		winHeight=screen.availHeight-110;
	} else {
		winWidth=document.all?document.body.clientWidth:window.innerWidth;
		winHeight=document.all?document.body.clientHeight:window.innerHeight;
	}
//	var winWidth = document.all?document.body.clientWidth:window.innerWidth;
//	var winHeight = document.all?document.body.clientHeight:window.innerHeight;
	var szelesseg = winWidth - 200;
	var magassag = winHeight - 30;
	var belsomagassag = magassag - 20;
	var balrol = (winWidth - szelesseg)/2;
//	alert (winWidth + "," + winHeight);
	
	var newdiv = document.createElement('div');
	var divIdName = 'kerettakaro';
	newdiv.setAttribute('id',divIdName);
	newdiv.style.width = '100%';
	newdiv.style.height = '100%';
	newdiv.style.top = "0px";
	newdiv.style.left = "0px";
	newdiv.style.position = 'fixed';
	newdiv.style.visibility = 'visible';
	newdiv.style.backgroundImage = 'url(images/lighttransp.png)';
	newdiv.style.backgroundRepeat = 'repeat';
	newdiv.style.zIndex = '2';

	document.body.appendChild(newdiv);

	var new2div = document.createElement('div');
	var divIdName = 'keret';
	new2div.setAttribute('id',divIdName);
	new2div.style.width = szelesseg + 'px';
	new2div.style.height = magassag + 'px';
	new2div.style.position = 'fixed';
	new2div.style.visibility = 'visible';
	new2div.style.left = balrol + 'px';
	new2div.style.top = '5px';
	new2div.style.padding = '5px';
	new2div.style.zIndex = '3';
	new2div.style.fontFamily = 'Arial, Helvetica, sans-serif';
	new2div.style.fontSize = '12px';
	new2div.style.backgroundColor = '#999999';

	document.body.appendChild(new2div);
	
	document.getElementById('keret').innerHTML = '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="left" height="20" valign="top"><strong>Dokumentum megjelenítés</strong></td><td align="right" height="20" valign="top"><a href="Javascript:bezar()" style="text-decoration:none; color:#FFFFFF;" onmouseover="this.style.color = \'#333333\'" onmouseout="this.style.color = \'#FFFFFF\'">Bezárás</a></td></tr></table><iframe src="/docs/'+file+'" frameborder="0" width="100%" height="'+belsomagassag+'" scrolling="auto"></iframe>';

}

function bezar(){
	document.body.removeChild(document.getElementById('kerettakaro'));
	document.body.removeChild(document.getElementById('keret'));
}

