function oc(objid) {
	var o = document.getElementById(objid);
	var l5 = document.getElementById('am_5');
	var l6 = document.getElementById('am_6');
	var l7 = document.getElementById('am_7');
	var l8 = document.getElementById('am_8');
	if (o.style.display == "none") {
		o.style.display = "block";
		l5.style.top = 497;
		l6.style.top = 520;
		l7.style.top = 547;
		l8.style.top = 571;
		
	} else if (o.style.display == "block") {
		o.style.display = "none";
		l5.style.top = 397;
		l6.style.top = 420;
		l7.style.top = 447;
		l8.style.top = 471;		
	} else {
		o.style.display = "block";
		l5.style.top = 497;
		l6.style.top = 520;
		l7.style.top = 547;		
		l8.style.top = 571;		
	}
}

function oc_(objid) {
	var o = document.getElementById(objid);
	if (o.style.display == "none") {
		o.style.display = "block";		
		
	} else if (o.style.display == "block") {
		o.style.display = "none";
		
	} else {
		o.style.display = "block";
			
	}
}

function over_am(am_id)
{ document.getElementById(am_id).style.visibility="visible";
	}
	
function out_am(am_id)
{ document.getElementById(am_id).style.visibility="hidden";
	}
function sor_on()
{
this.style.backgroundColor='#394C76';
this.style.color='#FFFFFF';
this.style.cursor='hand'
	}
	
function torol_egyeni()
 {
 if (document.egyeni.email.value == 'e-mail cím')
   { document.egyeni.email.value = '';}
 }
 
 function vissza_egyeni()
 {
 if (document.egyeni.email.value == '')
   { document.egyeni.email.value = 'e-mail cím';}
 }
 
 function felir()
{
var text=document.egyeni.email.value;

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail címben szerepelni kell a @ karakternek!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail címben szerepelni kell a . karakternek!');

      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }   
if ((document.egyeni.email.value != "") && (document.egyeni.email.value != "e-mail cím"))
  {
 url_ = "szokincstar_feliratkozas_pre.php?email="+document.egyeni.email.value+"&fel_le=fel";
 document.egyeni.email.value = "e-mail cím";
 window.open(url_,'Feliratkozás','width=250,height=50,resizable=no,controls=no,menubar=no,toolbar=no,scrollbars=no');
	}
}

function leir()
{
	var text=document.egyeni.email.value;

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail címben szerepelni kell a @ karakternek!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail címben szerepelni kell a . karakternek!');

      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }
if ((document.egyeni.email.value != "") && (document.egyeni.email.value != "e-mail cím"))
  {
 url_ = "szokincstar_feliratkozas_pre.php?email="+document.egyeni.email.value+"&fel_le=le";
 document.egyeni.email.value = "e-mail cím";
 window.open(url_,'Feliratkozás','width=250,height=50,resizable=no,controls=no,menubar=no,toolbar=no,scrollbars=no');
	}
}

function felir_4()
{
var text=document.egyeni.email.value;

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail címben szerepelni kell a @ karakternek!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail címben szerepelni kell a . karakternek!');

      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }   
if ((document.egyeni.email.value != "") && (document.egyeni.email.value != "e-mail cím"))
  {
 url_ = "concord-4plusz.php?email="+document.egyeni.email.value+"&fel_le=fel";
 document.egyeni.email.value = "e-mail cím";
 window.open(url_,'Feliratkozás','width=250,height=50,resizable=no,controls=no,menubar=no,toolbar=no,scrollbars=no');
	}
}

function leir_4()
{
	var text=document.egyeni.email.value;

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail címben szerepelni kell a @ karakternek!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail címben szerepelni kell a . karakternek!');

      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }  
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Hibás e-mail cím!');
      document.egyeni.email.focus();
      document.egyeni.email.select();
      return false;
    }
if ((document.egyeni.email.value != "") && (document.egyeni.email.value != "e-mail cím"))
  {
 url_ = "concord-4plusz.php?email="+document.egyeni.email.value+"&fel_le=le";
 document.egyeni.email.value = "e-mail cím";
 window.open(url_,'Feliratkozás','width=250,height=50,resizable=no,controls=no,menubar=no,toolbar=no,scrollbars=no');
	}
}

function submit_vendegkonyv()
{
 if (document.form1.nev.value == "" || document.form1.email.value == "" || document.form1.szoveg.value == "")
  alert('Kérem töltse ki valamennyi mezot!')
  else form1.submit();
  
	}
	
function szokincstar_keres(feltetel)
 {
 	if (feltetel == 'sorszam')	 
 	document.form1.id.value = document.form1.sorszam_list.value;
    else 	
	document.form1.id.value = document.form1.datum_list.value;
document.form1.submit();	
  }  	
  
 
 
 function form_check()
{

   var text=document.form1.email.value;

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail címben szerepelni kell a @ karakternek!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail címben szerepelni kell a . karakternek!');

      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }  
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Hibás e-mail cím!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }  
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Hibás e-mail cím!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }   
 if (document.form1.nev.value == '' || document.form1.telefon.value == '' || document.form1.nev.value == '' || document.form1.cegnev.value == '' || document.form1.cegcim.value == '' || document.form1.reszletek.value == '')
    {alert ('Kérem töltse ki valamennyi mezot!');
    return false ;
	}
document.form1.submit();	
}

function form_check2()
{

   var text=document.form1.email.value;

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail címben szerepelni kell a @ karakternek!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail címben szerepelni kell a . karakternek!');

      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }  
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Hibás e-mail cím!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }  
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Hibás e-mail cím!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }   
 if (document.form1.nev.value == '' || document.form1.telefon.value == '' || document.form1.szlanev.value == ''  || document.form1.szlacim.value == '' || document.form1.reszletek.value == '' || document.form1.konyvek.value == '' || document.form1.postacim.value == '')
    {alert ('Kérem töltse ki valamennyi mezot!');
    return false ;
	}
document.form1.submit();	
}

function form_check3()
{

   var text=document.form1.email.value;

    if (text.indexOf('@') == -1)
    {
      alert('Az e-mail címben szerepelni kell a @ karakternek!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }
    if (text.indexOf('.') == -1)
    {
      alert('Az e-mail címben szerepelni kell a . karakternek!');

      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }  
    if ((text.length-text.lastIndexOf('.'))>4 || (text.length-text.lastIndexOf('.'))<2)
    {
      alert('Hibás e-mail cím!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }  
    if (text.indexOf('.')==text.indexOf('@')+1)
    {
      alert('Hibás e-mail cím!');
      document.form1.email.focus();
      document.form1.email.select();
      return false;
    }   
if (document.form1.nev.value == '' || document.form1.telefonszam.value == '' || document.form1.nev.value == '' || document.form1.cegnev.value == '' || document.form1.cegcim.value == '' || document.form1.reszletek.value == '')
    {alert ('Kérem töltse ki valamennyi mezot!');
    return false ;
	}
document.form1.file_nev.value = document.form1.turi_file.value;
document.form1.submit();	
}

/* cookie construct start */
function Cookie(document,name,hours,path,domain,secure) {
  // any VAR in "this" that does not start with a "$" will
  // be written into the cookie (read from also)
  this.$doc  = document
  this.$name = name
  if (hours)  this.$expiration=new Date((new Date()).getTime()+1000*60*30); else this.$expiration = null
  if (path)   this.$path   = path;                                             else this.$path       = null
  if (domain) this.$domain = domain;                                           else this.$domain     = null
  if (secure) this.$secure = true;                                             else this.$secure     = false
}

function CookieWrite() {
  var cookieval=""
  for(var prop in this) {
    if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function') || prop == '') continue
	if (cookieval != "") cookieval += '&'
	cookieval+=prop+":"+escape(this[prop])
  }
  var cookie=this.$name+"="+cookieval
  if (this.$expiration) cookie+='; expires=' + this.$expiration.toGMTString()
  if (this.$path)       cookie+='; path='    + this.$path
  if (this.$domain)     cookie+='; domain='  + this.$domain
  if (this.$secure)     cookie+='; secure'
  this.$doc.cookie=cookie
}

function CookieRead() {
  var allcookies=this.$doc.cookie
  if (allcookies=="") {
    return false
  }
  var start= allcookies.indexOf(this.$name+'=')
  if (start== -1) {
    return false
  }
  start += this.$name.length+1
  var end=allcookies.indexOf(';',start)
  if (end == -1) end=allcookies.length
  var cookieval = allcookies.substring(start,end)
  var a = cookieval.split('&')
  for (var i=0;i < a.length;i++) a[i]=a[i].split(':')
  for (var i=0;i < a.length;i++) this[a[i][0]]=unescape(a[i][1])
  return true
}

function CookieDelete() {
  var cookie = this.$name+'='
  if (this.$path)   cookie+='; path='+this.$path
  if (this.$domain) cookie+='; domain='+this.$domain
  cookie+='; expires=Fri, 02-Jan-1970 00:00:00 GMT'  // MAKE IT EXPIRE!
  this.$doc.cookie=cookie
}

new Cookie()
Cookie.prototype.write = CookieWrite
Cookie.prototype.del   = CookieDelete
Cookie.prototype.read  = CookieRead
/* cookie construct end */

var myCookie=new Cookie(document,"visit_counterx",1);
    myCookie.read();
var count=myCookie.count;
if(count!=parseInt(count))count=0;
var FIRST_VISIT=(!count)?true:false;
count++;
myCookie.count=count;
myCookie.write();

function runOnce()
{
//if (FIRST_VISIT)  document.getElementById('banner_30').style.display='block';
//document.getElementById('banner_30').style.display='block';
 // window.open('popup.htm','popup','width=448,height=475,resizable=no,controls=no,menubar=no,toolbar=no,scrollbars=no');*/
 //window.open('popup.htm','popup','width=502,height=515,resizable=no,controls=no,menubar=no,toolbar=no,scrollbars=no');
// document.getElementById('banner_30').style.display='block';

}

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
