var tt_POPDIV={
////////////////////////////////
obj_PDid:"tt_POPDIV",
obj_PDCid:"tt_POPDIVCONTENTDIV",
need_animation: false, //true=igen; false=nem;
ani_grow_rate:8,
ani_grow_delay:15,
ani_opacity_rate:0.04,
ani_opacity_delay:15,
aniCurtainRate:10,
aniCurtainDelay:15,
font_family: "Arial, Helvetica, sans-serif",
///////////////////////////////

preloadedImage: new Image(),
loadingImageUrl: "img/ajax.gif",
loadingImageWidth: 32,
loadingImageHeight: 32,
temp_top:0,
selboxes:[],
flashes:[],

obj_PD:"undefined",
obj_PDC:"undefined",

timerId:"",
imageTimerID:"",

ua:navigator.userAgent.toLowerCase(),
isDOM:false,
isIE:false,
isIEWin:false,
ieVers:0,
isOpera:false,

tip:"",

msg:[],

aniCurtainTimerId:"",
aniClipRight:0,
aniClipBottom:0,
aniClipTop:0,
aniClipLeft:0,

init:function()
{
	if(document.getElementById)
	{
		this.isDOM=true;
		this.isOpera=/opera|OPERA|Opera/.test(this.ua);
		if(document.all && !this.isOpera)
		{
			this.isIE=true;
			this.isIEWin=this.isIE && /win/.test(this.ua);
			this.ieVers=parseFloat(navigator.appVersion.split("MSIE")[1]);
		}
		return true;
	}
	else
	{
		alert('Az Ön böngészője nagyon elavult.\nHasználjon modernebb böngészőt!\npl. Internet Explorer 8+, Firefox 3+, Opera 10+\n\nYour browser is too old.\nUse modern browser!\nLike:Explorer 8+, Firefox 3+, Opera 10+...');
		return false;
	}
},

mutat: function (o,f,kw,kh,tip,lang)
{
	var scrS,w,t,h,tit,cnt,bh,full_kw,full_kh,kleft,ktop,x,liTop,liLeft;

	kw=parseInt(kw,10);
	kh=parseInt(kh,10);

	if(tip==='img')
	{
		this.preloadedImage.src=f;
		liTop=((kh/2)-(this.loadingImageHeight/2)+20)+'px';
		liLeft=((kw/2)-(this.loadingImageWidth/2)+20)+'px';
	}
	
	switch (lang)
	{
		case "m":
			this.msg.bezar="Bezár";
			this.msg.alt_tit="Az ablak bezárásához kattintson a képre";
			this.msg.aniOn="Az animáció bekapcsolása";
			this.msg.aniOff="Az animáció kikapcsolása";
			break;
		case "a":
			this.msg.bezar="Close";
			this.msg.alt_tit="Click on the image to close this window";
			this.msg.aniOn="Switch the animation on";
			this.msg.aniOff="Switch the animation off";
			break;
		case "d":
			this.msg.bezar="Schliessen";
			this.msg.alt_tit="Klicken Sie auf das Bild dieses Fenster zu schliessen ";
			this.msg.aniOn="Die Animation einschalten";
			this.msg.aniOff="Die Animation ausschalten";
			break;			
		default:
			this.msg.bezar="Bezár";
			this.msg.alt_tit="Az ablak bezárásához kattintson a képre";
			this.msg.aniOn="Az animáció bekapcsolása";
			this.msg.aniOff="Az animáció kikapcsolása";
	}
	
	this.tip=tip;
	
	this.init();
	
	if(!this.isDOM)
	{
		return;
	}
	
	scrS=this.getScreenSizes();

	w=scrS.w;
	h=scrS.h;
	t=scrS.t;	
	
	//save top position:
	this.temp_top=t;
	

	this.hideFlash();
	this.hideSelectbox();

	this.createPD();
	
	//scroll to top, left
	self.scrollTo(0, 0);	
	
	this.createPDC();

//table:
	cnt="<table id='tt_POPDIV_cntTable' cellspacing='0' cellpadding='0' border='0' style='table-layout:fixed; width:"+(kw+20)+"px; background-color:#fff; color:#000; font-family:"+this.font_family+"'>";
//FEJ:	
	cnt+="<tr><td style='padding:0;margin:0'>";
//ani:	
	if(tip==="img")
	{
		cnt+="<div style='float:left; margin:5px 0 2px 10px'>";
		
		cnt+="<a href='javascript:void(0)' onclick='tt_POPDIV.aniOnOff("+kw+","+kh+"); return false' style='text-decoration:none;  color:#999; font-weight:normal; font-size:10px' onmouseover=\"this.style.color='#090'; this.style.fontWeight='bold'\" onmouseout=\"this.style.color='#999'; this.style.fontWeight='normal'\" >[ <span id='aniStatus'>"+this.msg.aniOff+"</span> ]</a>";
		
		cnt+="</div>";
	}
//bezár:
	cnt+="<div style='float:right'>";
	
	cnt+="<a href='javascript:void(0)' onclick='tt_POPDIV.rejt(); return false' style='text-decoration:none' title='"+this.msg.bezar+"'><img src='img/popdivclose.png' width='20' height='20' border='0' style='margin:2px 2px 2px 10px;' align='middle' alt='"+this.msg.bezar+"' title='"+this.msg.bezar+"' /></a>";
	
	cnt+="</div>";
	
	cnt+="</td></tr>";

	switch(tip)
	{
		case 'iframe':
			cnt+="<tr><td><div style='border-right:10px solid #fff;border-bottom:10px solid #fff;border-left:10px solid #fff'><iframe id='popdivElement' src='"+f+"' width='"+kw+"' height='"+kh+"'  marginwidth='0' marginheight='0' frameborder='0' align='middle' scrolling=auto style='padding:0'></iframe></div></td></tr></table>";
			break;

		case 'img':
			cnt+="<tr><td valign='top' style='padding:0px 10px 0px 10px;height:"+kh+"px;'>";
	
			cnt+="<div style='position:relative'>";
//preload:
			cnt+="<img id='liDiv' style='display:block; position:absolute; top:"+liTop+"; left:"+liLeft+";'  src='"+this.loadingImageUrl+"' width='"+this.loadingImageWidth+"' height='"+this.loadingImageHeight+"' />";			
//kép:
			cnt+="<a href='javascript:void(0)' onclick='tt_POPDIV.rejt();return false'>";

			cnt+="<img id='popdivElement' src='' border='0' style='visibility:hidden; width:"+kw+"px; height:"+kh+"px; position:absolute; top:0px; left:0px;";
			
			if(this.isIEWin)
			{
				cnt+="filter:alpha(opacity=0);";
			}
			else
			{
				cnt+="opacity:0;";
			}
			
			cnt+="' alt='"+this.msg.alt_tit+"' title='"+this.msg.alt_tit+"' />";

			cnt+="</a></div></td></tr>";
			
			tit="";
			if(tip==="img")
			{
				x=o.nextSibling;
				while(x.nodeName.toLowerCase()!=='div')
				{
					x=x.nextSibling;
				}
				if(x.innerHTML!=="")
				{
					tit=x.innerHTML;
				}
			}
			
			if(tit!=="")
			{
				cnt+="<tr><td class='a12' align='center' style=' padding:5px 0px 10px 0px'>"+tit+"</td></tr>";
			}
			else
			{
				cnt+="<tr><td style='line-height:10px'>&nbsp;</td></tr>";
			}
			cnt+="</table>\n";
			break;
	}
	
	tt_POPDIV.obj_PDC.innerHTML=cnt;
	
	
	
	
	this.obj_PDC.style.visibility="visible";
	
	
	
	
	
	
	
	if(tip==="img")
	{	
		this.aniCheckStatus();
	}
	
	bh=this.getDocHeight();
	if(bh>0)
	{
		this.obj_PD.style.height=bh+'px';
	}
	
	full_kw=this.o('tt_POPDIV_cntTable').scrollWidth;
	full_kh=this.o('tt_POPDIV_cntTable').scrollHeight;

	this.obj_PDC.style.width=parseInt(full_kw,10)+'px';
	this.obj_PDC.style.height=parseInt(full_kh,10)+'px';
	
	kleft=( w/2 - (full_kw/2) )+'px';
	ktop=( h/2 - (full_kh/2) );
	ktop = ktop>=10 ? (ktop+'px') : "10px";

	//pozicionálás, méretezés:
	this.obj_PDC.style.left=kleft;
	this.obj_PDC.style.top=ktop;
		
	//ha nagyobb a kép,mint a div:
	if(parseInt(this.obj_PD.style.height,10)<=full_kh)
	{
		this.obj_PD.style.height=(full_kh+100)+"px";
	}
	if(parseInt(this.obj_PD.style.width,10)<=full_kw)
	{
		this.obj_PD.style.width=(full_kw+100)+"px";
	}
	
	if(this.tip==='img')
	{
		tt_POPDIV.imageTimerID="";
		tt_POPDIV.imageTimerID = window.setInterval(function()
		{
			tt_POPDIV.checkLoadedImg(kw,kh);
		},200);
	}
	else if(this.tip==='iframe')
	{
		this.dispCont(kw,kh);
		this.obj_PDC.style.visibility="visible";
	}
},

setCookie: function(c_name,value,expiredays)
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays===null) ? "" : ";expires="+exdate.toGMTString());
},

getCookie: function(c_name)
{
	var c_start,c_end;
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!==-1)
		{
			c_start=c_start + c_name.length+1;
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end===-1)
			{			
				c_end=document.cookie.length;
				
			}
			return unescape(document.cookie.substring(c_start,c_end));
		}
	}
	return "";
},

aniOnOff: function(kw,kh)
{
	if(this.need_animation===true)
	{
		this.setCookie('tt_popdiv_need_ani','0',14);
		this.need_animation=false;
		this.o('aniStatus').innerHTML=this.msg.aniOn;
		//this.rejt();
	}
	else
	{
		this.setCookie('tt_popdiv_need_ani','1',14);
		this.need_animation=true;
		this.o('aniStatus').innerHTML=this.msg.aniOff;
		this.ani(kw,kh);
	}
},

aniCheckStatus: function()
{
	if(this.getCookie('tt_popdiv_need_ani'))
	{
		if(this.getCookie('tt_popdiv_need_ani')==='1')
		{
			this.need_animation=true;
			this.o('aniStatus').innerHTML=this.msg.aniOff;
		}
		else if(this.getCookie('tt_popdiv_need_ani')==='0')
		{
			this.need_animation=false;
			this.o('aniStatus').innerHTML=this.msg.aniOn;
		}
	}
	else
	{
		if(this.need_animation===true)
		{
			this.o('aniStatus').innerHTML=this.msg.aniOff;
		}
		else
		{
			this.o('aniStatus').innerHTML=this.msg.aniOn;
		}
	}
},

checkLoadedImg: function(kw,kh)
{
	if(this.preloadedImage.complete)
	{
		window.clearInterval(tt_POPDIV.imageTimerID);
		tt_POPDIV.imageTimerID="";
		this.o('liDiv').style.display='none';
		this.o('popdivElement').src=this.preloadedImage.src;
		tt_POPDIV.dispCont(kw,kh);
		return;
	}
},
	
dispCont: function(kw,kh)
{
	if(this.need_animation && this.tip==="img")
	{
		this.ani(kw,kh);
	}
	else
	{
		this.o('popdivElement').style.visibility='visible';
		if(this.isIEWin)
		{
			this.o('popdivElement').filters.alpha.opacity=100;
		}
		else
		{
			this.o('popdivElement').style.opacity=1;
		}
	}
},

getRandomAni: function ()
{
	var x = [];
	x[0] = "grow";
	x[1] = "opacity";
	x[2] = "cl";	
	x[3] = "ct";	
	x[4] = "cr";	
	x[5] = "cb";
	x[6] = "cc1";
	x[7] = "cc2";
	var y = Math.floor(Math.random() * x.length);
	return x[y];
},

ani: function(kw,kh)
{
	var d,rnd, r, rW,rH;
	window.clearInterval(tt_POPDIV.timerId);
	tt_POPDIV.timerId="";
	window.clearInterval(tt_POPDIV.imageTimerID);
	tt_POPDIV.imageTimerID="";
	
	window.clearInterval(tt_POPDIV.aniCurtainTimerId);
	tt_POPDIV.aniCurtainTimerId="";
	
	d=this.o("popdivElement").style;

	rnd=this.getRandomAni();
	
	if(rnd!=="opacity")
	{
		if(this.isIEWin)
		{
			this.o('popdivElement').filters.alpha.opacity=100;
		}
		else
		{
			this.o('popdivElement').style.opacity=1;
		}	
	}

	switch (rnd)
	{
		case "grow":
			d.width=0;
			d.height=0;
			if(kw>=kh)
			{
				r=(kw/300)*this.ani_grow_rate;
				rW=Math.round((kw/kh)*r);
				rH=r;
			}
			else
			{
				r=(kh/300)*this.ani_grow_rate;
				rH=Math.round((kh/kw)*r);
				rW=r;
			}
			if(d.visibility==='hidden'){d.visibility='visible';}
			tt_POPDIV.timerId=window.setInterval(function()
			{
				tt_POPDIV.ani_grow(d,kw,kh,rW,rH);
			},this.ani_grow_delay);
			break;
		
		case "opacity":
			d.opacity=0.05;
			if(this.isIEWin)
			{
				r=Math.round(this.ani_opacity_rate*250);
			}
			else
			{
				r=this.ani_opacity_rate;
			}
			if(d.visibility==='hidden'){d.visibility='visible';}			
			tt_POPDIV.timerId=window.setInterval(function()
			{
				tt_POPDIV.ani_opacity(d,r);
			},this.ani_opacity_delay);
			break;

		case 'cl':
			this.aniClipTop=0;
			this.aniClipRight=0;
			this.aniClipBottom=0;
			this.aniClipLeft=0;
			d.clip="rect("+this.aniClipTop+"px,"+this.aniClipRight+"px,"+this.aniClipBottom+"px,"+this.aniClipLeft+"px)";
			tt_POPDIV.aniCurtainTimerId=window.setInterval(function()
			{
				tt_POPDIV.ani_curtain(d,kw,kh,'l');
			},this.aniCurtainDelay);
			break;
		case 'ct':
			this.aniClipTop=0;
			this.aniClipRight=0;
			this.aniClipBottom=0;
			this.aniClipLeft=0;
			d.clip="rect("+this.aniClipTop+"px,"+this.aniClipRight+"px,"+this.aniClipBottom+"px,"+this.aniClipLeft+"px)";
			tt_POPDIV.aniCurtainTimerId=window.setInterval(function()
			{
				tt_POPDIV.ani_curtain(d,kw,kh,'t');
			},this.aniCurtainDelay);
			break;

		case 'cr':
			this.aniClipTop=0;
			this.aniClipRight=0;
			this.aniClipBottom=0;
			this.aniClipLeft=kw;
			d.clip="rect("+this.aniClipTop+"px,"+this.aniClipRight+"px,"+this.aniClipBottom+"px,"+this.aniClipLeft+"px)";
			tt_POPDIV.aniCurtainTimerId=window.setInterval(function()
			{
				tt_POPDIV.ani_curtain(d,kw,kh,'r');
			},this.aniCurtainDelay);
		break;

		case 'cb':
			this.aniClipTop=kh;
			this.aniClipRight=0;
			this.aniClipBottom=0;
			this.aniClipLeft=0;
			d.clip="rect("+this.aniClipTop+"px,"+this.aniClipRight+"px,"+this.aniClipBottom+"px,"+this.aniClipLeft+"px)";
			tt_POPDIV.aniCurtainTimerId=window.setInterval(function()
			{
				tt_POPDIV.ani_curtain(d,kw,kh,'b');
			},this.aniCurtainDelay);
		break;
	
		case 'cc1':
			this.aniClipTop=kh/2;
			this.aniClipRight=kw;
			this.aniClipBottom=kh/2;
			this.aniClipLeft=0;
			d.clip="rect("+this.aniClipTop+"px,"+this.aniClipRight+"px,"+this.aniClipBottom+"px,"+this.aniClipLeft+"px)";
			tt_POPDIV.aniCurtainTimerId=window.setInterval(function()
			{
				tt_POPDIV.ani_curtain(d,kw,kh,'c1');
			},this.aniCurtainDelay);
			break;

		case 'cc2':
			this.aniClipTop=0;
			this.aniClipRight=kw/2;
			this.aniClipBottom=kh;
			this.aniClipLeft=kw/2;
			d.clip="rect("+this.aniClipTop+"px,"+this.aniClipRight+"px,"+this.aniClipBottom+"px,"+this.aniClipLeft+"px)";
			tt_POPDIV.aniCurtainTimerId=window.setInterval(function()
			{
				tt_POPDIV.ani_curtain(d,kw,kh,'c2');
			},this.aniCurtainDelay);
			break;
	}
 },

ani_grow: function(d,kw,kh,rW,rH)
{
	var maxW,maxH;
	
	if(parseInt(d.width,10)<kw )
	{
		if(parseInt(d.width,10)+rW>=kw)
		{
			d.width=kw + "px";
		}
		else
		{
			d.width=(parseInt(d.width,10)+rW)+"px";
		}
		maxW=false;
	}
	else
	{
		maxW=true;
	}
	
	if(parseInt(d.height,10)<kh )
	{
		if(parseInt(d.height,10)+rH>=kh)
		{
			d.height=kh + "px";
		}
		else
		{
			d.height=(parseInt(d.height,10)+rH)+"px";
		}
		maxH=false;
	}
	else
	{
		maxH=true;
	}

	if(maxW && maxH)
	{
		window.clearInterval(tt_POPDIV.timerId);
		tt_POPDIV.timerId="";
	}
},

ani_opacity: function(d,r)
{
	var op,x;
	if(this.isIEWin)
	{
		op=this.o("popdivElement").filters.alpha.opacity;
		x=op;
		if (x < 100)
		{
			x=((x + r) > 100) ? 100 : (x + r);
			this.o("popdivElement").filters.alpha.opacity= x;
		}
		else
		{
			window.clearInterval(tt_POPDIV.timerId);
			tt_POPDIV.timerId="";
			return;
		}
	}
	else
	{
		op=this.o("popdivElement").style.opacity;
		x=parseFloat(op);
		if (x < 1)
		{
			x=(x + this.ani_opacity_rate);
			x=x > 1 ? 1 : x;
			this.o("popdivElement").style.opacity= x;
		}
		else
		{
			window.clearInterval(tt_POPDIV.timerId);
			tt_POPDIV.timerId="";
			return;
		}
	}
},

ani_curtain: function(d,kw,kh,ir)
{
	var rate,rateW,rateH;

	if(d.visibility==='hidden'){d.visibility='visible';}
	d.position="absolute";
	d.overflow="hidden";
	
	rate=this.aniCurtainRate;
	
	rateW=Math.round(kw/300*rate);
	rateH=Math.round(kh/300*rate);
	
	switch (ir)
	{
		case "l":
		if(this.aniClipRight < kw)
		{
			this.aniClipRight+= rateW;
			this.aniClipRight=this.aniClipRight>kw ? kw : this.aniClipRight;
			d.clip = 'rect(0px,'+this.aniClipRight+'px,'+kh+'px,0px)';
		}
		else
		{
			window.clearInterval(tt_POPDIV.aniCurtainTimerId);
			this.aniCurtainTimerId="";
			this.aniClipRight=0;
			return;
		}
		break;

		case "t":
		if(this.aniClipBottom < kh)
		{
			this.aniClipBottom+= rateH;
			this.aniClipBottom= this.aniClipBottom>kh ? kh : this.aniClipBottom;
			d.clip='rect(0px,'+kw+'px,'+this.aniClipBottom+'px,0px)';
		}
		else
		{
			window.clearInterval(tt_POPDIV.aniCurtainTimerId);
			this.aniCurtainTimerId="";
			this.aniClipBottom=0;
			return;
		}
		break;

		case "r":
		if(this.aniClipLeft > 0)
		{
			this.aniClipLeft-= rateW;
			this.aniClipLeft=this.aniClipLeft<0 ? 0 : this.aniClipLeft;
			d.clip = 'rect(0px,'+kw+'px,'+kh+'px,'+this.aniClipLeft+'px)';
		}
		else
		{
			window.clearInterval(tt_POPDIV.aniCurtainTimerId);
			this.aniCurtainTimerId="";
			this.aniClipLeft=0;
			return;
		}
		break;

		case "b":
		if(this.aniClipTop > 0)
		{
			this.aniClipTop-= rateH;
			this.aniClipTop=this.aniClipTop<0 ? 0 : this.aniClipTop;
			d.clip = 'rect('+this.aniClipTop+'px,'+kw+'px,'+kh+'px,0px)';
		}
		else
		{
			window.clearInterval(tt_POPDIV.aniCurtainTimerId);
			this.aniCurtainTimerId="";
			this.aniClipTop=0;
			return;
		}
		break;

		case "c1":
		if(this.aniClipTop > 0 || this.aniClipBottom < kh)
		{
			if(this.aniClipTop > 0)
			{
				this.aniClipTop-= rateH/2;
				this.aniClipTop= this.aniClipTop<0 ? 0 : this.aniClipTop;
			}
			if(this.aniClipBottom < kh)
			{
				this.aniClipBottom+= rateH/2;
				this.aniClipBottom=this.aniClipBottom>kh ? kh : this.aniClipBottom;
			}
			d.clip = 'rect('+this.aniClipTop+'px,'+kw+'px,'+this.aniClipBottom+'px,0px)';
		}
		else
		{
			window.clearInterval(tt_POPDIV.aniCurtainTimerId);
			this.aniCurtainTimerId="";
			this.aniClipTop=0;
			this.aniClipLeft=0;
			this.aniClipRight=0;
			this.aniClipBottom=0;
			return;
		}
		break;

		case "c2":
		if(this.aniClipLeft > 0 || this.aniClipRight < kw)
		{
			if(this.aniClipRight < kw)
			{
				this.aniClipRight+= rateW/2;
				this.aniClipRight=this.aniClipRight>kw ? kw : this.aniClipRight;
			}
			if(this.aniClipLeft > 0)
			{
				this.aniClipLeft-= rateW/2;
				this.aniClipLeft=this.aniClipLeft<0 ? 0 : this.aniClipLeft;
			}
			d.clip = 'rect(0px,'+this.aniClipRight+'px,'+kh+'px,'+this.aniClipLeft+'px)';
		}
		else
		{
			window.clearInterval(tt_POPDIV.aniCurtainTimerId);
			this.aniCurtainTimerId="";
			this.aniClipTop=0;
			this.aniClipLeft=0;
			this.aniClipRight=0;
			this.aniClipBottom=0;
			return;
		}
		break;
	}
},

rejt:function() {

	window.clearInterval(tt_POPDIV.timerId);
	tt_POPDIV.timerId="";
	
	window.clearInterval(tt_POPDIV.imageTimerID);
	tt_POPDIV.imageTimerID="";

	//kiürítés
	this.obj_PD.parentNode.removeChild(this.obj_PD);
	this.obj_PDC.parentNode.removeChild(this.obj_PDC);

	//Show hided flash divs
	this.showFlash();
	this.flashes.length=0;

	//Show hided selectboxes in IE6/IE5/IE4:
	this.showSelectbox();
	this.selboxes.length = 0;

	//scroll to temp_top
	self.scrollTo(0,this.temp_top);
	
	if (this.isIEWin)
	{
		window.attachEvent("onunload", tt_POPDIV.cleanupIELeaks);
	}
},

getBodyElement: function()
{
	var b;
        if(parent.document.getElementsByTagName("body"))
        {
		b=parent.document.getElementsByTagName("body")[0] || parent.document.getElementsByTagName("body").item(0);
        }
        else if(window.parent.content.document.getElementsByTagName("body"))
        {
		b=window.parent.content.document.getElementsByTagName("body")[0];
	}
	else if(parent.document.childNodes[1])
        {
		b=parent.document.childNodes[1];
        }
        else
        {
		b=parent.document.body;
        }
	return b;
},

createPD: function()
{
	var bodi,ujDiv,firstEl;
	
	bodi=this.getBodyElement();
       
	ujDiv = document.createElement("div");
	ujDiv.setAttribute("title",this.msg.bezar);
	ujDiv.id=this.obj_PDid;
	ujDiv.onclick=function(){tt_POPDIV.rejt();};
	ujDiv.style.backgroundColor='#000';
	if(this.isIE)
	{
		ujDiv.style.filter='alpha(opacity=90)';
		ujDiv.style.cursor='hand';	
	}
	else
	{
		ujDiv.style.opacity=0.9;
		ujDiv.style.cursor='pointer';
	}
	ujDiv.style.position='absolute';	
	ujDiv.style.width=this.getDocWidth()+"px";
	ujDiv.style.height=this.getDocHeight()+"px";	
	ujDiv.style.top=0;
	ujDiv.style.left=0;
	ujDiv.style.display='block';
	ujDiv.style.zIndex='999998';
	firstEl=bodi.childNodes[0];
	bodi.insertBefore(ujDiv,firstEl);
	this.obj_PD=this.o(this.obj_PDid);
},

createPDC: function()
{
	var ujContDiv;
	ujContDiv=document.createElement('div');
	ujContDiv.id=this.obj_PDCid;
	ujContDiv.style.textAlign='center';
	ujContDiv.style.backgroundColor='#fff'; 
	ujContDiv.style.position='absolute';
	ujContDiv.style.width=0;
	ujContDiv.style.height=0;
	ujContDiv.style.top=0;
	ujContDiv.style.left=0;
	ujContDiv.style.display='block';
	ujContDiv.style.visibility='hidden';
	ujContDiv.style.zIndex ='999999'; 
	this.o(this.obj_PDid).parentNode.insertBefore( ujContDiv, this.o(this.obj_PDid).nextSibling );
	this.obj_PDC=this.o(this.obj_PDCid);
},

o: function(id)
{
	return document.getElementById(id);
},

hideFlash: function()
{
	var et,etl,e,ft,ftl,i,pt,ptl,p;

	//###### önálló EMBED OBJECT nélkül:
	et= document.getElementsByTagName("embed");
	etl=et.length;
	for (e=0; e<etl; e++)
	{
		if(et[e].parentNode.style.display!=='none' && et[e].parentNode.tagName.toLowerCase()!=="object")
		{
			if(this.getFlashExt(this.gal(et[e],'src')) )
			{
				et[e].style.display='none';
				this.flashes.push(et[e]);
			}
			else if(this.gal(et[e],'type')==="application/x-shockwave-flash")
			{
				et[e].style.display='none';
				this.flashes.push(et[e]);
			}
		}
	}
	
	//###### OBJECT param-el és embeddel vagy anélkül:	
	ft=document.getElementsByTagName("object");
	ftl=ft.length;
	for (i=0; i<ftl; i++)
	{
		if (ft[i].style.display!=='none' )
		{
			if(this.gal(ft[i],'classid')==='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000')
			{
				ft[i].style.display='none';
				this.flashes.push(ft[i]);
			}
			else if( this.getFlashExt(this.gal(ft[i],'src')) )
			{
				ft[i].style.display='none';
				this.flashes.push(ft[i]);
			}
			else if( this.getFlashExt(this.gal(ft[i],'data')) )
			{
				ft[i].style.display='none';
				this.flashes.push(ft[i]);
			}			
			else if(this.gal(ft[i],'type')==="application/x-shockwave-flash")
			{
				ft[i].style.display='none';
				this.flashes.push(ft[i]);
			}
			else
			{
				pt=ft[i].getElementsByTagName("param");
				ptl=pt.length;
				for(p=0; p<ptl; p++)
				{
					if( this.gal(pt[p],'name')==="movie" && this.getFlashExt(this.gal(pt[p],'value')) )
					{
						ft[i].style.display='none'; 
						this.flashes.push(ft[i]);
					}
					else if( this.gal(pt[p],'name')==="src" && this.getFlashExt(this.gal(pt[p],'value')) )
					{
						ft[i].style.display='none'; 
						this.flashes.push(ft[i]);
					}				
					else if( this.gal(pt[p],'name')==="data" && this.getFlashExt(this.gal(pt[p],'value')) )
					{
						ft[i].style.display='none'; 
						this.flashes.push(ft[i]);
					}
				}
			}
		}	
	}
},

gal: function (elem,attr)
{
	try
	{
		if(elem.getAttribute(attr)!==null||elem.getAttribute(attr)!=="undefined")
		{
			return elem.getAttribute(attr).toLowerCase();
		}
		else
		{
			return eval("elem."+attr).toLowerCase();
		}
	}
	catch (e)
	{
		return null;
	}
},

getFlashExt: function(f)
{
	var fe,d;
	if(!f)
	{
		return false;
	}
	fe ="";
	d = f.replace(/^\s|\s$/g, "");
	if (d.match(/\.(swf|SWF)/) )
	{
		fe = RegExp.$1;
	}
	return fe;
},

showFlash: function()
{
	var l,i;
	l=this.flashes.length;
	for(i=0; i<l;i++)
	{
		this.flashes[i].style.display="";
	}
},

hideSelectbox: function()
{
	var i,selects,sl;

	//IE6/IE5/IE4:
	if(this.isIE && this.ieVers<7)
	{
		selects = document.getElementsByTagName('select');
		sl=selects.length;
		for(i=0;i<sl;i++)
		{
			if(selects[i].style.display!=="none")
			{
				selects[i].style.display="none";
				this.selboxes.push(selects[i]);
			}
		}		
	}
},

showSelectbox: function()
{
	var i,sl;
	if(this.isIE && this.ieVers<7)
	{
		sl=this.selboxes.length;
		for(i=0;i<sl;i++)
		{
			this.selboxes[i].style.display="block";
		}		
	}
},

getScrollerWidth: function ()
{
    var scr = null;
    var inn = null;
    var wNoScroll = 0;
    var wScroll = 0;
    scr = parent.document.createElement('div');
    scr.style.position = 'absolute';
    scr.style.top = '-1000px';
    scr.style.left = '-1000px';
    scr.style.width = '100px';
    scr.style.height = '50px';
    scr.style.overflow = 'hidden';
    inn = parent.document.createElement('div');
    inn.style.width = '100%';
    inn.style.height = '200px';
    scr.appendChild(inn);
    parent.document.body.appendChild(scr);
    wNoScroll = inn.offsetWidth;
    scr.style.overflow = 'auto';
    wScroll = inn.offsetWidth;
    parent.document.body.removeChild(parent.document.body.lastChild);
    return (wNoScroll - wScroll);
},

getDocHeight: function ()
{
	var bh=0;
	if(this.isOpera)
	{
		bh=document.documentElement.scrollHeight;
	}
	else if(window.innerHeight && window.scrollMaxY)
	{
		bh=window.innerHeight+window.scrollMaxY;
	}
	else if(document.body.scrollHeight>document.body.offsetHeight || document.body.scrollWidth>document.body.offsetWidth)
	{
		bh=document.body.scrollHeight;
	}
	else
	{
		bh=document.body.offsetHeight+document.body.offsetTop;
	}
	return bh;
},

getDocWidth: function ()
{
	var bw=0;
	if(this.isOpera)
	{
		bw=document.documentElement.scrollWidth;
	}
	else if(window.innerWidth && window.scrollMaxX && window.innerHeight && window.scrollMaxY)
	{
		bw=window.innerWidth+window.scrollMaxX;
	}
	else if(document.body.scrollHeight>document.body.offsetHeight || document.body.scrollWidth>document.body.offsetWidth)
	{
		bw=document.body.scrollWidth;
	}
	else
	{
		bw=document.body.offsetWidth+document.body.offsetLeft;
	}
	if(document.all)
	{
		bw=Math.round(bw*0.999);
	}
	return bw;
},

getScreenSizes:function()
{
	var scrollw=30,w=800,h=600,t=0;

	if( typeof( window.innerWidth ) === 'number' )
	{
		//Non-IE
		w = window.innerWidth;
		h = window.innerHeight;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth || parent.document.documentElement.clientHeight ) )
	{
		//IE 6+ in 'standards compliant mode'
		w = document.documentElement.clientWidth;
		h = document.documentElement.clientHeight;
	}
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
	{
		//IE 4 compatible
		w = document.body.clientWidth;
		h = document.body.clientHeight;
	}

	scrollw= parseInt(this.getScrollerWidth(),10);
	if((w-scrollw)<w)
	{
		w=(w-scrollw);
	}
  
	if( typeof( window.pageYOffset ) === 'number' )
	{
		//Netscape compliant
		t = window.pageYOffset;
	}
	else if( document.body && document.body.scrollTop )
	{
		//DOM compliant
		t = document.body.scrollTop;
	}
	else if( document.documentElement && document.documentElement.scrollTop )
	{
		//IE6 standards compliant mode
		t = document.documentElement.scrollTop;
	}

	return {w:w,h:h,t:t};
},

cleanupIELeaks: function()
{
	var _o,_l,i,x;
	_o = document.getElementsByTagName("object");
	_l = _o.length;
	for (i = 0; i < _l; i++) {
		_o[i].style.display = "none";
		for (x in _o[i])
		{
			if (typeof _o[i][x] === "function")
			{
				_o[i][x] = null;
			}
		}
	}
}

};