//settings
// you shoud setup this values to integrate with your settings

var lytmosRedirectPath = 'http://www.lytmos.com/redirect/redirect.asp';
var sendPasswordPath = 'http://www.lytmos.com/common/forgetpwd.asp?target=&login=';
var newUserLoginPath = 'https://www.lytmos.com/genselfreg/default.asp?GroupName=FLBR';
var formName = 'flbio';

//this is the name of the form
//var frm = document.flbio;

function SendPwd() {
    strLogin = document.getElementById("Login").value;
    if(strLogin == '') {
        alert('Please enter your Username');
        return false;
    }

    document.forms[formName].action = sendPasswordPath + strLogin;
    document.forms[formName].submit();

    return true;
}

function loginAction() {
    var strLogin;
	var strPwd;
	
	strLogin = document.getElementById("Login").value;
	strPwd=document.getElementById("Password").value;
	if(strLogin=="" || strPwd=="") {
	    alert("Please enter your Username and Password");
	    return false;
	}
	else {
    document.forms[formName].action = lytmosRedirectPath;
    document.forms[formName].submit();
    return true;
	}
}

function loginFailded() {
    var loc = document.location.toString();
    if (loc.indexOf("login=failed") > -1) {
        document.getElementById("error").innerHTML = "<font face='verdana, arial, helvetica, sans-serif' size='1' color='BD2034'><b>Invalid Login or Password</b></font><br>"
    }
}

function newUserLogin() {
    //window.location = newUserLoginPath;
    document.forms[0].action = newUserLoginPath;
    document.forms[0].submit();
}


