var atalaClientToolsLoaded=true,atalaClientToolsVersion="5.0c",aCs=new Array();function atalaInitClientScript(c){aCs.push(c);window.onload=atalaInitCommands;};function atalaInitCommands(){for(var i=0;i<aCs.length;i++){setTimeout(aCs[i],1);};};function atalaPoint(x,y){this.typeOf="atalaPoint";this.X=x;this.Y=y;};function atalaSize(w,h){this.typeOf="atalaSize";this.Width=w;this.Height=h;};function atalaRectangle(x,y,w,h){this.typeOf="atalaRectangle";this.X=x;this.Y=y;this.Width=w;this.Height=h;};function atalaGetBoundsRect(o){return new atalaRectangle(atalaGetOffsetLeft(o),atalaGetOffsetTop(o),parseInt(o.style.width),parseInt(o.style.height));};function atalaGetObject(id){var retVal;retVal=document.getElementById(id);if(!retVal){atalaThrowError("atalaGetObject",1,id,"");retVal=null;};return retVal;};function atalaGetFormValue(form,id){if(form==null){form=document.forms[0];};var retVal;try{retVal=form[id].value;}catch(er){atalaThrowError("atalaGetFormValue",1,id,"");retVal='';};return retVal;};function atalaSetFormValue(form,id,value){if(form==null){form=document.forms[0];};try{form[id].value=value;}catch(er){atalaThrowError("atalaSetFormValue",1,id,"")};};function atalaGetFormValueInt(form,id){if(form==null){form=document.forms[0];};var retVal;try{retVal=parseInt(atalaGetFormValue(form,id));}catch(er){atalaThrowError("atalaGetFormValueInt",2,id,"");retVal=0;};return retVal;};function atalaGetFormValueFloat(form,id){if(form==null){form=document.forms[0];};var retVal;try{retVal=parseFloat(atalaGetFormValue(form,id));}catch(er){atalaThrowError("atalaGetFormValueFloat",2,id,"");retVal=0;};return retVal;};function atalaGetMousePosition(e){var posX,posY;if(document.all){if(document.compatMode=="CSS1Compat"){posX=event.x+document.documentElement.scrollLeft;posY=event.y+document.documentElement.scrollTop;}else{posX=event.x+document.body.scrollLeft;posY=event.y+document.body.scrollTop;};}else{posX=e.pageX;posY=e.pageY;};return new atalaPoint(posX,posY);};function atalaCheckBool(b){if(b==true||b==false){return true;}else{return false;};};function atalaThrowError(fnc,err,val,msg){if(atalaShowErrors){var usr='Atalasoft DotImage Error:\n';switch(val){case null:val="null";break;case undefined:val="undefined";break;case"":val="EMPTY STRING";break;};switch(err){case-1:usr="USER CODE ERROR:\nEvent handler ";err="\nGenerated an exception";break;case 0:err="is null or not an object";break;case 1:err="was not found";break;case 2:err="is not a number";break;case 3:err="is out of bounds";break;case 4:err="is the incorrect object type";break;case 5:err="is not boolean";msg="A boolean value of true or false was expected.";break;case 6:err="is not valid for this style object";break;case 7:err="is not valid.";msg="This feature was not implemented or is depricated.";break;};alert(usr+fnc+": "+val+" "+err+". \nException: "+msg);};};function atalaDisableEvents(o){o.setAttribute('unselectable','on');o.onfocus=__rf;o.onselectstart=__rf;o.ondrag=__rf;o.onclick=__rf;o.onmousedown=__rf;};function __rf(){return false;};function __rt(){return true;};function atalaPrint(cid,cP){var pO=new atalaPrinter(cid,cP),wS='width='+pO.width+',height='+pO.height+',toolbar=no,status=no,menubar=no,scrollable=no,resizable=no,directories=no',qS=pO.pt+"?atalagettile=true&atala_id="+pO.ID+"&atala_tx="+pO.X+"&atala_ty="+pO.Y+"&atala_tw="+pO.width+"&atala_th="+pO.height+"&atala_z="+pO.z+"&atala_si="+pO.src+"&atala_fi="+pO.fr+"&atala_ad="+pO.aa+"&atala_bf="+pO.f+'&atala_rnd='+Math.round(Math.random()*100000000),w=window.open("",cid,wS);w.document.writeln("<html><head><title>"+cid+"</title></head><body onload=\"DoPrint();\" marginheight=\"0\" marginwidth=\"0\" leftmargin=\"0\" topmargin=\"0\"><img src=\""+qS+"\">");w.document.writeln("<script language=\"javascript\" type=\"text/javascript\">");w.document.writeln("<!--");w.document.writeln("function DoPrint(){");w.document.writeln("	if (window.print){");w.document.writeln("		window.print();");w.document.writeln("		window.close();");w.document.writeln("	}");w.document.writeln("	else");w.document.writeln("		alert(\"This browser does not support JavaScript Printing: window.print()\");\n}");w.document.writeln("// -->");w.document.writeln("</script>");w.document.writeln("</body></html>");w.document.close();};function atalaPrinter(cid,cP){formObject=document.forms[0];this.ID=cid;this.pt=cP;this.X=0;this.Y=0;this.z=1;this.width=parseInt(formObject[cid+'_iw'].value);this.height=parseInt(formObject[cid+'_ih'].value);this.src=formObject[cid+'_si'].value;this.fr=parseInt(formObject[cid+'_fi'].value);this.aa=formObject[cid+'_a'].value;this.f=formObject[cid+'_bf'].value;};function atalaCreateMask(u){var d=document.createElement('div');if(atalaCheckBrowser()==0&&navigator.userAgent.indexOf('MSIE 7.0')<0){d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+u+"', sizingMethod='scale')";}else{d.style.backgroundImage="url('"+u+"')";};return d;};function atalaGetOffsetLeft(o){var retVal=o.offsetLeft;if(o.offsetParent){retVal+=atalaGetOffsetLeft(o.offsetParent);};return retVal;};function atalaGetOffsetTop(o){var retVal=o.offsetTop;if(o.offsetParent){retVal+=atalaGetOffsetTop(o.offsetParent);};return retVal;};function atalaCheckBrowser(){var retVal=0;if(navigator.userAgent.indexOf("Firefox")>=0)retVal=1;else if(navigator.userAgent.indexOf("Safari")>=0)retVal=2;else if(navigator.userAgent.indexOf("Opera")>=0)retVal=3;return retVal;};function atalaUrlEncode(s){var v;try{v=encodeURIComponent(s);}catch(e){v=escape(s);};v=v.replace(/'/g,'%27');return v.replace(/%20/g,"+");};function atalaExtendClass(subClass,baseClass){function inheritance(){};inheritance.prototype=baseClass.prototype;subClass.prototype=new inheritance();subClass.prototype.constructor=subClass;subClass.baseConstructor=baseClass;subClass.superClass=baseClass.prototype;};function atalaEventAdd(_this,obj,name,fnct){var f;try{f=eval('obj.'+name);if(typeof(f)=='function'){var a=new Array();a.push(f);f=a;};f.push(fnct);eval('obj.'+name+'=f;');}catch(ex){atalaThrowError(obj+'.'+name,-1,'\n'+f,ex.message);f=null;return false;};f=null;return true;};function atalaFireEvent(obj,name,e){var f;try{f=eval('obj.'+name);if(typeof(f)=='function'){f(e);}else{for(var i=0;i<f.length;i++){f[i](e);};};}catch(ex){atalaThrowError(obj+'.'+name,-1,'\n'+f,ex.message);f=null;return false;};f=null;return true;};function ArrayToJSONString(array){var a=['['],b,i,l=array.length,v;function p(s){if(b){a.push(',');};a.push(s);b=true;};for(i=0;i<l;i+=1){v=array[i];switch(typeof v){case'object':if(v){p(ObjectToJSONString(v));}else{p("null");};break;case'string':p(StringToJSONString(v));break;case'number':p(NumberToJSONString(v));break;case'boolean':p(BooleanToJSONString(v));break;};};a.push(']');return a.join('');};function BooleanToJSONString(bool){return String(bool);};function DateToJSONString(date){function f(n){return n<10?'0'+n:n;};return'"'+date.getFullYear()+'-'+f(date.getMonth()+1)+'-'+f(date.getDate())+'T'+f(date.getHours())+':'+f(date.getMinutes())+':'+f(date.getSeconds())+'"';};function NumberToJSONString(num){return isFinite(num)?String(num):"null";};function ObjectToJSONString(obj){var a=['{'],b,k,v;function p(s){if(b){a.push(',');};a.push(StingToJSONString(k),':',s);b=true;};for(k in obj){if(obj.hasOwnProperty(k)){v=obj[k];switch(typeof v){case'object':if(v){p(ObjectToJSONString(v));}else{p("null");};break;case'string':p(StringToJSONString(v));break;case'number':p(NumberToJSONString(v));break;case'boolean':p(BooleanToJSONString(v));break;};};};a.push('}');return a.join('');};(function(s){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\': '\\\\'    };    s.parseJSON = function (filter) {        var j;        function walk(k, v) {            var i;            if (v && typeof v === 'object') {                for (i in v) {                    if (v.hasOwnProperty(i)) {                        v[i] = walk(i, v[i]);                    }                }            }            return filter(k, v);        }        if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this)) {            try {                j = eval('(' + this + ')');            } catch (e) {                throw new SyntaxError("parseJSON");            }        } else {            throw new SyntaxError("parseJSON");        }        if (typeof filter === 'function') {            j = walk('', j);        }        return j;    };    s.toJSONString = function () {        if (/["\\\x00-\x1f]/.test(this)) {            return '"' + this.replace(/([\x00-\x1f\\"])/g, function (a, b) {                var c = m[b];                if (c) {                    return c;                }                c = b.charCodeAt();                return '\\u00' +                    Math.floor(c / 16).toString(16) +                    (c % 16).toString(16);            }) + '"';        }        return '"' + this + '"';};})(String.prototype);
