function doRegister(frm)
{
	var fr = document.forms[frm];
	if (!isValidEmail(fr.mlEmail.value))
	{
		alert("Δεν έχετε βάλει σωστό e-mail!");
		fr.mlEmail.focus();
		return false;
	}
	fr.submit();
}

function checkform(frm)
{
	var checked = false;
	var fr = document.forms[frm];
	if (!isValidEmail(fr.email.value))
	{
		alert("Δεν έχετε βάλει σωστό e-mail!");
		fr.email.focus();
		return false;
	}

	if (frm!="frmUpdateML") {
		if ((fr.password1.value!="")||(fr.password1.value.length>7))
		{
			if (fr.password2.value!=fr.password1.value)
			{
				alert('Οι δύο κωδικοί δεν συμπίπτουν! Παρακαλώ πληκτρολογήστε ξανά!');
				fr.password1.value="";
				fr.password2.value="";
				fr.password1.focus();
				return false;
			} else {
				fr.operation.value="update";
			}
		} else {
			alert('Δεν έχετε βάλει κωδικό ή είναι μικρότερος απο 8 ψηφία!');
			return false;
		}
	}
	fr.submit();

}

function isNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }


function isValidEmail(str) {
   return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}

function enelement(frm)
{
	var fr = document.forms[frm];
	if (fr.notify.value == 5)
	{
		fr.other.disabled = false;
		fr.other.focus();
	} else {
		fr.other.value = "";
		fr.other.disabled = true;
	}
}

function valbutton(thisform) {
	// place any other field validations that you require here
	// validate myradiobuttons
	myOption = -1;
	for (i=thisform.vote.length-1; i > -1; i--) {
		if (thisform.vote[i].checked) {
			myOption = i;
		}
	}
	if (myOption == -1) {
		alert("Πρέπει να ψηφίσετε!");
		return false;
	}

	// place any other field validations that you require here
	thisform.submit(); // this line submits the form after validation
}

function showtop() {
document.write('<div>');
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="730" height="160">');
				document.write('<param name="movie" value="http://www.momad.gr/moup.swf">');
				document.write('<param name="menu" VALUE="false">');
				document.write('<param name="quality" value="high" />');
				document.write('<embed src="http://www.momad.gr/moup.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="730" height="160"></embed>');
				document.write('</object>');
				document.write('</div>');
}