/*	eon.js script, version 1.0  
 *  (c) 2006 Carnation.ZRt <info@carnation.hu>
 *  @author: arpad.csikos@carnation.hu
 *
 *
/*--------------------------------------------------------------------------*/
/* agent */
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[(function(e){return d[e]})];e=(function(){return'\\w+'});c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('w Q=1i(){w c=l.1d.P();w 4={z:(c.v("10")>-1)?{b:q}:k,K:(l.U)?{b:l.U.v("1e")}:k,F:l.J!=y&&l.J.P().v("F")>-1,5:(c.v("5")>-1)?{b:q}:k,L:D.X!=y&&D.X.v("L")>-1,f:q,g:q,A:k};4.E=4.z||4.F;4.n=(!4.z&&l.J!=y&&l.J.P()=="n")?{b:q}:k;m(4.n){4.n.1g=B H(c.t(/.*n\\/(\\d{8}).*/)[1]);4.n.r=B H(c.t(/.*n\\/(\\d{8}).*/)[1]);4.G=(c.v("G")>-1)?{b:q}:k;m(4.G){4.G.r=c.t(/.* G\\/([*0-9]\\.[*0-9]\\.[*0-9]\\.[*0-9])*/)[1]}}m(4.5){4.5.r=B H(c.t(/.*5(\\s|\\/)(\\d+\\.\\d+)/)[2])}m(!4.5&&O.5){4.5=q;4.u=k;4.n=k;4.5.r=O.5.r()}4.u=(c.v("Y")>-1&&!4.5&&!4.E&&!4.n)?{b:q}:k;4.o=4.u&&c.t(/.*E.*/)!=y;m(4.u||(4.5&&4.5.r<7.6)){4.g=k}m(4.u){4.u.r=c.t(/.* Y ([*0-9]\\.[*0-9])*/)[1]}m(4.z){4.z.r=B H(c.t(/.*10\\/(\\d+).*/)[1])}m(l.N&&l.N["11/x-12-A"]&&l.N["11/x-12-A"].1k&&(!4.u||4.o)){w M=(l.R["14 W 2.0"]||l.R["14 W"]).16;4.A={b:q};4.A.r=17(M.18(M.v(".")-1))}1a{w C=k;T{w x=B S("I.I");1b(w i=3;x!=y;i++){x=B S("I.I."+i);C=i}}13(e){}m(C)4.A={b:q};4.A.r=(C)?C:k}m(c.t(/.*(1f|E).*/)==y||4.o||4.F||(4.5&&(c.t(/.*E.*/)!=y||4.i<7.6))||(4.K&&4.h<7)||(!4.K&&4.z&&4.Z<15)||(4.n&&4.j<19)){4.f=k}m(!4.o&&!4.n&&D.V){T{D.V(a,"i").1h=""}13(e){4.L=q}}4.p=4.F||(4.z&&4.Z<1j)||4.u;1c 4};D.Q=O.Q();',62,83,'||||browser|opera|||||||uagent||||||||false|navigator|if|gecko|||true|version||match|ie|indexOf|var||null|apple|flash|new|swfversion|document|mac|konqueror|firefox|Number|ShockwaveFlash|product|safari|xml|aj|mimeTypes|window|toLowerCase|agent|plugins|ActiveXObject|try|vendor|createElementNS|Flash|contentType|msie|appleversion|applewebkit|application|shockwave|catch|Shockwave|124|description|parseInt|charAt|20020523|else|for|return|userAgent|Apple|windows|date|innerHTML|function|312|enabledPlugin'.split('|'),0,{}));
var _focused;

/*
 * old scripts before prototype, some functions supplemented with prototype functions  
 */
/**
 * debug alert teszt célokra 
 */
function debug(arg)  
{
	var st='';
	switch (typeof(arg))
	{
	case 'object':
		var s=0;
		for (i in arg)
		{
			st+=i+' \t';
			s++;
			if (s==6)
			{
				st+='\n';
				s=0;
			}
		}
		break;
	case 'string': st=arg+' is like a string';break;
	case 'number': st=arg+' is like a number';break;
	case 'boolean': st=arg+' is like a boolean';break;
	case 'function': st=arg+' is like a function';break;
	case 'undefined': st=arg+' is undefined';break;	
	}
	alert(st);
}


function msFilter()
{
	var filtered=document.getElementsByClassName('pngfilter');
	for (var i=0; i<filtered.length; i++ )
	{
		filtered[0].style.opacity='0.95';
		filtered[0].style.filter='alpha(opacity: 95)';
	}	
}

/**
 * return this formObject
 */  
function parentForm(elem)
	{
		var _parentForm=$(elem.id).parentNode;
		while (_parentForm.nodeName.toUpperCase()!='FORM')
		{
			_parentForm=_parentForm.parentNode;
		}
		return _parentForm;
	} 

function mailCheck(str)
{
  var re = new RegExp("^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,4}$");
  var arr = re.exec(str);  
  
  if(arr!=null)
   {    
    return true;
   }
  else return false;
}

/**
 * 
 * formmezok tartalmanak ellenorzese egy adott input mezore, az adott form mezoit class-uk alapjan ellenorzi
 * @param {Object} formId
 * reqiures: input field ID
 */
function valueCheck(formId)  //formmezők tartalmának ellenőrzése, az adott form mezőit class-uk alapján ellenőrzi
	{
		var ok=false;
		plusMsg='';
		//input value types:		
		obj=$(formId);
		if ( obj )
		{
			c_integer=obj.className.indexOf('number')>-1;
			c_string=obj.className.indexOf('string')>-1;
			c_mail=obj.className.indexOf('mail')>-1;
			c_phone=obj.className.indexOf('phone')>-1;
}
    if (c_integer)
			{
        notnull=obj.className.indexOf('notnull')>-1;				
				x = parseInt(obj.value); //szám kinyerése
				if (!isNaN(x) && x == obj.value)
					{
						if (notnull) // ha a beírt szám nem lehet 0;
						{
							if (x>0) ok=true;
							else 
								{
									//plusMsg=msgPlus['notnull'];
								}									
						}
						else ok=true;							
					}
				else 
				{
					// a legördíthető mezők esetén, ha azok netán integer értéket is adnak, nem biztos, hogy megjelenésben is szám szerepel, nem kell ez az üzenet
					if (obj.type!='select-one') 
            {
              //plusMsg=msgPlus['int']; 
            }
				}
			}
		if (c_string)
			{
        if (obj.value.length>0 && obj.title!=obj.value && obj.value!='false') ok=true;
			}
		if (c_mail)
			{
        ok=mailCheck(obj.value);
				if (!ok) 
          		{
		        	//plusMsg=msgPlus['mail'];
        		}
			}
		if(c_phone) {

	        if (obj.value.length==11){
				ok = true;
				for(x=0;x<11;x++)
				{
			  		if (obj.value.charAt(x) < '0' || obj.value.charAt(x) > '9') ok = false;
				}
			}

		}
		return ok;			
	}

function errorStyle()
  { 
   if(errorStyle.arguments.length>0)
    {
      var _id=errorStyle.arguments[0].id;
      var _func=errorStyle.arguments[1];
      if ($(_id)) 
        {
          if(!_func) 
            {
              Element.addClassName($(_id),'errorInput');
            }
          if (_func=='clear') 
            {
              Element.removeClassName($(_id), 'errorInput');
            }
        }
    }
  }

function formHandlerFunc()
  {
	if (formHandlerFunc.arguments.length>0)
    {
    	var _hibas='';
    	var required=false;
		_form=formHandlerFunc.arguments[0];
		for (i=0;i<_form.length ;i++ )
      	{
      		_hibas='';
			_required=_form[i].className.indexOf('required')>-1;
      		switch(_form[i].type) 
      			{				
      				case 'text': if(!valueCheck(_form[i].id) && _required) _hibas=_form[i].id;break;
      				case 'checkbox': if(!_form[i].checked && _required)_hibas=_form[i].id ;break;
      				case 'select-one': if(!valueCheck(_form[i].id) && _required)_hibas=_form[i].id ;break;
      				case 'textarea': if(!valueCheck(_form[i].id) && _required) _hibas=_form[i].id ;break;
      			}
      		if (_hibas.length>0) break;
      	}
		if (_hibas.length==0) 
    		{
    			return true;
    		}
    	else 
    		{
			_focused=_hibas;
			return false;
    		}        
    }
  }

function sizeParams()
  {
      var ret=new Array();
      _obj=sizeParams.arguments[0];
      wfilter=new RegExp(/w[0-9]{1,4}/);
      hfilter=new RegExp(/h[0-9]{1,4}/);
      w=''+_obj.className.match(wfilter);
      h=''+_obj.className.match(hfilter);      
	    var gyengenlato="gyengenlato";
	    if (location.href.match(gyengenlato)!='gyengenlato')
		{
			ret[0]=w.substr(1)>0?w.substr(1):270;
			ret[1]=h.substr(1)>0?h.substr(1):100;
		}
		else
		{
			ret[0]=w.substr(1)>0?w.substr(1):350;
			ret[1]=h.substr(1)>0?h.substr(1):150;
		}
      return(ret);
  }

function popups()
  {
    var _visualwindow=document.getElementsByClassLikeName('visualwindow');
    var _alert=document.getElementsByClassLikeName('alert');
    var _popup=document.getElementsByClassLikeName('popup');
    var _vispopup=document.getElementsByClassLikeName('vispopup');
    var _submits=document.getElementsByClassLikeName('submitBtn');
    for (i=0;i<_visualwindow.length;i++)
      {
        _visualwindow[i].onclick=function()
          {
            var size=sizeParams(this);
			var resize;
			if (document.agent.ie && document.getElementsByTagName('select')>0 ) resize=false;
			else resize=true;
            new LITBox(this.href, {type:'window',overlay:true,height:size[1],width:size[0],resizable:resize,opacity:1});
            return false;
          }
      }

    for (i=0;i<_alert.length;i++)
      {
        _alert[i].onclick=function()
          {
            var size=sizeParams(this);
            var _title=this.title;
            new LITBox(_title, {type:'alert',overlay:true,height:size[1],width:size[0],resizable:false,opacity:1});
          }
      }
    
    for (i=0;i<_popup.length;i++)
      {
        _popup[i].onclick=function()
          {
            var size=sizeParams(this);
			//new LITBox(this.href, {type:'window',overlay:false,height:size[1],width:size[0],resizable:false,opacity:1});
			if (this.className.indexOf('w')>0)
				{
					var _window=window.open(this.href,'','width='+size[0]+', height='+size[1])
				}
			else
				{
					var _window=window.open(this.href,'','')
				}
			_window.focus();
			return false;
          }
      }
    
    
    for (i=0;i<_vispopup.length;i++)
      {
        _vispopup[i].onclick=function()
          {
            var size=sizeParams(this);
            var _title=this.title;
			new LITBox(this.href, {type:'window',overlay:false,height:size[1],width:size[0],resizable:false,opacity:1});
			return false;
          }
      }
    
	for (i=0;i<_submits.length;i++)
      {
        _submits[i].onclick=function()
          {
            if(this.type.toUpperCase()=='SUBMIT')
             {
    				var submitted=formHandlerFunc(parentForm(this));
            var _title=parentForm(this).title;
                if (!submitted) 
                  { 
                    var size=sizeParams(this);
				    if (location.href.match("/en/")=='/en/'){
                    	_title+='<br />Field to fill: <b>'+$(_focused).title+'</b>';
						} else {
						_title+='<br />Kitöltendő mező: <b>'+$(_focused).title+'</b>';	
						}
                   
				   new LITBox(_title, {type:'alert',overlay:false,height:size[1],width:size[0],resizable:false,opacity:1});
                    return false;
                  }
                else if(submitted)
                  {
                    parentForm(this).submit();
                  }
             }
          }
      }

  }

function requiredForms()
  {
    var _required=document.getElementsByClassName('required');
    for (i=0;i<_required.length;i++)
      {
        _required[i].onblur=function()
          {            
            if(this.className.indexOf('error')>-1)
            {
              if ((this.value.length==0 || this.title==this.value || this.value=='false' )) 
                {
                  this.value=this.title;
                  errorStyle(this);
                  $(_focused).focus();
                }
              else 
                {
                  errorStyle(this,'clear');
                }
            }              
          }
      }    
  }


function menuOpen()
  {
    var opener=document.getElementsByClassName('menuOpener');
    for (i=0;i<opener.length;i++)
      {
        opener[i].onclick=function()
          {
			//var _parentBlock=parentSearch(this.parentNode);
			var _childBlock=this.nextSibling.nextSibling;
				if (_childBlock.style.display=='block')
					{
						_childBlock.style.display='none';
						Element.removeClassName(this,'opened');
					}
				else
					{
						_childBlock.style.display='block';
						Element.addClassName(this,'opened');
					}
            return false;
          }
        opener[i].onmouseover=function()
            {
                if(!Element.hasClassName(this,'opened'))
					{
						Element.addClassName(this,'opener');
					}
            }
        opener[i].onmouseout=function()
            {
                if(Element.hasClassName(this,'opener')) Element.removeClassName(this,'opener');
            }
      }

/**
 * megfelelo osztalyu kepeknel (picLeft, picRight) a title-t beszurja kep alairaskent
 */  
function picInfo()
  {
    var pics=document.getElementsByClassLikeName('pic');
	for (i=0;i<pics.length;i++)
		{
			var _parent=pics[i].parentNode;
			var picWidth=Math.max(275,pics[i].offsetWidth);
			var _spanFrame=document.createElement('span');
			
			_spanFrame.setAttribute('class',pics[i].className);
			_spanFrame.style.width=picWidth+'px';
			
			_parent.insertBefore(_spanFrame,pics[i]);
			
			var _tooltipSpan=document.createElement('span');
    		_tooltipSpan.className='picinfo';
    		_tooltipSpan.style.width=picWidth+'px';
			var text = document.createTextNode(pics[i].title);
			_tooltipSpan.appendChild(text);

			var newPic=pics[i].cloneNode(true);
			_spanFrame.appendChild(newPic);
			_spanFrame.appendChild(_tooltipSpan);
			_parent.removeChild(pics[i]);			
		}
  }

/**
 * if exists pic title, append this title (size right) for this picture
function picInfo()
  {
    var picSpan = document.getElementsByClassName('pic');
    for (i=0;i<picSpan.length;i++)
      {
        pic=picWidth=picSpan[i].firstChild;
        picWidth=pic.offsetWidth;
       // _n=picSpan[i].firstChild.nextSibling;
       // if (_n.className=='picinfo') _n.style.width=picWidth+'px';
        if (pic.title) 
        {
          _span=document.createElement('span');
    		  _span.className='picinfo';
    		  _span.style.width=picWidth+'px';
          var text = document.createTextNode(pic.title);
          _span.appendChild(text);
          picSpan[i].appendChild(_span);
        }
      }
  }
*/

function showHide(obj,arg) // the sitemap function
{
	obj.onclick=function()
	{
		if(arg['type']=='class')
			{	
				var elems=document.getElementsByClassName(arg['name']);
				if (this.childNodes[0].nodeValue=="Schematic" || this.childNodes[0].nodeValue=="Detailed")
					{
					if (this.childNodes[0].nodeValue=="Schematic") 
						{
							this.childNodes[0].nodeValue="Detailed";
							this.title="Change the particular view";
						}
						else 
						{
							this.childNodes[0].nodeValue="Schematic";
							this.title="Change the schematic view";
						}						
					}
				else
					{
					if (this.childNodes[0].nodeValue=="Vázlatos") 
						{
							this.childNodes[0].nodeValue="Részletes";
							this.title="Váltás részletes nézetre";
						}
						else 
						{
							this.childNodes[0].nodeValue="Vázlatos";
							this.title="Váltás vázlatos nézetre";
						}						
					}

				for (i=0;i<elems.length;i++)
					{
						if (elems[i].style.display=='block') 
							{
								elems[i].style.display='none';
							}
						else
							{
								elems[i].style.display='block';
							}
					}												
			}
		else
			{
			}
	return false;
	}
}

function roundedBox()
   {
   		var gyorsbox = document.getElementsByClassName("gyorslink_box");
		var cw=6; //cornerwidth
		var ch=6; //cornerheight
        for( var i=0; i < gyorsbox.length ; i++) 
        {
			var roundedBox = gyorsbox[i];
			roundedBox.style.position='relative';
			bl=roundedBox.offsetLeft;
			bt=roundedBox.offsetTop;
			bw=roundedBox.offsetWidth-1;
			bh=roundedBox.offsetHeight;
			if (document.agent.ie.version>6) 
				{
					bh=roundedBox.offsetHeight+5;
				}
			bl=-1;
			
		  _rbc=document.createElement('div');
		  _rbc.className='bottomrightCorner';
		  _rbc.style.position='absolute';
		  _rbc.style.left=eval(bw-cw)+'px';
		  _rbc.style.top=eval(bh-cw)+'px';
		  roundedBox.appendChild(_rbc);

          _lbc=document.createElement('div');
		  _lbc.className='bottomleftCorner';
		  _lbc.style.position='absolute';
          _lbc.style.left=bl+'px';
		  _lbc.style.top=eval(bh-cw)+'px';
          roundedBox.appendChild(_lbc);
		}	 


      var color="red";
	  var boxes = document.getElementsByClassName(color+'Table');
      var cw=6; //cornerwidth
      var ch=6; //cornerheight
	  
		for( var i=0; i < boxes.length ; i++) 
        {    		
          if (!$('_topFrame'+i))
          {
    			var roundedBox = boxes[i];
    			roundedBox.style.position='relative';
    			bl=roundedBox.offsetLeft;
    			bt=roundedBox.offsetTop;
    			bw=roundedBox.offsetWidth;
    			bh=roundedBox.offsetHeight+roundedBox.offsetTop;
    			bl=-1;
    
    			_parent=roundedBox.parentNode;
    				
    			_topFrame=document.createElement('div');
    			_topFrame.className='tableFrame';
    			_topFrame.style.position='absolute';
    			_topFrame.style.left=bl+1+25+'px';
    			_topFrame.style.top=bt+'px';
    			_topFrame.style.width=bw+'px';
    			_topFrame.style.height=ch+'px';
    			
    			_bottomFrame=document.createElement('div');
    			_bottomFrame.className='tableFrame';
    			_bottomFrame.style.position='absolute';
    			_bottomFrame.style.left=bl+1+25+'px';
    			//_bottomFrame.style.top=bh+'px';
    			
			    _topFrame.style.top=eval(bt)+'px';
				_bottomFrame.style.top=eval(bh-cw)+'px';
				
    			_bottomFrame.style.width=bw+'px';
    			_bottomFrame.style.height=ch+'px';
    			
    			roundedBox.style.zIndex=1;
    			_topFrame.style.zIndex=2;
    			_bottomFrame.style.zIndex=2;
				
				_topFrame.id='_topFrame'+i;
				_bottomFrame.id='_bottomFrame'+i;
				
				_parent.insertBefore(_topFrame, roundedBox);
    			_parent.insertBefore(_bottomFrame, roundedBox);

    			_rtc=document.createElement('div');
    			_rtc.className=color+'RightTopCorner';
    			_rtc.style.position='absolute';
    			_rtc.style.left=eval(bw-cw)+'px';
    			_rtc.style.top='0px';
    			_topFrame.appendChild(_rtc);
    	
    			_rbc=document.createElement('div');
    			_rbc.className=color+'RightBottomCorner';
    			_rbc.style.position='absolute';
    			_rbc.style.left=eval(bw-cw)+'px';
    			//if (document.agent.gecko) _rbc.style.top=eval(bh-cw-25)+'px';
    			//else _rbc.style.top=eval(bh-cw)+'px';
    			_bottomFrame.appendChild(_rbc);
    	
    			_lbc=document.createElement('div');
    			_lbc.className=color+'LeftBottomCorner';
    			_lbc.style.position='absolute';
    			_lbc.style.left=bl+1+'px';
    			//if (document.agent.gecko) _lbc.style.top=eval(bh-cw-25)+'px';
    			//else _lbc.style.top=eval(bh-cw)+'px';
    			_bottomFrame.appendChild(_lbc);
         }  			
		}	 
}


/*
 * new(est) scripts with prototype  
 */
function silentSelect()
	{
		var selector=$('szolgaltato_select');
		var energie=$('energia_select');
		var selectors=document.getElementsByClassName('autoselect');
		for (i=0;i<selectors.length;i++)
			{
				selectors[i].onchange=function()
					{
						if ($('eoncsoport_select')) {
							document.location.href=this.value;
						}
						else {
							window.open(this.value,'leany');
						}
						return false;
					}
			}
		
		if (selector)
		{
		selector.onchange=function()
			{
				if (this.value!="")
				{
					window.open(this.value,'leany','');
					return false;
				}
			}
		}
		if (energie)
		{
	 	var divs=document.getElementsByClassName('fogyasztas','div');
		energie.onchange=function()
			{
				if (this.value!=0)
				 {
					var pos=this.value.indexOf('_');
				 	var _id='fogyasztas_'+this.value.substr(pos);
				 	for (i=1;i<=divs.length;i++)
					 {
					 	 var actdiv='fogyasztas_'+i;
						 if (this.value!=i) $(actdiv).style.display='none';
						 else $(actdiv).style.display='block';
					 }				 	
					$('fogyasztas').style.display='block';
				 }
				else
				{
				 	$('fogyasztas').style.display='none';
				}
			}
		}
	}

function collect()
	{
		var _back=document.getElementsByClassName('vissza','a');
		var _print=document.getElementsByClassName('print','a');
		var _toTop=document.getElementsByClassName('toTop','a');

		for (i=0;i<_back.length;i++)
			{
				_back[i].onclick=function()
				{
					window.history.back(); return false;
				}
			}

		for (i=0;i<_print.length;i++)
			{
				_print[i].onclick=function()
				{
					window.print(); return false;
				}
			}
		for (i=0;i<_toTop.length;i++)
		{
			_toTop[i].onclick=function()
				{
					window.scrollTo(0,0); return false;
				}
		}		
	}

function flashHeader()
	{

	var version = deconcept.SWFObjectUtil.getPlayerVersion();
	if (document.getElementById && version["major"] > 0) 
		{

		var h1_titles=document.getElementsByClassName('h1_title');
		var h1_titles_w=document.getElementsByClassName('h1_title_w');
		var h2_titles=document.getElementsByClassName('h2_title');

		for (i=0;i<h1_titles.length;i++)
		{
			if (h1_titles[i].id) h1_titles[i].id='';
			var _title=h1_titles[i].childNodes[0].nodeValue.replace(/(\s+)/g,'%20');
			var _flashvars='label='+_title;
			var _flash= '<embed src="swf/eon_text.swf" quality="high" scale="noscale" salign="lt" wmode="transparent" width="500" height="23" title="'+h1_titles[i].childNodes[0].nodeValue+'" flashvars='+_flashvars+' />';
			h1_titles[i].innerHTML=_flash;
		}
		for (i=0;i<h1_titles_w.length;i++)
			{
				if (h1_titles_w[i].id) h1_titles_w[i].id='';
				var _title=h1_titles_w[i].childNodes[0].nodeValue.replace(/(\s+)/g,'%20');
				var _flashvars='label='+_title;
				var _flash= '<embed src="swf/eon_text.swf" quality="high" scale="noscale" salign="lt" wmode="transparent" width="650" height="23" title="'+h1_titles_w[i].childNodes[0].nodeValue+'" flashvars='+_flashvars+' />';
				h1_titles_w[i].innerHTML=_flash;
				h1_titles_w[i].style.width='650px';
				h1_titles_w[i].style.position='absolute';
				h1_titles_w[i].style.top='0px';
				h1_titles_w[i].parentNode.style.overflow='visible';
				h1_titles_w[i].parentNode.style.paddingTop='30px';
			}
		for (i=0;i<h2_titles.length;i++)
			{
				if (h2_titles[i].id) h2_titles[i].id='';
				var _title=h2_titles[i].childNodes[0].nodeValue.replace(/(\s+)/g,'%20');
				var _flashvars='label='+_title;				
				var _flash='<embed src="swf/eon_text.swf" quality="high" scale="noscale" salign="lt" wmode="transparent" width="300" height="23" title="'+h2_titles[i].childNodes[0].nodeValue+'" flashvars='+_flashvars+' />';
				h2_titles[i].innerHTML=_flash;
			}
		}
	}

function showToolTipp(obj)
	{
		var _tooltipp=document.createElement('div');
		_tooltipp.id='toolTippBox_'+i;
		_tooltipp.className='toolTippBox';		
		obj.appendChild(_tooltipp);
	}

function toolTipBox()
	{
		var _tooltipp=document.getElementsByClassName('tooltipp');
		for (i=0;i<_tooltipp.length;i++)
			{
				_tooltipp[i].onmouseover=function()
					{
						showToolTipp(this);
						if (document.agent.ie)
							{
								size=100;
							}
						else size=30;
						$('toolTippBox_'+i).style.left=this.offsetLeft+size+'px';
						$('toolTippBox_'+i).style.top=this.offsetTop+size+'px';
						$('toolTippBox_'+i).innerHTML=this.title;
						$('toolTippBox_'+i).style.visibility='visible';
					}
				_tooltipp[i].onmouseout=function()
					{
						$('toolTippBox_'+i).style.visibility='hidden';
					}
			}
	}

function nextSb(obj, classNm)
	{
		var _next=obj.nextSibling;
		while (_next.className!=classNm)
			{
				_next=_next.nextSibling;
			}
		return _next;
	}

function effects()
	{
		var blindEffects=document.getElementsByClassLikeName('blindEffect');
		for (i=0;i<blindEffects.length;i++)
			{
				blindEffects[i].onclick=function()
					{
					  var _child=document.agent.ie?this.nextSibling:this.nextSibling.nextSibling;
					  //var _child=nextSb(this,'bEffect');
					  if(Element.hasClassName(_child,'blinded')) 
						{
							Element.removeClassName(_child, 'blinded');
							Effect.BlindDown(_child);
							Element.removeClassName(this, 'plus');
						}
					  else
						{
							Element.addClassName(_child, 'blinded');
							Effect.BlindUp(_child);
							Element.addClassName(this, 'plus');
						}
						
					}
			}
	}

function siteInit()
	{
	    var gyengenlato="gyengenlato";
	    if (location.href.match(gyengenlato)!='gyengenlato')
			{
				flashHeader();
				roundedBox();
				menuOpen();
				requiredForms();
				toolTipBox();
				effects();
			}
		collect();
		popups();
		picInfo();

	//msFilter();
		if ($('szolgaltato_select') || $('eoncsoport_select') || $('energia_select')) silentSelect(); 

		if($('sitemap_details'))
			{
				var id=$('sitemap_details');
				var sh=new Array();
				sh['type']='class';
				sh['name']='sublist';
				showHide(id,sh);
			}
		if($('search_field'))
			{
				new ComboBox("combobox","search_field",10);
				$("search_field").focus();
			}
	}

//Event.observe(window,'load',siteInit);

var eonWeb={
  include: function(component) {
		document.writeln('<script type="text/javascript" src="js/'+component+'"></script>');
	},
    
  load: function() { 
		try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
	
		var components = new Array(
		'litbox',
		'lightbox',
		'flashObject',
		'json',
		'effects',
		'controls',
		'dragdrop'
		);
	      
		components.each( function(include) { eonWeb.include(include+'.js') });
		Event.observe(window,'load',siteInit);
	}  
}
eonWeb.load();

function showDownloadables(item){
	for(i=1;i<6;i++){
		document.getElementById('item'+i).style.display='none'
	}
	document.getElementById(item).style.display='block'
	
	var box = document.getElementsByClassName("gyorslink_box");
	var right = document.getElementsByClassName("bottomrightCorner");
	var left = document.getElementsByClassName("bottomleftCorner");		

	right[0].style.top = parseInt(parseInt(Element.getHeight(box[0]))-6) + 'px'
	left[0].style.top = parseInt(parseInt(Element.getHeight(box[0]))-6) + 'px'		

}	 }