// global variables
var isMozilla;
var objDiv = null;
var originalDivHTML = "";
var DivID = "";
var over = false;
var addHeader = "";
var fillGridDatatbl = "";
var shouldFaceUser = false;
var flipCamera = false;
var gridDummyRows = false;
var gridDummyRowVal = new Array;
var AxpGridForm = "popup";
var fldmultiSelectdep = false;
var depNotBoundFld = "";
var axplatlongFldName = "";
var axpfilepathold = "";
var axpScanBarFldFocus = "";
var axpScriptaddrowres = "";
var axpScriptIsAddrow = true;
var dcLayoutType = "default";
var isDcLayoutSelected = false;
var formLabelJSON = [];
var buttonFieldFontJSON = [];
var regVarFldExp = new Array();
var select2EventType = "";
var select2IsOpened = false;
var select2IsFocused = false;
var setDesProp = {};
var forceRowedit = false;
var isGridFileUploadOnLoad = false;
var wizardHidenDcNos = [];
var gridRowEditOnLoad = false;
var dynamicMobileResolution = function () {
if ($(".grid-stack").hasClass("dynamicRunMode")) {
if ((window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <=
renderGridOptions.minWidth) {
$(".grid-stack").addClass("grid-stack-one-column-mode");
} else if ($(".tileLayoutDiv").length == 0) {
$(".grid-stack").removeClass("grid-stack-one-column-mode");
}
}
}
$j(document).ready(function () {
if (typeof isTstPostBackVal == "undefined" || isTstPostBackVal == "")
WireElapsTime(serverprocesstime, requestProcess_logtime);
AxpGridForm = AxpGridFormCols != "" ? AxpGridFormCols.split("♠")[0] : "popup";
if (theMode == "design") {
$(callParentNew("splitIcon", "id")).css({
"display": ""
}).removeClass("hide");
$(callParentNew("spiltHeading", "class")).css({
"display": ""
}).removeClass("hide");
}
tstReadOnly = false;
typeof commonReadyTasks == 'function' ? commonReadyTasks() : "";
if (typeof isTstPostBackVal != "undefined" && isTstPostBackVal != "") {
var resval = isTstPostBackVal.split("*$*");
//isTstPostBackVal = "";
var wBdrHtml = resval[0];
//if (typeof isWizardTstruct != "undefined" && isWizardTstruct) {
// $("#dvlayout").prepend($("#breadcrumb-panel").detach());
// $("#heightframe").append($("#formContainer").detach());
// $("#heightframe").append($("#toolBarBtns").detach());
// $("#heightframe").append($(".rightToolbarMain").detach());
//}
$("#wBdr").html("");
$("#wBdr").prepend(wBdrHtml);
var toolBarHtml = resval[1];
if ((typeof isWizardTstruct == "undefined" || isWizardTstruct == false) && IsObjCustomHtml == "False") {
$("#tstIcons").html("");
$("#tstIcons").prepend(toolBarHtml);
$("#iconsNewOptionIcon").after("");
$("#iconsNewOptionIcon").after(toolBarHtml);
$("#tstModernOpenIcons").html("");
var modenFooter = resval[2];
if (modenFooter != '') {
$("#tstModernOpenIcons").prepend(modenFooter.split('♦')[0]);
btnfooteropenlist = modenFooter.split('♦')[1];
if (btnfooteropenlist.indexOf('
';
// var addFooter = '';
// document.getElementById(divId).innerHTML = addHeader + columnstxt + addFooter;
// document.getElementById(divId).className = 'dimming Bordercolor';
// document.getElementById(divId).style.display = "block";
// document.getElementById('dimmer').style.height = document.body.scrollHeight;
//}
function hiddenFloatingDiv(divId) {
document.getElementById(divId).style.display = "none";
document.getElementById('dimmer').style.display = 'none';
DivID = "";
Resizewindow();
}
function Resizewindow() {
//adjustwin('100', this.window);
// This is to adjust the absolute position of the controls once
// the grid is shown or hidden.
var closeimg = document.getElementById("closeimg");
//closeimg.onmouseover();
//closeimg.onmouseout();
}
function togglesrchselect() {
var check = false;
var obj = document.getElementById("searchall");
if (obj.checked)
check = true;
else
check = false;
for (var i = 0; i < document.getElementById("s1").options.length; i++) {
var cntrl = "search" + i;
document.getElementById(cntrl).checked = check;
}
}
function PopupfadeTo(obj, opacity) {
obj = $j("#" + obj.id);
if (opacity <= 100) {
if (opacity < 0) {
opacity = 100;
document.body.style.cursor = 'default';
} else {
document.body.style.cursor = 'Hand';
opacity = 65;
}
SetOpacity(obj, opacity);
}
}
function valid_submit() {
GetCurrentTime("Tstruct load on Search Go button click(ajax call)");
var gov = $j("#goval");
gov.val("go");
var srchFld = $j("#searstr");
txtVal = CheckUrlSplChars(srchFld.val());
if (ValidateSrchFlds()) {
$j("#hdnSearchStr").val(txtVal);
$j("#searstr").val("");
var btn = $j("#btnGo");
if (btn.length > 0) {
GetProcessTime();
$j("#hdnbElapsTimeGo").val(callParentNew("browserElapsTime"));
btn.click();
}
} else
if (txtVal == "" || txtVal == null || txtVal == undefined) {
showAlertDialog("warning", 2007, "client");
}
return;
}
//function CheckUrlSplChars(value) {
// value = value.replace(/&/g, "&");
// value = value.replace(/%/g, "%25");
// value = value.replace(/&/g, "%26");
// value = value.replace(/'/g, "%27");
// value = value.replace(/"/g, "%22");
// value = value.replace(/#/g, "%23");
// //value = encodeURIComponent(value);
// return value;
//}
function DecodeUrlSplChars(value) {
value = value.replace(/&/g, "&");
value = value.replace(/%25/g, "%");
value = value.replace(/%26/g, "&");
value = value.replace(/%27/g, "'");
value = value.replace(/%22/g, '"');
value = value.replace(/%23/g, "#");
return value;
}
function ValidateSrchFlds() {
var srchDdl = $j("#ddlSearch");
var selFld = srchDdl.val();
var indx = $j.inArray(selFld, FNames);
var txtVal = $j.trim($j("#searstr").val());
if (indx != -1 && txtVal != "") {
var fldType = FDataType[indx];
if (fldType == "Date/Time") {
var srchFldValue = $j("#searstr");
var isproperdate = isDate(srchFldValue.val());
if (!isproperdate) {
srchFldValue.focus();
// showAlertDialog("warning", "please enter correct date/time ");
return false;
} else {
srchFldValue.focus();
return true;
}
} else {
return true;
}
} else {
return false;
}
}
function loadTstruct(recid) {
WireElapsTime(serverprocesstime, requestProcess_logtime);
ShowDimmer(true);
ResetNavGlobalVariables();
AxWaitCursor(true);
//window.document.location.href = "tstruct.aspx?transid=" + transid + "&recordid=" + recid;
try {
if (!window.parent.isSessionCleared && !window.opener) {
ASB.WebService.ClearNavigationSession();
window.parent.isSessionCleared = true;
}
if (!window.opener)
window.parent.disableNavigation = true;
else
window.opener.parent.disableNavigation = true;
GetLoadData(recid, "");
} catch (ex) {
Closediv();
}
}
// Checks if the browsers is IE or another.
// document.all will return true or false depending if its IE
// If its not IE then it adds the mouse event
if (!document.all)
document.captureEvents(Event.MOUSEMOVE)
// On the move of the mouse, it will call the function getPosition
// These varibles will be used to store the position of the mouse
var iX = 0
var iY = 0
// This is the function that will set the position in the above varibles
function getPosition(args) {
// Gets IE browser position
if (document.all) {
iX = event.clientX + document.body.scrollLeft
iY = event.clientY + document.body.scrollTop
}
// Gets position for other browsers
else {
iX = args.pageX
iY = args.pageY
}
}
function findPosX(obj) {
var curleft = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
} else if (obj.x)
curleft += obj.x;
return curleft;
}
function findPosY(obj) {
var curtop = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curtop += obj.offsetTop
obj = obj.offsetParent;
}
} else if (obj.y)
curtop += obj.y;
return curtop;
}
function FindCtrlPos(fldName) {
if (typeof (fldName) == "string") {
fldName = document.getElementById(fldName);
}
var fld = fldName;
var textbox = jQuery(fldName);
var offset = textbox.offset();
iX = findPosX(fld) + fld.clientWidth + 1;
iY = findPosY(fld) + fld.clientHeight + 1;
}
function ShowTooltipDiv() {
if (document.getElementById)
// Standard way to get element
div = document.getElementById('dvTip');
else if (document.all)
// Get the element in old IE's
div = document.all['dvTip'];
// if the style.display value is blank we try to check it out here
if (div.style.display == '' && div.offsetWidth != undefined && div.offsetHeight != undefined) {
div.style.display = (div.offsetWidth != 0 && elem.offsetHeight != 0) ? 'block' : 'none';
}
div.style.display = "block";
// Sets the position of the DIV
div.style.left = iX + 'px';
div.style.top = iY + 'px';
}
var regexFld = new RegExp("^[a-zA-z0-9_]+$");
function ShowTooltip(fldName, obj) {
HideTooltip();
var i = 0;
var toolTip = "";
var toolTipList = new Array();
var ttURL;
var toolTipHyperlnk = "";
for (i = 0; i < FNames.length; i++) {
if (FNames[i] == fldName) {
toolTip = FToolTip[i];
var displyText = "";
var stPos = toolTip.indexOf("