
  var emailRegEx = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i;
  var controlErrorColor = "#FFFF00";
  var controlNormalColor = "#FFFFFF";
  var ErrorText = "";

// Script futási próba

  function displaymessage()
    {
      alert('Elnézést de a rendszer még nem működik. Kérjük, látogasson vissza később.');
    }

// validáció

  function Check_PreContact_NewEntry(txtContactFormName)
    {
      document.getElementById('formerror').innerHTML = ErrorText;
      document.getElementById('formerror').style.visibility = 'hidden';
      
	    txtContactFormName.nev.style.backgroundColor = controlNormalColor;
	    txtContactFormName.emailcim.style.backgroundColor = controlNormalColor;      
            
  		if(txtContactFormName.nev.value == "")
  		{
  			txtContactFormName.nev.select()
  			txtContactFormName.nev.focus()
  			txtContactFormName.nev.style.backgroundColor = controlErrorColor;
  			
  			ErrorText = "Kérem, adja meg nevét!";
  			
  			document.getElementById('formerror').innerHTML = ErrorText;
  			document.getElementById('formerror').style.visibility = 'visible';
  		
  			return;
  		}
  
  		if(txtContactFormName.emailcim.value == "" || txtContactFormName.emailcim.value.search(emailRegEx) == -1)
  		{
  		
  			txtContactFormName.emailcim.select()
  			txtContactFormName.emailcim.focus()
  			txtContactFormName.emailcim.style.backgroundColor = controlErrorColor;
  
  			ErrorText = "Kérem, adja meg helyesen az e-mail címét!";
  			
  			document.getElementById('formerror').innerHTML = ErrorText;
  			document.getElementById('formerror').style.visibility = 'visible';
  			
  			return;
  		}
  	
  		txtContactFormName.submit();
                  
    }

  function Check_Contact_NewEntry(txtContactFormName)
    {
      document.getElementById('formerror').innerHTML = ErrorText;
      document.getElementById('formerror').style.visibility = 'hidden';
      
	    txtContactFormName.nev.style.backgroundColor = controlNormalColor;
	    txtContactFormName.emailcim.style.backgroundColor = controlNormalColor;      

      /*if (txtContactFormName.nevkinalat.options[txtContactFormName.nevkinalat.selectedIndex].value == "Kérjük, válasszon!") {
        
        ErrorText = "Kérjük, válasszon domain nevet!";
  			document.getElementById('formerror').innerHTML = ErrorText;
  			document.getElementById('formerror').style.visibility = 'visible';  
        
        return;    
      }*/
            
  		if(txtContactFormName.nev.value == "")
  		{
  			txtContactFormName.nev.select()
  			txtContactFormName.nev.focus()
  			txtContactFormName.nev.style.backgroundColor = controlErrorColor;
  			
  			ErrorText = "Kérem, adja meg nevét!";
  			
  			document.getElementById('formerror').innerHTML = ErrorText;
  			document.getElementById('formerror').style.visibility = 'visible';
  		
  			return;
  		}
  
  		if(txtContactFormName.emailcim.value == "" || txtContactFormName.emailcim.value.search(emailRegEx) == -1)
  		{
  		
  			txtContactFormName.emailcim.select()
  			txtContactFormName.emailcim.focus()
  			txtContactFormName.emailcim.style.backgroundColor = controlErrorColor;
  
  			ErrorText = "Kérem, adja meg helyesen az e-mail címét!";
  			
  			document.getElementById('formerror').innerHTML = ErrorText;
  			document.getElementById('formerror').style.visibility = 'visible';
  			
  			return;
  		}
  	
  		if (txtContactFormName.uzenet.value == "") {
  			txtContactFormName.uzenet.select()
  			txtContactFormName.uzenet.focus()
  			txtContactFormName.uzenet.style.backgroundColor = controlErrorColor;
  			
  			ErrorText = "Kérem, töltse ki az üzenet mezőt!";
  			
  			document.getElementById('formerror').innerHTML = ErrorText;
  			document.getElementById('formerror').style.visibility = 'visible';
  		
  			return;
  		}
  	
  		txtContactFormName.submit();
                  
    }

  function DropDownListSelectedDomainName(txtContactFormName, txtSelectedDomainName)
    {
      //alert("debug");

      var intIndex = 0;
      while ( txtContactFormName.nevkinalat.options[intIndex].value != txtSelectedDomainName )
        { 
          intIndex++;
        }  
      txtContactFormName.nevkinalat.selectedIndex = intIndex; 
      txtContactFormName.selectedindex.value = intIndex;

      return;
    }

  function sendNumEvent(e) {
    if(window.event) {
      keynum = e.keyCode;
    }
    else if(e.which) {
      keynum = e.which
    }
    if ((keynum == 48) || (keynum == 49) || (keynum == 50) || (keynum == 51) || (keynum == 52) || (keynum == 52) || (keynum == 53) || (keynum == 54) || (keynum == 55) || (keynum == 56) || (keynum == 57) || (keynum == 8) || (keynum == 9)) {
      return true;
    }
    else {
      return false;
    }
  }
  
var Oldal = new function () {
	
	
	this.init = function () {
		var self = Oldal;
		var oldalak = Core.getElementsByClass ('kinalatioldal_hivatkozas');
		for (var i = 0; i < oldalak.length; i++) {
			Core.addEventListener (oldalak[i], 'click', self.mutat);
		}
    };
    
    this.mutat = function () {
    	var self = Oldal;
    	var m = "http://www.unidomain.hu";
		window.location = m; 
    }
};

Core.startDOMCL (Oldal); 