﻿/*jsWidget.js*/function jsWidget(){};var JSWidget=new jsWidget();jsWidget.prototype.version="0.0.2";jsWidget.prototype.isOpera=/opera/i.test(navigator.userAgent);jsWidget.prototype.isFF=(/firefox/i.test(navigator.userAgent) && !(/opera/i.test(navigator.userAgent)));jsWidget.prototype.isChrome=/chrome/i.test(navigator.userAgent);jsWidget.prototype.isIE=(/msie/i.test(navigator.userAgent) && !(/opera/i.test(navigator.userAgent)));jsWidget.prototype.isIE5=((/msie/i.test(navigator.userAgent) && !(/opera/i.test(navigator.userAgent))) &&/msie 5\.0/i.test(navigator.userAgent));jsWidget.prototype.isIE7=((/msie/i.test(navigator.userAgent) && !(/opera/i.test(navigator.userAgent))) &&/msie 7\.0/i.test(navigator.userAgent));jsWidget.prototype.isMacIE=(/msie.*mac/i.test(navigator.userAgent) && !(/opera/i.test(navigator.userAgent)));jsWidget.prototype.isKhtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);jsWidget.prototype.isKonqueror=/Konqueror/i.test(navigator.userAgent);jsWidget.prototype.isGecko=/gecko/i.test(navigator.userAgent);jsWidget.prototype.isWebkit=/WebKit/i.test(navigator.userAgent);jsWidget.prototype._digits ="0123456789";jsWidget.prototype._letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";String.prototype.ltrim=function(){var re=/\s*((\S+\s*)*)/;return this.replace(re, "$1");};String.prototype.rtrim=function(){var re=/((\s*\S+)*)\s*/;return this.replace(re, "$1");};String.prototype.trim=function(){return this.replace(/((\s*\S+)*)\s*/,"$1").replace(/\s*((\S+\s*)*)/,"$1");};String.prototype.left=function(n){if(typeof n !="number") return "";if(n<=0) return "";if(n>this.length) return this;return this.substring(0,n);};String.prototype.right=function(n){if(typeof n !="number") return "";if(n<=0) return "";var nLen=this.length;if(n>nLen) return this;return this.substring(nLen,nLen-n);};jsWidget.prototype.isFunction=function(obj){return((typeof obj==="function"));};jsWidget.prototype.isEmpty=function(v1,v2){if(v1==""){return v2;};return v1;};jsWidget.prototype.isNull=function(v1,v2){if(typeof v1=="undefined" || v1==null){return v2;};return v1;};jsWidget.prototype.setCookie=function(name,value,days){var expires="";if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires=";expires="+date.toGMTString();};document.cookie=name+"="+value+expires+";path=/";};jsWidget.prototype.getCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);};if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);};};return null;};jsWidget.prototype.deleteCookie=function(name){this.setCookie(name,"",-1);};jsWidget.prototype._isArray=function(a){if(typeof a=="object"){try{var str=a.constructor.toString().match(/array/i);return(str !=null);}catch(e){return false;};};return false;};jsWidget.prototype._isObject=function(a){if(typeof a=="object"){return true;};return false;};jsWidget.prototype._arrayToString=function(a,s){var arr=[];for(var i=0;i<a.length;i++){if(this._isArray(a[i])){arr.push(this._arrayToString(a[i],s));}else if(this._isObject(a[i])){arr.push(this._objectToString(a[i],s));}else{switch(typeof a[i]){case "number": arr.push(a[i]);break;default:arr.push("\""+a[i]+"\"");break;};};};return "["+arr.join(s)+"]";};jsWidget.prototype._objectToString=function(o,s){var arr=[];for(var i in o){if(this._isArray(o[i])){arr.push("\""+i+"\":"+this._arrayToString(o[i],s));}else if(this._isObject(o[i])){arr.push("\""+i+"\":"+this._objectToString(o[i],s));}else{switch(typeof o[i]){case "number": arr.push("\""+i+"\":"+o[i]);break;default:arr.push("\""+i+"\":"+"\""+o[i]+"\"");break;};};};return "{"+arr.join(s)+"}";};jsWidget.prototype.OBJ2STR=function(obj,s){if(!s){s=",";};return this._objectToString(obj,s);};function EXTEND(cls,superCls,className){cls.prototype=new superCls(className);cls.prototype.constructor=cls;cls.prototype.parent=superCls.prototype;};function log(message){if(!log.window_ || log.window_.closed){var win=window.open("", null, "width=400,height=200,"+"scrollbars=yes,resizable=yes,status=no,"+"location=no,menubar=no,toolbar=no");if(!win) return;var doc=win.document;doc.write("<html><head><title>Debug Log</title></head>"+"<body></body></html>");doc.close();log.window_=win;};var logLine=log.window_.document.createElement("div");logLine.appendChild(log.window_.document.createTextNode(message));log.window_.document.body.appendChild(logLine);};var css_browser_selector = function() {var ua=navigator.userAgent.toLowerCase(),is=function(t){return ua.indexOf(t) != -1;},h=document.getElementsByTagName('html')[0],b=(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?'gecko ff2':is('firefox/3')?'gecko ff3':is('gecko/')?'gecko':is('opera/9')?'opera opera9':/opera\s(\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('chrome')?'chrome webkit safari':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';var c=b+os+' js'; h.className += h.className?' '+c:c;}();function jsContent(type,value,method,para){if(type !="id" && type !="url"){throw new Error(3,"Wrong content type, can only be 'id' or 'url'\n"+type);};this.type=type;this.value=value;if(type=="url"){if(method !="get" && method !="post"){throw new Error(4,"Wrong content submission method, can only be 'get' or 'post'\n"+method);};this.method=method;if(this.method=="post"){this.para=para;};};};String.prototype.isEmail=function(){var email=this;if(!email){return false;};var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/;var check=/@[\w\-]+\./;var checkend=/\.[a-zA-Z]{2,3}$/;if(((email.search(exclude) !=-1)||(email.search(check))==-1)||(email.search(checkend)==-1)) return false;else return true;};String.prototype.isPhone=function(){var phone=this;var a=phone.replace(/\D+/g, '-');a=a.match(/(\d+-?)*(\d{3}-?){2}\d{4}/g);err=a !=null && a.length ? 0 : 2;return(err==0);};String.prototype.isInteger=function(){var num=this;var exp=/^\s*[-\+]?\d+\s*$/;return(this.match(exp) !=null);};String.prototype.isNumeric=function(){var exp=new RegExp("^\\s*([-\\+])?(\\d+)?(\\.(\\d+))?\\s*$");return(this.match(exp) !=null);};String.prototype.isDate=function(dateorder){var exp=null;var yi,mi,di;switch(dateorder){case "ymd": exp=new RegExp("^(\\d{4})([.\\-/])(\\d{2})\\2(\\d{2})$");yi=1;mi=3;di=4;break;case "mdy": exp=new RegExp("^(\\d{2})([.\\-/])(\\d{2})\\2(\\d{4})$");mi=1;di=3;yi=4;break;case "dmy": exp=new RegExp("^(\\d{2})([.\\-/])(\\d{2})\\2(\\d{4})$");di=1;mi=3;yi=4;break;};if(exp==null){return false;};var match=exp.exec(this);if(!match){return false;};var y=match[yi], m=match[mi]-1, d=match[di];var date=new Date(y,m,d);return(date.getFullYear()==y && date.getMonth()==m && date.getDate()==d);};String.prototype.isZip=function(){var exp=new RegExp("^((\\d{5}([-])\\d{4})|(\\d{5})|([AaBbCcEeGgHhJjKkLlMmNnPpRrSsTtVvXxYy]\\d[A-Za-z]\\s?\\d[A-Za-z]\\d))$");return(this.match(exp) !=null);};String.prototype.isUSState=function(){return(this.match(/^(A[LKSZRAEP]|C[AOT]|D[EC]|F[LM]|G[ANU]|HI|I[ADLN]|K[SY]|LA|M[ADEHINOPST]|N[CDEHJMVY]|O[HKR]|P[ARW]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$/i) !=null);};String.prototype.isCreditCard=function(){var exp=new RegExp("^((4\\d{3})|(5[1-5]\\d{2})|(6011))([-])?\\d{4}([-])?\\d{4}([-])?\\d{4}|3[4,7]\\d{13}$");return(this.match(exp) !=null);};String.prototype.isAlpha=function(){return(this.match(/^[a-zA-Z\s]+$/) !=null);};String.prototype.isAlphaNumeric=function(){return(this.match(/^[a-zA-z0-9\s]+$/) !=null);};String.prototype.encode=function(){var str=this;if(str==null || str=="null"){return "";};str=str.replace(/\+/g,"~~PL~~");str=str.replace(/'/g,"~~Q~~");str=str.replace(/"/g,"~~QQ~~");str=escape(str);return str;};String.prototype.decode=function(){var str=this;if(str==null || str=="null"){return "";};str=unescape(str);str=str.replace(/~~Q~~/g,"'");str=str.replace(/~~QQ~~/g,'"');str=str.replace(/~~PL~~/g,"+");return str;};if(window.HTMLElement){HTMLElement.prototype.insertAdjacentElement=function(where,parsedNode){switch(where){case "beforeBegin": return this.parentNode.insertBefore(parsedNode,this);case "afterBegin": return this.insertBefore(parsedNode,this.firstChild);case "beforeEnd": return this.appendChild(parsedNode);case "afterEnd": if(this.nextSibling){return this.parentNode.insertBefore(parsedNode,this.nextSibling);}else{return this.parentNode.appendChild(parsedNode);};};};};
/*jsWidgetDOMCore.js*/jsWidget.prototype.getAbsPos=function(e){var res={left:0,top:0,width:0,height:0,clientWidth:0,clientHeight:0};if(e !==null){res.left=e.offsetLeft;res.top=e.offsetTop;res.width=e.offsetWidth;res.height=e.offsetHeight;var offsetParent=e.offsetParent;var parentNode=e.parentNode;while(offsetParent !==null){res.left+=offsetParent.offsetLeft;res.top+=offsetParent.offsetTop;if(offsetParent !=document.body && offsetParent !=document.documentElement){res.left-=offsetParent.scrollLeft;res.top-=offsetParent.scrollTop;};if(this.isGecko){while(offsetParent !=parentNode && parentNode !==null){res.left-=parentNode.scrollLeft;res.top-=parentNode.scrollTop;parentNode=parentNode.parentNode;};};parentNode=offsetParent.parentNode;offsetParent=offsetParent.offsetParent;};};res.clientWidth=res.width-this.getBorderWidth(e,"\u004c\u0065\u0066\u0074")-this.getBorderWidth(e,"\u0052\u0069\u0067\u0068\u0074");res.clientHeight=res.height-this.getBorderWidth(e,"\u0054\u006f\u0070")-this.getBorderWidth(e,"\u0042\u006f\u0074\u0074\u006f\u006d");res.clientLeft=this.getBorderWidth(e,"\u004c\u0065\u0066\u0074");res.clientTop=this.getBorderWidth(e,"\u0054\u006f\u0070");return res;};jsWidget.prototype.eventFrom=function(evt){if(!evt){evt=window.event;};var eSrc;if(evt.target){eSrc=evt.target;}else{eSrc=evt.srcElement;};return eSrc;};jsWidget.prototype.pageSize=function(){var w,h;if(window.innerWidth){if(document.body.offsetWidth){if(window.innerWidth!=document.body.offsetWidth){w=document.body.offsetWidth;h=document.body.offsetHeight;};}else{w=window.innerWidth;h=window.innerHeight;};}else if(document.documentElement.clientWidth){w=document.documentElement.clientWidth;h=document.documentElement.clientHeight;}else if(document.body.clientWidth){w=document.body.clientWidth;h=document.body.clientHeight;};return{width: w, height: h};};jsWidget.prototype.clearTable=function(eTable){if(eTable && eTable.tagName && eTable.tagName.toLowerCase()=="\u0074\u0061\u0062\u006c\u0065"){for(var i=eTable.rows.length-1;i>=0;i--){eTable.deleteRow(i);};};};jsWidget.prototype.appendRow=function(eTable,tr){if(eTable && eTable.tagName && eTable.tagName.toLowerCase()=="\u0074\u0061\u0062\u006c\u0065"){var eRow;try{eRow=eTable.insertRow(-1);}catch(e){if(tr){eRow=tr.cloneNode(true);}else{eRow=document.createElement("\u0074\u0072");};eTable.appendChild(eRow);};return eRow;};return null;};jsWidget.prototype.appendCell=function(eRow,td){if(eRow && eRow.tagName && eRow.tagName.toLowerCase()=="\u0074\u0072"){var eTD;try{eTD=eRow.insertCell(-1);}catch(e){if(td){eTD=td.cloneNode(true);}else{eTD=document.createElement("\u0074\u0064");};eRow.appendChild(eTD);};return eTD;};return null;};jsWidget.prototype.setOpacity=function(e,opacity){if(!e){return;};if(typeof opacity !="\u006e\u0075\u006d\u0062\u0065\u0072"){return;};if(opacity<0){opacity=0;};if(opacity>100){opacity=100;};var o=opacity/100;if(o==1){e.style.filter="\u006e\u006f\u006e\u0065";}else{e.style.filter="\u0061\u006c\u0070\u0068\u0061\u0028\u006f\u0070\u0061\u0063\u0069\u0074\u0079\u003d"+opacity+"\u002c\u0073\u0074\u0079\u006c\u0065\u003d\u0030\u0029";};e.style.MozOpacity=o;e.style.opacity=o;};jsWidget.prototype.selectSingleNode=function(XMLDoc,xpath){if(!XMLDoc){return null;};if(XMLDoc){if(window.ActiveXObject){return XMLDoc.selectSingleNode(xpath);}else{var xpe;try{xpe=new XPathEvaluator();}catch(e){xpe=XMLDoc.ownerDocument || XMLDoc;};var nsResolver=xpe.createNSResolver((XMLDoc.ownerDocument==null) ? XMLDoc.documentElement : XMLDoc.ownerDocument.documentElement);var results=xpe.evaluate(xpath,XMLDoc,nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE,null);return results.singleNodeValue;};};return null;};jsWidget.prototype.selectNodes=function(XMLDoc,xpath){var arrList=new Array();if(!XMLDoc){XMLDoc=this.XMLDoc;};if(XMLDoc){if(window.ActiveXObject){var oList=XMLDoc.selectNodes(xpath);for(var i=0;i<oList.length;i++){arrList[arrList.length]=oList.nextNode();};}else{var xpe;try{xpe=new XPathEvaluator();}catch(e){xpe=XMLDoc.ownerDocument || XMLDoc;};var nsResolver=xpe.createNSResolver((XMLDoc.ownerDocument==null) ? XMLDoc.documentElement : XMLDoc.ownerDocument.documentElement);var oList=xpe.evaluate(xpath,XMLDoc,nsResolver, XPathResult.ORDERED_NODE_ITERATOR_TYPE,null);if(oList !=null){var oIDAttr=oList.iterateNext();while(oIDAttr){arrList[arrList.length]=oIDAttr;oIDAttr=oList.iterateNext();};};};};return arrList;};jsWidget.prototype.replaceNode=function(oldNode,newNode){oldNode.parentNode.replaceChild(newNode,oldNode);};jsWidget.prototype.copyInlineStyle=function(e1,e2){if(document.all){e2.style.cssText=e1.style.cssText;}else if(document.getElementById){e2.setAttribute("\u0073\u0074\u0079\u006c\u0065",e1.style.cssText);};};jsWidget.prototype.setInlineStyle=function(e,cssText){if(document.all){e.style.cssText=cssText;}else if(document.getElementById){e.setAttribute("\u0073\u0074\u0079\u006c\u0065",cssText);};};jsWidget.prototype.setAbsSize=function(e,width,height){if(e && typeof width=="\u006e\u0075\u006d\u0062\u0065\u0072" && typeof height=="\u006e\u0075\u006d\u0062\u0065\u0072"){var old=e.style.display;e.style.display="";if(width>=0){e.style.width=width+"\u0070\u0078";};if(height>=0){e.style.height=height;};var deltaW=e.offsetWidth-width, deltaH=e.offsetHeight-height;if(width>=0 && width>deltaW){e.style.width=width-deltaW +"\u0070\u0078";};if(height>=0 && height>deltaH){e.style.height=height-deltaH +"\u0070\u0078"};e.style.display=old;return{width:e.offsetWidth,height:e.offsetHeight};};};jsWidget.prototype.getPadding=function(e,strWhich){try{v=this.getStyleProperty(e,"\u0070\u0061\u0064\u0064\u0069\u006e\u0067"+strWhich);v=parseInt(v);if(typeof v=="\u006e\u0075\u006d\u0062\u0065\u0072"){if(isNaN(v)){return 0;};return v;};return 0;}catch(e){return 0;};};jsWidget.prototype.getBorderWidth=function(e,strWhich){try{v=this.getStyleProperty(e,"\u0062\u006f\u0072\u0064\u0065\u0072"+strWhich+"\u0057\u0069\u0064\u0074\u0068");v=parseInt(v);if(typeof v=="\u006e\u0075\u006d\u0062\u0065\u0072"){if(isNaN(v)){return 0;};return v;};return 0;}catch(e){return 0;};};jsWidget.prototype.setPosition=function(e,left,top){if(e &&(typeof left=="\u006e\u0075\u006d\u0062\u0065\u0072") &&(typeof top=="\u006e\u0075\u006d\u0062\u0065\u0072")){e.style.position="\u0061\u0062\u0073\u006f\u006c\u0075\u0074\u0065";if(left>=0){e.style.left=left+"\u0070\u0078";};if(top>=0){e.style.top=top+"\u0070\u0078";};};};jsWidget.prototype.getEventPosition=function(evt){evt=evt || window.event;if(evt.x){if(this.isIE){return{x:evt.x-2,y:evt.y-2};}else{return{x:evt.x,y:evt.y};};}else if(evt.clientX){return{x:evt.clientX,y:evt.clientY};};return null;};jsWidget.prototype.getStyleProperty=function(oElement, strProperty){var oDV=document.defaultView;if(oDV && oDV.getComputedStyle){var oCS=oDV.getComputedStyle(oElement, '');if(oCS){strProperty=strProperty.replace(/([A-Z])/g, '\u002d\u0024\u0031').toLowerCase();return oCS.getPropertyValue(strProperty);};} else if(oElement.currentStyle){return oElement.currentStyle[strProperty];};return oElement.style[strProperty];};jsWidget.prototype.destroyNode=function(e){if(e && e.parentNode){if(this.isIE){this._purge(e);e=e.removeNode(true);}else{e.parentNode.removeChild(e);};e=null;};};jsWidget.prototype._purge=function(d){var a=d.attributes, i, l, n;if(a){l=a.length-1;for(i=l;i>=0;i--){n=a[i].name;switch(typeof d[n]){case "\u0066\u0075\u006e\u0063\u0074\u0069\u006f\u006e": d[n]=null;break;};};};a=d.childNodes;if(a){l=a.length-1;for(i=l;i>=0;i--){this._purge(d.childNodes[i]);};};};jsWidget.prototype.getClientSize=function(e){if(!e){return null;};var w=e.offsetWidth, h=e.offsetHeight;var cw=w-this.getBorderWidth(e,"\u004c\u0065\u0066\u0074")-this.getBorderWidth(e,"\u0052\u0069\u0067\u0068\u0074"), ch=h-this.getBorderWidth(e,"\u0054\u006f\u0070")-this.getBorderWidth(e,"\u0042\u006f\u0074\u0074\u006f\u006d");return{width:cw,height:ch};};jsWidget.prototype.$e=function(id){return document.getElementById(id);};jsWidget.prototype.lookup=function(eleToStart, eleToSearch){if(! eleToSearch){return false;};while(eleToStart){if(eleToStart==eleToSearch){return true;};eleToStart=eleToStart.parentNode;};return false;};jsWidget.prototype.clearSelect=function(eSelect){if(eSelect){for(var i=eSelect.options.length-1;i>=0;i--){try{eSelect.remove(i);}catch(e){};};};};jsWidget.prototype.fillSelect=function(eSelect,arrData){if(!eSelect){return;};for(var i=0;i<arrData.length;i++){var eOption=document.createElement("\u006f\u0070\u0074\u0069\u006f\u006e");eOption.value=arrData[i].value;try{eOption.innerText=arrData[i].text;eSelect.add(eOption);}catch(e){eOption.innerHTML=arrData[i].text;eSelect.appendChild(eOption);};};};jsWidget.prototype.appendToSelect=function(eSelect,name,value,selected){var eOption=document.createElement("\u006f\u0070\u0074\u0069\u006f\u006e");eOption.value=value;try{eOption.innerText=name;eSelect.add(eOption);}catch(e){eOption.innerHTML=name;eSelect.appendChild(eOption);};eOption.selected=selected;return eOption;};
/*jsAJAX.js*/function jsAJAX(http,nTimeout){this.http=http;this.ajaxCallTimeOutHandle=null;this.onAbort=null;if(nTimeout==undefined || nTimeout==null){nTimeout=30000;};this.Timeout=nTimeout;this._http_inprocess=false;this._queue=[];this.queue=false;};jsAJAX.prototype.getHTTP=function(){var http=null;if(window.XMLHttpRequest){try{http=new window.XMLHttpRequest();}catch(e){http=null;};}else{var arrHTTP=["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"];for(var i=0;i<arrHTTP.length;i++){try{http=new ActiveXObject(arrHTTP[i]);break;}catch(e){};};};return http;};jsAJAX.prototype.setTimeout=function(nTimeout){this.Timeout=nTimeout;};jsAJAX.prototype.abort=function(){if(this.http && this.http.readyState !=0){this.http.abort();if(typeof this.onAbort=="function"){this.onAbort();};};};jsAJAX.prototype.exec=function(url,strPara,onStart,onEnd,onDataReady,onError,onAbort){if(this.queue==true && this._http_inprocess==true){this._queue.push({url : url, para : strPara, onStart : onStart, onEnd : onEnd, onDataReady: onDataReady, onError : onError, onAbort : onAbort});return;};try{this._http_inprocess=true;if(this.http==null){this.http=this.getHTTP();}else{this.abort();};this.onAbort=onAbort;var _this=this;if(this.http){if(this.ajaxCallTimeOutHandle){window.clearTimeout(this.ajaxCallTimeOutHandle);this.ajaxCallTimeOutHandle=null;};strPara=encodeURI(strPara);this.http.open("POST",url,true);this.http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");this.http.setRequestHeader("Content-length", strPara.length);this.http.setRequestHeader("Content-Encoding", "utf-8");this.http.setRequestHeader("Connection", "close");this.ajaxCallTimeOutHandle=window.setTimeout(function(){_this.http.abort();if(typeof onError=="function"){onError("AJAX Call Timeout",url,strPara);};window.clearTimeout(_this.ajaxCallTimeOutHandle);_this.ajaxCallTimeOutHandle=null;_this._http_inprocess=false;if(_this.queue==true && _this._queue.length>0){var o=_this._queue.pop();_this.exec(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};},this.Timeout);if(typeof onStart=="function"){onStart();};this.http.onreadystatechange=function(){if(_this.http){try{if(_this.http.readyState==4){if(_this.http.status==200){if(typeof onEnd=="function"){onEnd();};window.clearTimeout(_this.ajaxCallTimeOutHandle);_this.ajaxCallTimeOutHandle=null;var strReturn=_this.http.responseText+"";_this.http.abort();if(typeof onDataReady=="function"){onDataReady(strReturn);};_this._http_inprocess=false;if(_this.queue==true && _this._queue.length>0){var o=_this._queue.pop();_this.exec(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};};};}catch(e){_this._http_inprocess=false;if(_this.queue==true && _this._queue.length>0){var o=_this._queue.pop();_this.exec(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};};};};this.http.send(strPara);};}catch(e){if(typeof onError=="function"){onError(e.message,url,strPara);};this._http_inprocess=false;if(this.queue==true && this._queue.length>0){var o=this._queue.pop();this.exec(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};};};jsAJAX.prototype.exec1=function(url,strPara,onStart,onEnd,onDataReady,onError,onAbort){if(this.queue==true && this._http_inprocess==true){this._queue.push({url : url, para : strPara, onStart : onStart, onEnd : onEnd, onDataReady: onDataReady, onError : onError, onAbort : onAbort});return;};try{this._http_inprocess=true;if(this.http==null){this.http=this.getHTTP();}else{this.abort();};this.onAbort=onAbort;var _this=this;if(this.http){if(this.ajaxCallTimeOutHandle){window.clearTimeout(this.ajaxCallTimeOutHandle);this.ajaxCallTimeOutHandle=null;};strPara=encodeURI(strPara);this.http.open("POST",url,false);this.http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");this.http.setRequestHeader("Content-length", strPara.length);this.http.setRequestHeader("Content-Encoding", "utf-8");this.http.setRequestHeader("Connection", "close");this.ajaxCallTimeOutHandle=window.setTimeout(function(){_this.http.abort();if(typeof onError=="function"){onError("AJAX Call Timeout",url,strPara);};window.clearTimeout(_this.ajaxCallTimeOutHandle);_this.ajaxCallTimeOutHandle=null;_this._http_inprocess=false;if(_this.queue==true && _this._queue.length>0){var o=_this._queue.pop();_this.exec(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};},this.Timeout);if(typeof onStart=="function"){onStart();};this.http.send(strPara);if(_this.http){try{if(_this.http.readyState==4){if(_this.http.status==200){if(typeof onEnd=="function"){onEnd();};window.clearTimeout(_this.ajaxCallTimeOutHandle);_this.ajaxCallTimeOutHandle=null;var strReturn=_this.http.responseText+"";_this.http.abort();if(typeof onDataReady=="function"){onDataReady(strReturn);};_this._http_inprocess=false;if(_this.queue==true && _this._queue.length>0){var o=_this._queue.pop();_this.exec1(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};};};}catch(e){_this._http_inprocess=false;if(_this.queue==true && _this._queue.length>0){var o=_this._queue.pop();_this.exec1(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};};};};}catch(e){if(typeof onError=="function"){onError(e.message,url,strPara);};this._http_inprocess=false;if(this.queue==true && this._queue.length>0){var o=this._queue.pop();this.exec(o.url,o.para,o.onStart,o.onEnd,o.onDataReady,o.onError,o.onAbort);};};};
function jsQueryString(qryString,type){this.QueryString=qryString;this.type=type;this.Word=[];};jsQueryString.prototype.setQueryString=function(str){str=str.toUpperCase();str=str.replace(/AND/g, " ");str=str.replace(/NOT/g, " ");str=str.replace(/NEAR/g, " ");this.QueryString=str;this.parse();};jsQueryString.prototype.setQueryType=function(type){this.type=type;};jsQueryString.prototype.parse=function(){this.Word=[];var strWord="", inString=false;for(var i=0;i<this.QueryString.length;i++){var ch=this.QueryString.charAt(i);if(ch==" " && inString==false){if(strWord !=""){this.Word.push(strWord);};strWord="";}else if(ch=="\""){if(inString==true){if(strWord !=""){this.Word.push(strWord);};inString=false;strWord="";}else{if(strWord !=""){this.Word.push(strWord);};strWord="";inString=true;};}else{strWord+=ch;};};if(strWord !=""){this.Word.push(strWord);};};jsQueryString.prototype.getQueryString=function(){var str="";switch(this.type){case 0: str="ISABOUT(\""+this.Word.join(" ")+"\" weight(0.9)) OR \"";str+=this.Word.join("*\" OR \"");str+="*\"";break;case 1: var arr=[];for(var i=0;i<this.Word.length;i++){arr.push("(\""+this.Word[i]+"\" OR "+"\""+this.Word[i]+"*\")");};str=arr.join(" AND ");break;case 2: str="\""+this.Word.join(" ")+"\" OR \""+this.Word.join(" ")+"*\"";break;};return str;};

function debug(sMsg){
   alert("Debug Message From Page: " + location.href + "\n\n" + sMsg);
}

function translatePage(win){
   if ( win && win.getHeaderFrame ){
      win = win.getHeaderFrame().contentWindow;
   }else{
      return;
   }
   
   if ( win && win.getText ){
      var arrLabel = document.getElementsByTagName("label");
      for ( var i = 0; i < arrLabel.length; i ++ ){
         arrLabel[i].innerHTML = win.getText(arrLabel[i].innerHTML);
      }
   
      var arrAll = document.getElementsByTagName("body")[0].getElementsByTagName("*");
      for ( var i = 0; i < arrAll.length; i ++ ){
         var e = arrAll[i];
         if ( e.title ){
            e.title = win.getText(e.title);
         }
      }
   }
}

function getImagePath(){
   return "http://www.dataforge.com/eData/Images/";
}
function getDocumentPath(){
   return "http://www.dataforge.com/eData/Documents/";
}

function getIndexWindow(){
   var pWin = parent;
   while ( pWin ){
      if ( pWin.name == "DataForge_MainWindow" ){
         return pWin;
      }else{
         if ( pWin == pWin.parent ){
            break;
         }
         pWin = pWin.parent;
      }
   }
   pWin.document.location.href = "http://www.dataforge.com/ErrorPage.html";
}
//
//global variable used on every page
//
var g_sSpace = "---";
  /**
   * Used for debugging purpose only
   */
  document.ondblclick = function(evt){
     evt = evt || window.event;
     if ( evt.altKey && evt.ctrlKey ){
        if (typeof showDebugMessage == "function" ){
           var s = showDebugMessage();
           alert(s);
        }
     }
  }