this.JSON||(this.JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function f(n){return o.lastIndex=0,o.test(n)?'"'+n.replace(o,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function r(i,e){var c,l,h,a,v=n,s,o=e[i];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(i)),typeof t=="function"&&(o=t.call(e,i,o));switch(typeof o){case"string":return f(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";n+=u,s=[];if(Object.prototype.toString.apply(o)==="[object Array]"){for(a=o.length,c=0;c<a;c+=1)s[c]=r(c,o)||"null";return h=s.length===0?"[]":n?"[\n"+n+s.join(",\n"+n)+"\n"+v+"]":"["+s.join(",")+"]",n=v,h}if(t&&typeof t=="object")for(a=t.length,c=0;c<a;c+=1)l=t[c],typeof l=="string"&&(h=r(l,o),h&&s.push(f(l)+(n?": ":":")+h));else for(l in o)Object.hasOwnProperty.call(o,l)&&(h=r(l,o),h&&s.push(f(l)+(n?": ":":")+h));return h=s.length===0?"{}":n?"{\n"+n+s.join(",\n"+n)+"\n"+v+"}":"{"+s.join(",")+"}",n=v,h}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,o=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,u,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;n="",u="";if(typeof e=="number")for(o=0;o<e;o+=1)u+=" ";else typeof e=="string"&&(u=e);t=f;if(f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return r("",{"":i})}),typeof JSON.parse!="function"&&(JSON.parse=function(n,t){function r(n,i){var f,e,u=n[i];if(u&&typeof u=="object")for(f in u)Object.hasOwnProperty.call(u,f)&&(e=r(u,f),e!==undefined?u[f]=e:delete u[f]);return t.call(n,i,u)}var i;n=String(n),e.lastIndex=0,e.test(n)&&(n=n.replace(e,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return i=eval("("+n+")"),typeof t=="function"?r({"":i},""):i;throw new SyntaxError("JSON.parse");})}();var GleamTech=GleamTech||{};GleamTech.JavaScript=GleamTech.JavaScript||{},GleamTech.JavaScript.Util={},GleamTech.JavaScript.Util.OnDomReady=function(n){var t=t||{},i,r,u,f;if(t.loaded)return n();i=t.observers,i||(i=t.observers=[]),i[i.length]=n;if(t.callback)return;t.callback=function(){var i,n,u,r;if(t.loaded)return;for(t.loaded=!0,t.timer&&(clearInterval(t.timer),t.timer=null),i=t.observers,n=0,u=i.length;n<u;n++)r=i[n],i[n]=null,r();t.callback=t.observers=null};var s=!!(window.attachEvent&&!window.opera),e=!1,o=navigator.userAgent.match(/AppleWebKit\/(\d+)/);o&&o[1]<525&&(e=!0),document.readyState&&e?t.timer=setInterval(function(){var n=document.readyState;(n=="loaded"||n=="complete")&&t.callback()},50):document.readyState&&s&&window==window.top?(r=!1,u=function(){r||(r=!0,t.callback())},function(){try{document.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,50);return}u()}(),document.onreadystatechange=function(){document.readyState=="complete"&&(document.onreadystatechange=null,u())}):window.addEventListener?(document.addEventListener("DOMContentLoaded",t.callback,!1),window.addEventListener("load",t.callback,!1)):window.attachEvent?window.attachEvent("onload",t.callback):(f=window.onload,window.onload=function(){t.callback(),f&&f()})},GleamTech.JavaScript.Util.AddEvent=function(n,t,i){return n.addEventListener?(n.addEventListener(t,i,!1),!0):n.attachEvent?n.attachEvent("on"+t,i):!1},GleamTech.JavaScript.Util.RemoveEvent=function(n,t,i){return n.removeEventListener?(n.removeEventListener(t,i,!1),!0):n.detachEvent?n.detachEvent("on"+t,i):!1},GleamTech.JavaScript.Util.CancelEvent=function(n){if(!n)var n=window.event;return n.cancelBubble=!0,n.stopPropagation&&n.stopPropagation(),n.returnValue=!1,n.preventDefault&&n.preventDefault(),!1},GleamTech.JavaScript.Util.CancelEventExceptForTextInput=function(n){var n,t;return n||(n=window.event),t=GleamTech.JavaScript.Util.GetEventTarget(n),t.type=="text"||t.type=="password"||t.type=="textarea"||t.type=="file"?!0:GleamTech.JavaScript.Util.CancelEvent(n)},GleamTech.JavaScript.Util.GetEventTarget=function(n){var t;return n.target?t=n.target:n.srcElement&&(t=n.srcElement),t.nodeType==3&&(t=t.parentNode),t},GleamTech.JavaScript.Util.FindPosition=function(n){var i=0,t=0;if(n.offsetParent){i=n.offsetLeft,t=n.offsetTop;while(n=n.offsetParent)i+=n.offsetLeft,t+=n.offsetTop}return[i,t]},GleamTech.JavaScript.Util.GetStyleProperty=function(n,t){var i="";return n.currentStyle?i=n.currentStyle[t]:window.getComputedStyle&&(i=document.defaultView.getComputedStyle(n,null).getPropertyValue(t)),i},GleamTech.JavaScript.Util.GetStyleObject=function(n){var r,t,i;if(!document.styleSheets)return null;r="."+GleamTech.JavaScript.Util.Trim(n);if(document.styleSheets[0].rules){for(t=0;t<document.styleSheets.length;t++)for(i=0;i<document.styleSheets[t].rules.length;i++)if(document.styleSheets[t].rules[i].selectorText&&document.styleSheets[t].rules[i].selectorText.toLowerCase()==r.toLowerCase())return document.styleSheets[t].rules[i].style}else if(document.styleSheets[0].cssRules)for(t=0;t<document.styleSheets.length;t++)for(i=0;i<document.styleSheets[t].cssRules.length;i++)if(document.styleSheets[t].cssRules[i].selectorText&&document.styleSheets[t].cssRules[i].selectorText.toLowerCase()==r.toLowerCase())return document.styleSheets[t].cssRules[i].style;return null},GleamTech.JavaScript.Util.EnsureDisplay=function(n,t){var f=[],i=n,e,u,r;while(i&&i!==document)GleamTech.JavaScript.Util.GetStyleProperty(i,"display")=="none"&&f.push(i),i=i.parentNode;if(f.length>0){for(e={visibility:"hidden",display:"block"},u=0;u<f.length;u++){i=f[u],i.originalStyle={};for(r in e)i.originalStyle[r]=i.style[r],i.style[r]=e[r]}for(t(n),u=0;u<f.length;u++){i=f[u];for(r in e)i.style[r]=i.originalStyle[r];try{delete i.originalStyle}catch(o){i.originalStyle=null}}}else t(n)},GleamTech.JavaScript.Util.RequestJson=function(n,t,i,r,u){var s=function(){var n=null;if(window.XMLHttpRequest)try{n=new XMLHttpRequest}catch(t){n=null}else if(window.ActiveXObject)try{n=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{n=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){n=null}}return n},f,o,e;if((f=s())!=null){f.onreadystatechange=function(){var n,t,o,s,e;if(f.readyState==4){try{f.status!==undefined&&f.status!=0?(n=f.status,t=f.statusText):(n=13030,t="Status Unavailable")}catch(h){n=13030,t="Status Unavailable"}if(n==200||n==500){o=f.getResponseHeader("Content-Type"),s=o&&o.indexOf("application/json")!=-1;if(s){e=JSON.parse(f.responseText),n==200?i&&i(e):r&&r(e);return}t+="\n(Response content-type is not application/json)"}n>=100&&n<600?alert("HTTP Error:\n\n"+n+" - "+t):alert("Connection Error:\n\n"+n+" - "+t),u&&u()}};try{o="";for(e in t)o+=e+"="+JSON.stringify(t[e])+"\r\n";f.open("POST",n,!0),f.setRequestHeader("Content-Type","application/json; charset=utf-8"),f.setRequestHeader("Accept","application/json"),f.send(o)}catch(h){alert("Connection Error:\n\n"+h.toString())}}else alert("A required object, XMLHttpRequest is not found!")},GleamTech.JavaScript.Util.FormatFileSize=function(n){var t;if(n=="")return"";var i=["B","KB","MB","GB","TB"],r=i.length-1,u=[0,0,2,2,2];n=+n,t=0;while(n>=1024&&t<r)n/=1024,t++;return n.toFixed(u[t])+" "+i[t]},GleamTech.JavaScript.Util.GetFileNameWithoutExtension=function(n){var t,i=n.lastIndexOf(".");return t=i>0?n.substr(0,i):n},GleamTech.JavaScript.Util.GetFileExtension=function(n){var t,i=n.lastIndexOf(".");return t=i>0?n.substr(i,n.length):""},GleamTech.JavaScript.Util.GetZipFileName=function(n){var r,f="",t,i,u;return t=/(\.\w+)$/,i=t.exec(n),i&&(f=i[1].toLowerCase(),n=n.replace(t,f)),f==""?r=n+".zip":f==".zip"?(t=/\((\d+)\)\.zip$/,i=t.exec(n),u=i?parseInt(i[1]):0,u++,r=u==1?n.replace(/\.zip$/," ("+u+").zip"):n.replace(t," ("+u+").zip")):r=n.replace(t,".zip"),r},GleamTech.JavaScript.Util.CheckFileName=function(n){var t=/[\/:\*\?"<>|\\]/;return!t.test(n)},GleamTech.JavaScript.Util.TrimFileName=function(n){while(n.substring(0,1)==" "||n.substring(0,1)=="\n"||n.substring(0,1)=="\r")n=n.substring(1,n.length);while(n.substring(n.length-1,n.length)==" "||n.substring(n.length-1,n.length)=="."||n.substring(n.length-1,n.length)=="\n"||n.substring(n.length-1,n.length)=="\r")n=n.substring(0,n.length-1);return n},GleamTech.JavaScript.Util.Trim=function(n,t){return n=GleamTech.JavaScript.Util.TrimStart(n,t),n=GleamTech.JavaScript.Util.TrimEnd(n,t)},GleamTech.JavaScript.Util.TrimStart=function(n,t){t||(t=" ");while(n.substring(0,1)==t)n=n.substring(1,n.length);return n},GleamTech.JavaScript.Util.TrimEnd=function(n,t){t||(t=" ");while(n.substring(n.length-1,n.length)==t)n=n.substring(0,n.length-1);return n},GleamTech.JavaScript.Util.GetIEVersion=function(){if(document.body.style.scrollbar3dLightColor!=undefined)return document.body.style.opacity!=undefined?9:document.querySelector!=undefined?8:document.body.style.msInterpolationMode!=undefined?7:document.body.style.textOverflow!=undefined?6:5.5},GleamTech.JavaScript.Util.SetOpacity=function(n,t){"opacity"in n.style?n.style.opacity=t/10:n.style.filter=t==10?"":"alpha(opacity="+t*10+")"},GleamTech.JavaScript.Util.SetBorderRadius=function(n,t,i,r,u){var f=t+"px "+i+"px "+r+"px "+u+"px";"borderRadius"in n.style?n.style.borderRadius=f:"MozBorderRadius"in n.style?n.style.MozBorderRadius=f:"webkitBorderRadius"in n.style&&(n.style.webkitBorderRadius=f)},GleamTech.JavaScript.Util.CreateUniqueID=function(){return+new Date+""+Math.floor(Math.random()*8999+1e3)},GleamTech.JavaScript.Util.GetPropertyName=function(n,t){for(var i in n)if(n[i]==t)return i;return""},GleamTech.JavaScript.Util.SelectInputText=function(n,t,i){if(n.createTextRange){var r=n.createTextRange();r.collapse(!0),r.moveStart("character",t),r.moveEnd("character",i-t),r.select()}else n.setSelectionRange?n.setSelectionRange(t,i):n.selectionStart&&(n.selectionStart=t,n.selectionEnd=i);n.disabled||n.focus()},GleamTech.JavaScript.Util.DeSelectAllRanges=function(){document.selection?document.selection.empty():window.getSelection&&window.getSelection().removeAllRanges()},GleamTech.JavaScript.Util.SelectRange=function(n){var t;GleamTech.JavaScript.Util.DeSelectAllRanges(),document.selection?(t=document.body.createTextRange(),t.moveToElementText(document.getElementById(n)),t.select()):window.getSelection&&(t=document.createRange(),t.selectNode(document.getElementById(n)),window.getSelection().addRange(t))},GleamTech.JavaScript.Util.ExecuteFunctionByName=function(n,t){for(var u=Array.prototype.slice.call(arguments,2),r=n.split("."),f=r.pop(),i=0;i<r.length;i++)t=t[r[i]];return t[f].apply(t,u)},GleamTech.JavaScript.Util.Viewport={},GleamTech.JavaScript.Util.Viewport.GetWidth=function(){var n;return self.innerHeight?n=self.innerWidth:document.documentElement&&document.documentElement.clientWidth?n=document.documentElement.clientWidth:document.body&&(n=document.body.clientWidth),n},GleamTech.JavaScript.Util.Viewport.GetHeight=function(){var n;return self.innerHeight?n=self.innerHeight:document.documentElement&&document.documentElement.clientHeight?n=document.documentElement.clientHeight:document.body&&(n=document.body.clientHeight),n},GleamTech.JavaScript.Util.Viewport.GetScrollLeft=function(){var n;return self.pageXOffset||self.pageYOffset?n=self.pageXOffset:document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)?n=document.documentElement.scrollLeft:document.body&&(n=document.body.scrollLeft),n},GleamTech.JavaScript.Util.Viewport.GetScrollTop=function(){var n;return self.pageXOffset||self.pageYOffset?n=self.pageYOffset:document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)?n=document.documentElement.scrollTop:document.body&&(n=document.body.scrollTop),n},GleamTech.JavaScript.Util.Viewport.GetScrollWidth=function(){var n;return document.documentElement&&(document.documentElement.scrollWidth||document.documentElement.scrollHeight)?n=document.documentElement.scrollWidth:document.body&&(n=document.body.scrollWidth),n},GleamTech.JavaScript.Util.Viewport.GetScrollHeight=function(){var n;return document.documentElement&&(document.documentElement.scrollWidth||document.documentElement.scrollHeight)?n=document.documentElement.scrollHeight:document.body&&(n=document.body.scrollHeight),n},GleamTech.JavaScript.Util.LanguageData={},GleamTech.JavaScript.Util.Languages={},GleamTech.JavaScript.Util.GetLanguage=function(n){var t=GleamTech.JavaScript.Util.Languages[n],i;return t||(i=GleamTech.JavaScript.Util.LanguageData[n],t=new GleamTech.JavaScript.Util.Language(i),GleamTech.JavaScript.Util.Languages[n]=t),t},GleamTech.JavaScript.Util.Language=function(n){var i,r,t;for(this.strings={},i=0;i<n.length;i++)for(r=n[i].Language.Strings.String,t=0;t<r.length;t++)this.strings[r[t].key]=r[t].value},GleamTech.JavaScript.Util.Language.prototype.GetString=function(n,t,i,r){var u=this.strings[n];return t!=undefined&&(u=u.replace(/\{0\}/g,t)),i!=undefined&&(u=u.replace(/\{1\}/g,i)),r!=undefined&&(u=u.replace(/\{2\}/g,r)),u},GleamTech.JavaScript.Util.Sort={},GleamTech.JavaScript.Util.Sort.types={},GleamTech.JavaScript.Util.Sort.AddSortType=function(n,t,i,r){GleamTech.JavaScript.Util.Sort.types[n]={name:n,comparableValueFunction:t,compareFunction:i,defaultFormatFunction:r}},GleamTech.JavaScript.Util.Sort.CompareBasic=function(n,t){return n<t?-1:n>t?1:0},GleamTech.JavaScript.Util.Sort.GetSelf=function(n){return n},GleamTech.JavaScript.Util.Sort.GetLowerCase=function(n){return n.toLowerCase()},GleamTech.JavaScript.Util.Sort.GetNumber=function(n){return+n},GleamTech.JavaScript.Util.Sort.GetDate=function(n){return new Date(n)},GleamTech.JavaScript.Util.Sort.FormatSfDate=function(n){return n.substring(n.indexOf("|")+1,n.length)},GleamTech.JavaScript.Util.Sort.FormatIsoDate=function(n,format){var addLeadingZero=function(n){return(n<10&&n>=0?"0":"")+n},i=function(n){var t,dateObj,oh=0,om=0,i=/^(\d{4})?-?(\d\d)?-?(\d\d)?[T ]?(\d\d)?:?(\d\d)?:?(\d\d)?([Z+-])?(\d\d)?:?(\d\d)?$/;t=i.test(n);with(RegExp)$7!="Z"&&(oh=$7+$8,$9&&(om=$7+$9)),dateObj=$7?new Date(Date.UTC($1||77,$2-1,$3,$4-oh,$5-om,$6)):new Date($1||77,$2-1,$3,$4,$5,$6);return t?dateObj:null},str,t=i(n);with(t)str=format,str=str.replace("dd",addLeadingZero(getDate())),str=str.replace("MM",addLeadingZero(getMonth()+1)),str=str.replace("yyyy",getFullYear()),str=str.replace("HH",addLeadingZero(getHours())),str=str.replace("mm",addLeadingZero(getMinutes()));return str},GleamTech.JavaScript.Util.Sort.AddSortType("String",GleamTech.JavaScript.Util.Sort.GetSelf,GleamTech.JavaScript.Util.Sort.CompareBasic,null),GleamTech.JavaScript.Util.Sort.AddSortType("CaseInsensitiveString",GleamTech.JavaScript.Util.Sort.GetLowerCase,GleamTech.JavaScript.Util.Sort.CompareBasic,null),GleamTech.JavaScript.Util.Sort.AddSortType("Number",GleamTech.JavaScript.Util.Sort.GetNumber,GleamTech.JavaScript.Util.Sort.CompareBasic,null),GleamTech.JavaScript.Util.Sort.AddSortType("Date",GleamTech.JavaScript.Util.Sort.GetDate,GleamTech.JavaScript.Util.Sort.CompareBasic,null),GleamTech.JavaScript.Util.Sort.AddSortType("SortableFormattedDate",GleamTech.JavaScript.Util.Sort.GetSelf,GleamTech.JavaScript.Util.Sort.CompareBasic,GleamTech.JavaScript.Util.Sort.FormatSfDate),GleamTech.JavaScript.Util.Sort.AddSortType("ISODate",GleamTech.JavaScript.Util.Sort.GetSelf,GleamTech.JavaScript.Util.Sort.CompareBasic,GleamTech.JavaScript.Util.Sort.FormatIsoDate);function onPageResize(){divLogin.style.left=(GleamTech.JavaScript.Util.Viewport.GetWidth()-divLogin.offsetWidth)/2+"px",divLogin.style.top=(GleamTech.JavaScript.Util.Viewport.GetHeight()-divLogin.offsetHeight)/2+"px"}function onLanguageChange(){formLogin.submit()}function login(){return formLogin.username.value==""?(formLogin.username.focus(),!1):(GleamTech.JavaScript.Util.RequestJson(loginAction.value,{userName:formLogin.username.value,password:formLogin.password.value,languageName:dropDownListLanguages.options[dropDownListLanguages.selectedIndex].value,remember:formLogin.remember.checked},function(){window.location.href="./"},function(n){alert(language.GetString("505")+"\n\n"+n),formLogin.submitButton.disabled=!1}),formLogin.submitButton.disabled=!0,!1)}var language,formLogin,loginAction,divLogin,dropDownListLanguages;GleamTech.JavaScript.Util.OnDomReady(function(){formLogin=document.getElementById("formLogin"),divLogin=document.getElementById("divLogin"),loginAction=document.getElementById("loginAction"),dropDownListLanguages=document.getElementById("DropDownListLanguages"),language=GleamTech.JavaScript.Util.GetLanguage(dropDownListLanguages.options[dropDownListLanguages.selectedIndex].value),dropDownListLanguages.onchange=onLanguageChange,onPageResize(),divLogin.style.visibility="visible",formLogin.username.value==""?formLogin.username.focus():formLogin.password.focus(),GleamTech.JavaScript.Util.AddEvent(window,"resize",onPageResize)});
