function showloginerror()
{
 Lightview.show({href: '#loginerror', options: {width: 450, height: 45}});
}

function check() 
{ 
  if(document.getElementById("staylogin").value=="0")
  {
	document.getElementById("staylogin").value = "1"; 
	document.getElementById("loginpic").src = "images/system/checkbox-out.gif"; 
  }
  else
  {
	document.getElementById("staylogin").value = "0"; 
	document.getElementById("loginpic").src = "images/system/checkbox-in.gif"; 
  }
} 



 
function expandCollapse(ElementId)
{
  var theElement = document.getElementById(ElementId);
  theElement.style.display = (theElement.style.display == 'none') ? 'block' : 'none';
}


function verifyData() {
var hiba=0;

    var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
   var address = document.form.email.value;
   if(reg.test(address) == false) {
        document.form.email.style.backgroundColor='#ffc476' ;
      hiba++;
    }
    else
    {
        document.form.email.style.backgroundColor='#ffffff' ;  
    }  

 
if (document.form.name.value=="") {
    document.form.name.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.name.style.backgroundColor='#ffffff' ;}

   
if (document.form.szname.value=="") {
    document.form.szname.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.szname.style.backgroundColor='#ffffff' ;}

if (document.form.hely.value=="") {
    document.form.hely.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.hely.style.backgroundColor='#ffffff' ;}
   
if (document.form.ev.value=="") {
    document.form.ev.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.ev.style.backgroundColor='#ffffff' ;}
   
if (document.form.ho.value=="") {
    document.form.ho.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.ho.style.backgroundColor='#ffffff' ;}
   
if (document.form.nap.value=="") {
    document.form.nap.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.nap.style.backgroundColor='#ffffff' ;}
   
if (document.form.aname.value=="") {
    document.form.aname.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.aname.style.backgroundColor='#ffffff' ;}
   
if (document.form.mobil.value=="") {
    document.form.mobil.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.mobil.style.backgroundColor='#ffffff' ;}
   
if (document.form.varos.value=="") {
    document.form.varos.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.varos.style.backgroundColor='#ffffff' ;}
   
if (document.form.utca.value=="") {
    document.form.utca.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.utca.style.backgroundColor='#ffffff' ;}
   
if (document.form.munkahely.value=="") {
    document.form.munkahely.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.munkahely.style.backgroundColor='#ffffff' ;}
   
if (document.form.beosztas.value=="") {
    document.form.beosztas.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.beosztas.style.backgroundColor='#ffffff' ;}
   
if (document.form.varos1.value=="") {
    document.form.varos1.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.varos1.style.backgroundColor='#ffffff' ;}
   
if (document.form.utca1.value=="") {
    document.form.utca1.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.utca1.style.backgroundColor='#ffffff' ;}
   
if (document.form.isz11.value=="") {
    document.form.isz11.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.isz11.style.backgroundColor='#ffffff' ;}
   
if (document.form.isz1.value=="") {
    document.form.isz1.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.isz1.style.backgroundColor='#ffffff' ;}
   
if (document.form.mtel.value=="") {
    document.form.mtel.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.mtel.style.backgroundColor='#ffffff' ;}
   
if (document.form.valasztas.value=="") {
    document.form.valasztas.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.valasztas.style.backgroundColor='#ffffff' ;}
   
if (document.form.szakkepzettseg.value=="") {
    document.form.szakkepzettseg.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.szakkepzettseg.style.backgroundColor='#ffffff' ;}

if (document.form.nyelv.value=="") {
    document.form.nyelv.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.nyelv.style.backgroundColor='#ffffff' ;}   

if (document.form.sztech.value=="") {
    document.form.sztech.style.backgroundColor='#ffc476' ; hiba++; }else
   {document.form.sztech.style.backgroundColor='#ffffff' ;}   
   
//alert if fields are empty and cancel form submit
  if (hiba!=0) {
	return false;
  }
  else 
  {
	document.form.submit();
  }
}

//minimum 3 karakter a kreeséshez!
	function fadeout3(){
		new Effect.Opacity("message_error", {duration:2, from:1.0, to:0.0});
	}    
	
function reportMin3() {
		document.getElementById('message_error').style.display='block' ;
		fadeout3.delay(2);
		Element.hide.delay(3.9, "message_error");
}
	 function Valdiate(txt)  
	 {  
		 if(txt.value.length<3)  
		 {  
			 txt.focus();   
			 reportMin3();
		 }  
		 else
		 {
		  document.kereso.submit();
		 }
	 }  
	 

$(function(){

	$('#menu a')
		.css( {backgroundPosition: "0 0"} )
		.mouseover(function(){
			$(this).stop().animate({backgroundPosition:"(-300px 0)"}, {duration:500})
		})
		.mouseout(function(){
			$(this).stop().animate({backgroundPosition:"(-500px 0)"}, {duration:500, complete:function(){
				$(this).css({backgroundPosition: "0 0"})
			}})
		})

});



