


	// Code written by Szabó Richárd 2009


	/*
	function addEvents() {
	   var button= document.getElementsByTagName("img");
	   for(i=0;i<button.length;i++) {
	    if(button[i].parentNode.tagName=="A") {
		 	button[i].i1=new Image();	button[i].i1.src= button[i].src;
		 	button[i].i2=new Image();	button[i].i2.src= button[i].src.replace(/1(.gif)$/,"2$1");
			button[i].onmouseover= function() { this.src=this.i2.src; }
			button[i].onmouseout = function() { this.src=this.i1.src; }
			button[i].onfocus	 = function() { this.blur(); }
	   }}
	}
	*/



	function addEvents() {
		var menu= document.getElementById('menu');
		menu= menu.getElementsByTagName("img");
		var eo= YAHOO.util.Easing.easeOut;
		for( i=0; i<menu.length; i++ ) {
			menu[i].onmouseover = function() {
			  new YAHOO.util.Anim  (this,  { opacity:{to:0} }, 0.4, eo).animate()
			}
			menu[i].onmouseout = function() {
			  new YAHOO.util.Anim  (this,  { opacity:{to:1} }, 0.4, eo).animate();
			}		
		}	
	}








	

	function felir() {
		hf.hir.value=1;
		hf.submit();
	}
	function leir() {
		hf.hir.value=-1;
		hf.submit();
	}
	function reset() {	
		f= document.forms;
		for(i=0;i<f.length;i++) { f[i].reset(); }
	}

	
	
	
	function search() {
		str= document.getElementById('sid').value;
		location.href= ".?"+str;
	}
	
	
	
	
	
	function order() {
		var f= document.form;
		if( f.nev.value=="" || f.email.value=="" ||  f.tel.value=="" ) {
			return alert(" Az elérhetőségi adatok kitöltése kötelező! ");
		}
		if( f.email.value.indexOf("@")<2 ) {
			return alert(" A megadott e-mail cím hibás! ");
		}
		if( f.pass1.value != f.pass2.value ) {
			return alert(" A megadott reg. jelszavak nem egyeznek! ");
		}
		if( f.p_nev.value=="" || f.p_cim.value=="" ||  f.p_isz.value=="" ) {
			return alert(" A szállítási adatok megadása kötelező! ");
		}
		f.submit();
	}






	function setupHs() {
		hs.graphicsDir = 'css/hs/';
		hs.align = 'center';
		hs.transitions = ['expand', 'crossfade'];
		hs.outlineType = 'rounded-white';
		hs.dimmingOpacity = 0.30;
		hs.dimmingDuration= 100;
		hs.expandDuration = 200;
		hs.restoreDuration= 0;
		hs.restoreTitle='Kattints az ablak bezárásához';
		hs.showCredits= 0;
		// Add the controlbar
		if (hs.addSlideshow) hs.addSlideshow({
			interval: 5000,
			repeat: true
		});
	}




	function sbar() {
		if( screen.width>850 ) { return; }
		document.body.style.overflow="scroll";
	}



	
	
	window.onload = function() {
	  sbar();
	  addEvents();
	}
	
	
	
	