﻿function SelectAllItems(CheckBoxControl, objstr) { if (CheckBoxControl.checked == true) { var i; for (i = 0; i < document.forms[0].elements.length; i++) { if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf(objstr) > -1)) { document.forms[0].elements[i].checked = true } } } else { var i; for (i = 0; i < document.forms[0].elements.length; i++) { if ((document.forms[0].elements[i].type == 'checkbox') && (document.forms[0].elements[i].name.indexOf(objstr) > -1)) { document.forms[0].elements[i].checked = false } } } }
function fnClickOK(sender, e) { __doPostBack(sender, e) }
function printPartOfPage(elementId, elementId2, Title) { var printContent = document.getElementById(elementId); var printContent2 = document.getElementById(elementId2); var printWindow = window.open('', '', 'left=50000,top=50000,width=0,height=0'); printWindow.document.write('<h3 style=text-align:center;>' + Title + '</h3>'); printWindow.document.write(printContent.innerHTML); printWindow.document.write('<br /><br />'); printWindow.document.write(printContent2.innerHTML); printWindow.document.close(); printWindow.focus(); printWindow.print(); printWindow.close() }
function limitText(limitField, limitNum) { if (limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum) } }
function ShowTechPopup() { var newTechWind = window.open('/Html/TechDetailsPopup.html', 'TechDetails', 'resizable,scrollbars,width=500,height=600'); newTechWind.focus(); if (newTechWind.opener == null) { newTechWind.opener = window; } }
function confirm_delete() { if (confirm("Are you sure you want to delete?") == true) return true; else return false; }
function checkUncheck(oImg, sChkId, imgChk, ImgNoChk) { var oChk = document.getElementById(sChkId); oChk.checked = !oChk.checked; oImg.src = (oChk.checked) ? imgChk : ImgNoChk; }
stuHover = function() {
    var cssRule; var newSelector; for (var i = 0; i < document.styleSheets.length; i++)
        for (var x = 0; x < document.styleSheets[i].rules.length; x++) {
        cssRule = document.styleSheets[i].rules[x]; if (cssRule.selectorText.indexOf("LI:hover") >= 0) { newSelector = cssRule.selectorText.replace(/LI:hover/gi, "LI.iehover"); document.styleSheets[i].addRule(newSelector, cssRule.style.cssText); }
    }
    var getElm = document.getElementById("nav").getElementsByTagName("LI"); for (var i = 0; i < getElm.length; i++) {
        getElm[i].onmouseover = function() { this.className += " iehover"; }
        getElm[i].onmouseout = function() { this.className = this.className.replace(new RegExp(" iehover\\b"), ""); }
    }
}
function changeCss(obj, _classname) { obj.className = (obj.className == _classname) ? '' : _classname; }
function showccvpopup() { var newimgwind = window.open('/html/ccvpopup.html', 'Credit Card Verification', 'width=425,height=500,resizable,scrollbars'); }
function btnClickOnce(btn, msg) { if (typeof (Page_ClientValidate) == 'function') { if (Page_ClientValidate() == false) { return false; } } if (btn.getAttribute('type') == 'button') { if (!msg || (msg = 'undefined')) { msg = 'working...'; } btn.value = msg; btn.disabled = true; } return true; }

