function signIn(thisFrm){
    if('' == thisFrm.usr.value){alert('Please enter your Username and try again');return false;}
    if('' == thisFrm.lgnid.value){alert('Please enter your Password and try again!');return false;}
    return true;
}
function launch(mapID){
    mindomoWindow = open('edit.php?m='+mapID, 'mindomo', 'height=' + screen.height + ',width=' + screen.width + ',resizable=yes');
    if (!mindomoWindow.opener) mindomoWindow.opener = self;
    return false;
}
function view(mapID){
    mindomoWindow = open('view.php?m='+mapID, 'mindomo', 'height=' + screen.height + ',width=' + screen.width + ',resizable=yes');
    if (!mindomoWindow.opener) mindomoWindow.opener = self;
    return false;
}
function needLoginMsg(){
    alert('You need to login to edit this map');
    return false;
}
function signOut(){
  mindomoWindow.close();
  
  if(mindomoWindow.closed){return true;}
  else {return false;}
}
function changeAccount(thisFrm)
{
	if(canceled) return;
    if('' == thisFrm.fnm.value){alert('Please enter your First Name and try again!');return false;}
    if('' == thisFrm.lnm.value){alert('Please enter your Last Name and try again!');return false;}
    if('' == thisFrm.pw1.value){alert('Please enter your password and try again!');return false;}
    if(thisFrm.pw1.value != thisFrm.pw2.value){alert('The passwords don\'t match!');return false;}
    return true;
}

function editAccount(thisFrm)
{
    if(canceled) return;
    if('' == thisFrm.fnm.value){alert('Please enter your First Name and try again!');return false;}
    if('' == thisFrm.lnm.value){alert('Please enter your Last Name and try again!');return false;}
    if('' == thisFrm.uname.value){alert('Please enter your Username and try again!');return false;}
    return true;
}

function changePassword(thisFrm)
{
    if(canceled) return;
    if('' == thisFrm.pwd.value){alert('Please enter your current Password and try again!');return false;}
    if('' == thisFrm.pwd1.value){alert('Please enter your new Password and try again!');return false;}
    if('' == thisFrm.pwd2.value){alert('Please re-enter your new Password and try again!');return false;}
    if(thisFrm.pwd2.value != thisFrm.pwd1.value) {alert('The passwords don\'t match!');return false;}
    return true;
}

function changeEmail(thisFrm)
{
    if(canceled) return;
    if('' == thisFrm.mail1.value){alert('Please enter your new E-mail address and try again!');return false;}
    if('' == thisFrm.mail2.value){alert('Please confirm your new E-mail address and try again!');return false;}
    if(thisFrm.mail2.value != thisFrm.mail2.value) {alert('The E-mails don\'t match!');return false;}
    return true;
}

function forgotPassword(thisFrm)
{
    if(canceled) return;
    if('' == thisFrm.mail.value){alert('Please fill in your E-mail address.');return false;}
    return true;
}