﻿//
// General JavaScript Helper Functions
//
function GenerateDocument(DocumentID, IsFinal, DocumentType)
{
    window.open('MySuccessStory.aspx?d='+DocumentID+'&f='+IsFinal+'&t='+DocumentType,DocumentType+DocumentID);
}
function checkCharacterCount(ctlTextID, ctlErrorID, maxLength)
{
    var txtField = document.getElementById(ctlTextID);
    var labField = document.getElementById(ctlErrorID);
    if (txtField.value.length >= maxLength)
    {
	    labField.style.visibility = "visible";
	    txtField.value = txtField.value.substring(0, maxLength);
    }
    else
    {
	    labField.style.visibility = "hidden";
	}
}
function ShowDocument(DocumentFilename)
{
    window.open(DocumentFilename,"SearchDocument");
}

