
  // egy elemet keres ki ID alapjan a dokumentumbol
  function GetElement(id)
  {
    return document.getElementById(id);
  }

  // egy text input ellenorzese
  function chkTxtInput(id)
  {
    return GetElement(id).value != "";
  }
  
  // egy form elkuldese ID alapjan
  function submitForm(id)
  {
    GetElement(id).submit();
  }
  
  // ket password mezot hasonlit ossze 
  function chkPassword(id_a,id_b)
  {
    return GetElement(id_a).value == GetElement(id_b).value;
  }
  
  // email cim ellenorzese
   function isEmail(strEmail)
	 {
		 validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
		 if (strEmail.search(validRegExp) == -1)
		 {
         return false;
		 }
		 return true;
   }
    // a bongeszo tipusat adja vissza
    function AppType() 
    {
      appname = navigator.appName;
      if (appname.indexOf('Microsoft') != -1) return "IE";
      if (appname.indexOf('Netscape') != -1) return "FF";
    }



// C O O K I E -----------------------------------------------------------------
function cwCreateCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function cwReadCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function cwDelCookie(name) {
	createCookie(name,"",-1);
}
// -----------------------------------------------------------------------------

