﻿function setCurrentTxtBox(txtBox) {
    currentDateTextBox = txtBox;
}

function ShowSelections(date) {
    var id = currentDateTextBox.substr(currentDateTextBox.indexOf(".") + 4, currentDateTextBox.length - currentDateTextBox.indexOf("."))
    document.getElementById(currentDateTextBox).value = date;
    var type = currentDateTextBox.substr(currentDateTextBox.indexOf(".") + 4, currentDateTextBox.length - currentDateTextBox.indexOf("."))
}

function showDemo(qryString) {
    window.open("../WebPages/frmShowDemo.aspx" + qryString, "OnLineDemo", "height=500,width=760;");
    return false;
}

function showTrainingDoc(documentPk) {
    var win = window.open("../WebPages/frmShowContent.aspx" + documentPk, "TrainingDocuments", "scrollbars=no,status=no,top=" + (screen.availHeight / 2 - 250) + ",left=" + (screen.availWidth / 2 - 500), false);
    win.focus();
    return false;
}

//Remove the Trailing Blank Spaces
function trim(strText) {
    while (strText.substring(0, 1) == ' ')
        strText = strText.substring(1, strText.length);
    while (strText.substring(strText.length - 1, strText.length) == ' ')
        strText = strText.substring(0, strText.length - 1);
    return strText;
} 