﻿
// function to show/hide the categories/subcategories in the side menu
function FuncShowHide(rowname){
  
  if (document.getElementById(rowname).style.display == document.getElementById('trX').style.display){
     document.getElementById(rowname).style.display = "none";
  } else {
     document.getElementById(rowname).style.display = document.getElementById('trX').style.display
  }
}


function enablebtn() {

    if (document.register.tandc.checked) {
        document.register.Submit.disabled = false;
    }
    else {
        document.register.Submit.disabled = true;
    }

}


//YES | NO Prompt Box
function confirmDelete(msg) {
    if (confirm(msg)) {
        return true;
    } else {
        return false;
    }
}


//Open a new Help Popup window
function PopupCenter(pageURL, title, w, h) {
    var left = (screen.width / 2) - (w / 2);
    var top = (screen.height / 2) - (h / 2);
    var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);

    targetWin.focus()

    return false;

}




function ShowWatermark(WatermarkText, input) {
    if (input.value == "") {
        input.value = WatermarkText;
    }
}

function HideWatermark(WatermarkText, input) {

    if (input.value == WatermarkText) {
        input.value = "";
    }
}
