﻿//function ShowLogin() {
//    document.getElementById("loginregsiterbox").style.display = "";
//} //end ShowLogin
//function HideLogin() {
//    document.getElementById("loginregsiterbox").style.display = "none";
//} //end HideLogin




function ShowTrailWarning() {
    if (document.getElementById("loginregistergreeting").style.display.length > 0) {
        alert('You must be a registered user and logged in to update trail information.');
        return false;
    } else
        return true;
} //end ShowTrailWarning

function CharCountPhoto(textcontrol, maxchars) {
    if (textcontrol.value.length > maxchars)
        textcontrol.value = textcontrol.value.substring(0, maxchars);
    else {
        document.getElementById('lblCharCount').innerText = maxchars - textcontrol.value.length + ' of ' + maxchars + ' characters';
        document.getElementById('lblCharCount').textContent = maxchars - textcontrol.value.length + ' of ' + maxchars + ' characters';
    }
}//end CharCountPhoto

function CharCountReview(textcontrol, maxchars) {
    if (textcontrol.value.length > maxchars)
        textcontrol.value = textcontrol.value.substring(0, maxchars);
    else {
        document.getElementById('lblCharCount2').innerText = maxchars - textcontrol.value.length + ' of ' + maxchars + ' characters';
        document.getElementById('lblCharCount2').textContent = maxchars - textcontrol.value.length + ' of ' + maxchars + ' characters';
    }
}//end CharCountReview
