	function meretez(i)
	{
	 	y = document.body.clientHeight;

		if (y-i > 0)
		{
		  document.getElementById("kitolt").style.height = y-i;
		}
		else
		{
		 document.getElementById("kitolt").style.height = "auto";
		}
	}
	function ujablak(kepnev,w,h)
	{
		 win = window.open("kep.html","newwin","scrollbars=0, width="+w+",height="+h);
		 win.document.write("<html><body style='margin:0;padding:0'>");
		 win.document.write("<a href='javascript:window.close();'><img src='../pict/" + kepnev + "' alt='Bezáráshoz kattintson a képre!' border='0'></a>");
		 win.document.write("</body></html>");
		 win.moveTo(50,50);
	}
	function kodellenor(fn)
	{	 		 			 		
		switch (fn)
		{
		 	 case "kodtort": 		 
			 	  if (kodtort.strInput.value.length < 5 && kodtort.strInput.value != "")
			 	  {
			  	   	 alert("Túl rövid a kód, adjon meg 5 karaktert!");
					 kodtort.strInput.focus();
					 return false;
			 	  }
			 	  if (kodtort.strInput.value == "")
			 	  {
			  	   	 alert("Nem adott meg kódot!");
					 kodtort.strInput.focus();
					 return false;			 
			 	  }
			 break;
			 case "kodkereses": 		 
			 	  if (kodkereses.kod.value.length < 5 && kodkereses.kod.value != "")
			 	  {
			  	   	 alert("Túl rövid a kód, adjon meg 5 karaktert!");
					 kodkereses.kod.focus();
					 return false;
			 	  }
			 	  if (kodkereses.kod.value == "")
			 	  {
			  	   	 alert("Nem adott meg kódot!");
					 kodkereses.kod.focus();
					 return false;			 
			 	  }
			 break;
			 case "nevkereses": 		 
			 	  if (nevkereses.nev.value == "")
			 	  {
			  	   	 alert("Nem adott meg keresendő kifejezést!");
					 nevkereses.nev.focus();
					 return false;
			 	  }			 	  
			 break;
			 case "csillag": 		 
			 	  if (csillag.csillagos.selectedIndex == 0)
			 	  {
			  	   	 alert("Nem választott indexet!");
					 csillag.csillagos.focus();
					 return false;
			 	  }			 	  
			 break;
			 case "szakmai": 		 
			 	  if (szakmai.szakma.selectedIndex == 0)
			 	  {
			  	   	 alert("Nem választott szakmakódót!");
					 szakmai.szakma.focus();
					 return false;
			 	  }			 	  
			 break;
			 return true;
		}	 		 		 
	}
	function set_focus()
	{	 	
		if (document.nevkereses != null)
		{
		    //alert(document.kodkereses.elements);
			document.kodkereses.elements[0].focus();  
		}
		else
		{
		     document.kodtort.strInput.focus();
		}
			 		 
	}
	
      	
	
