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.className='error' ;
	  hiba++;
	}
	else
	{
	  document.form.Email.className='input' ;
	}



if (document.form.Name.value=="") {
  document.form.Name.className='error' ;
  hiba++;
}
else
{
  document.form.Name.className='input' ;
}


//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"})
			}})
		})

});





