function MM_jumpMenu(targ,selObj,restore){ //v3.0
  if (selObj.options[selObj.selectedIndex].value!="#"){
  	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  }
  if (restore) selObj.selectedIndex=0;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_goToURL() { 
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { 
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
function goSetHeight(iframeName,height,minheight) {
  parent.setIframeHeight(iframeName,height,minheight);
}
function getDocHeight(doc) {
  var docHt = 0, sh, oh;
  if (doc.height) docHt = doc.height;
  else if (doc.body) {
    if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
    if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
    if (sh && oh) docHt = Math.max(sh, oh);
  }
  return docHt;
}
function setIframeHeight(iframeName,height,minheight) {
  var iframeWin = window.frames[iframeName];
  var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
  if ( iframeEl && iframeWin ) {
    iframeEl.style.height = "auto";
    var docHt = getDocHeight(iframeWin.document);
	if(height!=null && docHt>height)
		docHt = height;
	if(minheight!=null && minheight>docHt)
		docHt = minheight;
    if (docHt) iframeEl.style.height = docHt + "px";
  }
}
function YY_checkform() { 
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert(s)}
  document.MM_returnValue = (s=='');
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}
function addCommas(nStr,db){
	if(db==null) db=2;
	nStr = nStr.toFixed(db);
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	if(!(x2>0))
		x2 = '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ' ' + '$2');
	}
	return x1 + x2;
}
function zeroPad(num,count) {
	var numZeropad = num + '';
	while(numZeropad.length < count)
		numZeropad = "0" + numZeropad;
	return numZeropad;
}
function CheckLogin(o,u) {
	if(u) {
		var k=o.charCode || o.keyCode
		document.all ? k=k : k = parseInt(o.which);
		if((k > 44 && k < 58) || (k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k == 9 || k == 95 || k == 190 || k == 61 || k == 0) {
			return true;
		} else {
			alert(reg_formatumhiba.replace(/_CHAR_/,String.fromCharCode(k)));
			return false;
		}
	} else {
		o.value=o.value.replace(/([^0-9A-Za-z\-\_\.])/g,"_");
	}
}
function GetXmlHttpObject(handler) {
	var objXMLHttp=null
	if (window.XMLHttpRequest)
		objXMLHttp=new XMLHttpRequest()
	else if (window.ActiveXObject)
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	return objXMLHttp
}
var loadSiteLoader = true;
function loadXmlHttp(url, qStr, id) {
	var f = this;
	f.xmlHttp = GetXmlHttpObject();
	if(f.xmlHttp != null)	{
		f.el = MM_findObj(id);
		if(loadSiteLoader)
			f.el.innerHTML = '<div class="loader"></div>';
		url='/load'+url+"?"+qStr; 
		url=url+"&sid="+Math.random();
		f.xmlHttp.open("GET",url,true);
		f.xmlHttp.onreadystatechange = function(){f.stateChanged();};
		f.xmlHttp.send(null);
	}
	else alert('Your browser does not support Javascript!');
}
loadXmlHttp.prototype.stateChanged=function (){
	if (this.xmlHttp.readyState == 4 && (this.xmlHttp.status == 200 || !/^http/.test(window.location.href)))
		this.el.innerHTML = this.xmlHttp.responseText;
}
function ShowIframe(id){
	parent.ChangeCSSStyle('loader_'+id,'display','none');
	parent.ChangeCSSStyle('iframe_'+id,'display','block');
	goSetHeight('iframe_'+id);
}
function loadSite(url, qstr, id, typ){
	if(typ=='iframe')	{
		IFrame = MM_findObj(id);
		DIV = MM_findObj('div_'+id);
		if(qstr=='')
			qstr = 'iframe_id='+id;
		else
			qstr = 'iframe_id='+id+'&'+qstr;
		if(DIV==null) {
			IFrame.innerHTML = '';
			var newdiv = document.createElement('div');
			newdiv.setAttribute('id', 'div_'+id);
			newdiv.setAttribute('name', 'div_'+id);
			if(loadSiteLoader)
				newdiv.innerHTML = '<div class="loader" id="loader_'+id+'"></div>';
			if(loadSiteLoader)
				newdiv.innerHTML+= '<iframe name="iframe_'+id+'" id="iframe_'+id+'" marginwidth="0" marginheight="0" src="/iframe'+url+'?'+qstr+'" scrolling="no" frameborder="0" width="100%" allowtransparency="true"></iframe>';
			IFrame.appendChild(newdiv);
		}else{
			if(loadSiteLoader)
				ChangeCSSStyle('loader_'+id,'display','block');
			ChangeCSSStyle('iframe_'+id,'display','none');
		}
		MM_goToURL('parent.frames[\'iframe_'+id+'\']','/iframe'+url+'?'+qstr);
	}else{
		if(typ=='XMLHttp') {
			new loadXmlHttp(url, qstr, id);
		}
	}
	return false;
}
var CheckSearchData = true;
var HideSearchData = true;
function HideSearchDataSet(Value) {
	HideSearchData = Value;
}
function CheckSearch(ID,What,DefaultData,Lang) {
	switch(What) {
		case 'onBlur':
			if(ID.value=='')
				ID.value=DefaultData;
			break;
		case 'onFocus':
			if(ID.value==DefaultData)
				ID.value='';
			break;
		default:
			query_data = MM_findObj('header_query').value;
			if(query_data==DefaultData || query_data.split(" ").join("")=="") {
				return false;
			} else {
				return true;
			}
	}
}
function ChangeCSSStyle(What,Typ,Data) {
	var selObj = MM_findObj(What);
	if(selObj)
		if (document.layers)
			selObj[Typ] = Data;
		else
			selObj.style[Typ] = Data;
}
function CheckCSSStyle(What,Typ) {
	var selObj = MM_findObj(What);
	if(selObj)
		if (document.layers)
			return selObj[Typ];
		else
			return selObj.style[Typ];
}
function ChangeCSSClass(What,NewValue) {
	MM_findObj(What).className=NewValue;
}
function CheckCSSClass(What) {
	return MM_findObj(What).className;
}
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return null;
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}
function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}
function URLEncode(str) {
	str = str.replace(/\r\n/g,"\n");
	var utftext = "";
	for (var n = 0; n < str.length; n++) {
		var c = str.charCodeAt(n);
		if (c < 128) {
			utftext += String.fromCharCode(c);
		} else 
		if((c > 127) && (c < 2048)) {
			utftext += String.fromCharCode((c >> 6) | 192);
			utftext += String.fromCharCode((c & 63) | 128);
		} else {
			utftext += String.fromCharCode((c >> 12) | 224);
			utftext += String.fromCharCode(((c >> 6) & 63) | 128);
			utftext += String.fromCharCode((c & 63) | 128);
		}
	}
	return escape(utftext).replace('+', '%2B').replace('%20', '+').replace('*', '%2A').replace('/', '%2F').replace('@', '%40');

	//return escape(str).replace('+', '%2B').replace('%20', '+').replace('*', '%2A').replace('/', '%2F').replace('@', '%40');
}
function SnapToLayer() { 
  var x,y,ox,bx,oy,p,tx,a,b,k,d,da,e,el,args=SnapToLayer.arguments;a=parseInt(a);
  for (k=0; k<(args.length-3); k+=4)
   if ((g=MM_findObj(args[k]))!=null) {
    el=eval(MM_findObj(args[k+1]));
    a=parseInt(args[k+2]);b=parseInt(args[k+3]);
    x=0;y=0;ox=0;oy=0;p="";tx=1;da="document.all['"+args[k]+"']";
    if(document.getElementById) {
     d="document.getElementsByName('"+args[k]+"')[0]";
     if(!eval(d)) {d="document.getElementById('"+args[k]+"')";if(!eval(d)) {d=da;}}
    }else if(document.all) {d=da;} 
    if (document.all || document.getElementById) {
     while (tx==1) {p+=".offsetParent";
      if(eval(d+p)) {x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));
      }else{tx=0;}}
     ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);var tw=x+ox+y+oy;
     if(tw==0 || (navigator.appVersion.indexOf("MSIE 4")>-1 && navigator.appVersion.indexOf("Mac")>-1)) {
      ox=0;oy=0;if(g.style.left){x=parseInt(g.style.left);y=parseInt(g.style.top);
      }else{var w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;
      a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;
      x=document.body.scrollLeft + event.clientX + bx;
      y=document.body.scrollTop + event.clientY;}}
   }else if (document.layers) {x=g.x;y=g.y;var q0=document.layers,dd="";
    for(var s=0;s<q0.length;s++) {dd='document.'+q0[s].name;
     if(eval(dd+'.document.'+args[k])) {x+=eval(dd+'.left');y+=eval(dd+'.top');break;}}}
   if(el) {e=(document.layers)?el:el.style;
   var xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);
   if(navigator.appName=="Netscape" && parseInt(navigator.appVersion)>4){xx+="px";yy+="px";}
   if(navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1){
    xx+=parseInt(document.body.leftMargin);yy+=parseInt(document.body.topMargin);
    xx+="px";yy+="px";}e.left=xx;e.top=yy;}}
}
function is_array(input) {
	return typeof(input)=='object' && (input instanceof Array);
}
function addthis(what,lang) {
	url = encodeURIComponent(document.location.href);
	title = encodeURIComponent(document.title);
	window.open('/'+lang+'/jump/addthis/'+what+'/?u='+url+'&t='+title,'_blank');
	return false;
}
function Insurance() {
	MM_openBrWindow('http://www.eub.hu/online/index.php?pkod=27634','insurance','scrollbars=yes,width=1024,height=675');
	return false;
}
