function progressWrap(b,c){if(typeof(b)=="function"){progressClockImage=IMG({id:"progressClock",src:"/images/waiting.gif",style:"left:0; position:absolute; top:0;"});document.childNodes[1].childNodes[1].appendChild(progressClockImage);var a=function(){b(c);removeElement($("progressClock"))};setTimeout(a,0)}else{alert("progressWrap requires a function as its first argument");return false}}escapeJSONChar=function escapeJSONChar(b){if(b=='"'||b=="\\"){return"\\"+b}else{if(b=="\b"){return"\\b"}else{if(b=="\f"){return"\\f"}else{if(b=="\n"){return"\\n"}else{if(b=="\r"){return"\\r"}else{if(b=="\t"){return"\\t"}}}}}}var a=b.charCodeAt(0).toString(16);if(a.length==1){return"\\u000"+a}else{if(a.length==2){return"\\u00"+a}else{if(a.length==3){return"\\u0"+a}else{return"\\u"+a}}}};escapeJSONString=function escapeJSONString(b){var d=b.split("");for(var a=0;a<d.length;a++){var e=d[a];if(e=='"'||e=="\\"||e.charCodeAt(0)<32||e.charCodeAt(0)>=128){d[a]=escapeJSONChar(d[a])}}return'"'+d.join("")+'"'};toJSON=function toJSON(c){if(c==null){return"null"}else{if(c.constructor==String){return escapeJSONString(c)}else{if(c.constructor==Number){return c.toString()}else{if(c.constructor==Boolean){return c.toString()}else{if(c.constructor==Date){return'{javaClass: "java.util.Date", time: '+c.valueOf()+"}"}else{if(c.constructor==Array){var a=[];for(var b=0;b<c.length;b++){a.push(toJSON(c[b]))}return"["+a.join(", ")+"]"}else{var a=[];for(attr in c){if(c[attr]==null){a.push('"'+attr+'": null')}else{if(typeof c[attr]=="function"){}else{a.push(escapeJSONString(attr)+": "+toJSON(c[attr]))}}}return"{"+a.join(", ")+"}"}}}}}}};JSONRpcClient=function JSONRpcClient_ctor(b,c,e,f){this.serverURL=b;this.user=c;this.pass=e;this.objectID=f;if(this.objectID){this._addMethods(["listMethods"]);var d=this._makeRequest("listMethods",[])}else{this._addMethods(["system.listMethods"]);var d=this._makeRequest("system.listMethods",[])}var a=this._sendRequest(d);this._addMethods(a)};JSONRpcClient.Exception=function JSONRpcClient_Exception_ctor(e,d,c){this.code=e;var b;if(c){this.javaStack=c;var a=c.match(/^([^:]*)/);if(a){b=a[0]}}if(b){this.name=b}else{this.name="JSONRpcClientException"}this.message=d};JSONRpcClient.Exception.CODE_REMOTE_EXCEPTION=490;JSONRpcClient.Exception.CODE_ERR_CLIENT=550;JSONRpcClient.Exception.CODE_ERR_PARSE=590;JSONRpcClient.Exception.CODE_ERR_NOMETHOD=591;JSONRpcClient.Exception.CODE_ERR_UNMARSHALL=592;JSONRpcClient.Exception.CODE_ERR_MARSHALL=593;JSONRpcClient.Exception.prototype=new Error();JSONRpcClient.Exception.prototype.toString=function JSONRpcClient_Exception_toString(a,b){return this.name+": "+this.message};JSONRpcClient.default_ex_handler=function JSONRpcClient_default_ex_handler(a){alert(a)};JSONRpcClient.toplevel_ex_handler=JSONRpcClient.default_ex_handler;JSONRpcClient.profile_async=false;JSONRpcClient.max_req_active=1;JSONRpcClient.requestId=1;JSONRpcClient.prototype._createMethod=function JSONRpcClient_createMethod(a){var b=function(){var c=[];var f=null;for(var d=0;d<arguments.length;d++){c.push(arguments[d])}if(typeof c[0]=="function"){f=c.shift()}var e=b.client._makeRequest.call(b.client,b.methodName,c,f);if(f==null){return b.client._sendRequest.call(b.client,e)}else{JSONRpcClient.async_requests.push(e);JSONRpcClient.kick_async();return e.requestId}};b.client=this;b.methodName=a;return b};JSONRpcClient.prototype._addMethods=function JSONRpcClient_addMethods(c){for(var b=0;b<c.length;b++){var e=this;var d=c[b].split(".");for(var g=0;g<d.length-1;g++){var a=d[g];if(e[a]){e=e[a]}else{e[a]=new Object();e=e[a]}}var a=d[d.length-1];if(!e[a]){var f=this._createMethod(c[b]);e[a]=f}}};JSONRpcClient._getCharsetFromHeaders=function JSONRpcClient_getCharsetFromHeaders(a){try{var f=a.getResponseHeader("Content-type");var d=f.split(/\s*;\s*/);for(var b=0;b<d.length;b++){if(d[b].substring(0,8)=="charset="){return d[b].substring(8,d[b].length)}}}catch(c){}return"UTF-8"};JSONRpcClient.async_requests=[];JSONRpcClient.async_inflight={};JSONRpcClient.async_responses=[];JSONRpcClient.async_timeout=null;JSONRpcClient.num_req_active=0;JSONRpcClient._async_handler=function JSONRpcClient_async_handler(){JSONRpcClient.async_timeout=null;while(JSONRpcClient.async_responses.length>0){var a=JSONRpcClient.async_responses.shift();if(a.canceled){continue}if(a.profile){a.profile.dispatch=new Date()}try{a.cb(a.result,a.ex,a.profile)}catch(c){JSONRpcClient.toplevel_ex_handler(c)}}while(JSONRpcClient.async_requests.length>0&&JSONRpcClient.num_req_active<JSONRpcClient.max_req_active){var b=JSONRpcClient.async_requests.shift();if(b.canceled){continue}b.client._sendRequest.call(b.client,b)}};JSONRpcClient.kick_async=function JSONRpcClient_kick_async(){if(JSONRpcClient.async_timeout==null){JSONRpcClient.async_timeout=setTimeout(JSONRpcClient._async_handler,0)}};JSONRpcClient.cancelRequest=function JSONRpcClient_cancelRequest(b){if(JSONRpcClient.async_inflight[b]){JSONRpcClient.async_inflight[b].canceled=true;return true}for(var a in JSONRpcClient.async_requests){if(JSONRpcClient.async_requests[a].requestId==b){JSONRpcClient.async_requests[a].canceled=true;return true}}for(var a in JSONRpcClient.async_responses){if(JSONRpcClient.async_responses[a].requestId==b){JSONRpcClient.async_responses[a].canceled=true;return true}}return false};JSONRpcClient.prototype._makeRequest=function JSONRpcClient_makeRequest(b,c,a){var d={};d.client=this;d.requestId=JSONRpcClient.requestId++;var e={};e.id=d.requestId;if(this.objectID){e.method=".obj#"+this.objectID+"."+b}else{e.method=b}e.params=c;if(a){d.cb=a}if(JSONRpcClient.profile_async){d.profile={submit:new Date()}}d.data=toJSON(e);return d};JSONRpcClient.prototype._sendRequest=function JSONRpcClient_sendRequest(c){if(c.profile){c.profile.start=new Date()}var b=JSONRpcClient.poolGetHTTPRequest();JSONRpcClient.num_req_active++;if(typeof(this.user)=="undefined"){b.open("POST",this.serverURL,(c.cb!=null))}else{b.open("POST",this.serverURL,(c.cb!=null),this.user,this.pass)}try{b.setRequestHeader("Content-type","text/plain")}catch(d){}if(c.cb){var a=this;b.onreadystatechange=function(){if(b.readyState==4){b.onreadystatechange=function(){};var f={cb:c.cb,result:null,ex:null};if(c.profile){f.profile=c.profile;f.profile.end=new Date()}try{f.result=a._handleResponse(b)}catch(g){f.ex=g}if(!JSONRpcClient.async_inflight[c.requestId].canceled){JSONRpcClient.async_responses.push(f)}delete JSONRpcClient.async_inflight[c.requestId];JSONRpcClient.kick_async()}}}else{b.onreadystatechange=function(){}}JSONRpcClient.async_inflight[c.requestId]=c;try{b.send(c.data)}catch(d){JSONRpcClient.poolReturnHTTPRequest(b);JSONRpcClient.num_req_active--;throw new JSONRpcClient.Exception(JSONRpcClient.Exception.CODE_ERR_CLIENT,"Connection failed")}if(!c.cb){return this._handleResponse(b)}};JSONRpcClient.prototype._handleResponse=function JSONRpcClient_handleResponse(http){if(!this.charset){this.charset=JSONRpcClient._getCharsetFromHeaders(http)}var status,statusText,data;try{status=http.status;statusText=http.statusText;data=http.responseText}catch(e){JSONRpcClient.poolReturnHTTPRequest(http);JSONRpcClient.num_req_active--;JSONRpcClient.kick_async();throw new JSONRpcClient.Exception(JSONRpcClient.Exception.CODE_ERR_CLIENT,"Connection failed")}JSONRpcClient.poolReturnHTTPRequest(http);JSONRpcClient.num_req_active--;if(status!=200){throw new JSONRpcClient.Exception(status,statusText)}var obj;try{eval("obj = "+data)}catch(e){throw new JSONRpcClient.Exception(550,"error parsing result")}if(obj.error){throw new JSONRpcClient.Exception(obj.error.code,obj.error.msg,obj.error.trace)}var res=obj.result;if(res&&res.objectID&&res.JSONRPCType=="CallableReference"){return new JSONRpcClient(this.serverURL,this.user,this.pass,res.objectID)}return res};JSONRpcClient.http_spare=[];JSONRpcClient.http_max_spare=8;JSONRpcClient.poolGetHTTPRequest=function JSONRpcClient_pool_getHTTPRequest(){if(JSONRpcClient.http_spare.length>0){return JSONRpcClient.http_spare.pop()}return JSONRpcClient.getHTTPRequest()};JSONRpcClient.poolReturnHTTPRequest=function JSONRpcClient_poolReturnHTTPRequest(a){if(JSONRpcClient.http_spare.length>=JSONRpcClient.http_max_spare){delete a}else{JSONRpcClient.http_spare.push(a)}};JSONRpcClient.msxmlNames=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];JSONRpcClient.getHTTPRequest=function JSONRpcClient_getHTTPRequest(){try{JSONRpcClient.httpObjectName="XMLHttpRequest";return new XMLHttpRequest()}catch(b){}for(var a=0;a<JSONRpcClient.msxmlNames.length;a++){try{JSONRpcClient.httpObjectName=JSONRpcClient.msxmlNames[a];return new ActiveXObject(JSONRpcClient.msxmlNames[a])}catch(b){}}JSONRpcClient.httpObjectName=null;throw new JSONRpcClient.Exception(0,"Can't create XMLHttpRequest object")};
var osmWinParams="width=600,height=365,resizable=yes,scrollbars=yes";function tryActiveXAcro(){try{acro=new ActiveXObject("PDF.PdfCtrl.1");if(!acro){return}acro=null;return true}catch(a){return false}}function checkAcrobat(b,c){if(getCookie("HasAcrobat")!=1){if(tryActiveXAcro()){setThreeYearCookie("HasAcrobat");window.location=b}else{var d="/acrobat_help.jsp?url="+escape(b);if(c){var a=window.open(d,"usePolicy",osmWinParams);a.focus()}else{window.location=d+"&popup=no"}}}else{window.location=b}}function checkAcrobatAlt(a,c,b){if(getCookie("HasAcrobat")==1){window.location=a}else{if(getCookie("HasAcrobat")==0){window.location=c}else{if(!document.layers&&tryActiveXAcro()){setThreeYearCookie("HasAcrobat");window.location=a}else{var d="/acrobat_help.jsp?url="+escape(a)+"&alt="+escape(c);if(b){window.open(d,"usePolicy",osmWinParams).focus()}else{window.location=d+"&popup=no"}}}}}function changeCookie(a,b){if(b){setThreeYearCookie(a)}else{deleteCookie(a)}}function setThreeYearCookieVal(b,c){var a=new Date();a.setTime(a.getTime()+1000*60*60*24*365*3);document.cookie=b+"="+c+";expires="+a.toGMTString()}function setThreeYearCookie(a){setThreeYearCookieVal(a,1)}function deleteCookie(a){var b=new Date();b.setFullYear(1970);document.cookie=a+"=0; expires="+b.toGMTString()}function getCookie(a){var b=document.cookie;var c=b.indexOf(a);if(c==-1){return(-1)}c+=a.length+1;endIndex=b.indexOf(";",c);if(endIndex==-1){endIndex=b.length}return unescape(b.substring(c,endIndex))};
var osmWinParams="width=600,height=365,resizable=yes,scrollbars=yes";function tryActiveXAcro(){try{acro=new ActiveXObject("PDF.PdfCtrl.1");if(!acro){return}acro=null;return true}catch(a){return false}}function checkAcrobat(b,c){if(getCookie("HasAcrobat")!=1){if(tryActiveXAcro()){setThreeYearCookie("HasAcrobat");window.location=b}else{var d="/acrobat_help.jsp?url="+escape(b);if(c){var a=window.open(d,"usePolicy",osmWinParams);a.focus()}else{window.location=d+"&popup=no"}}}else{window.location=b}}function checkAcrobatAlt(a,c,b){if(getCookie("HasAcrobat")==1){window.location=a}else{if(getCookie("HasAcrobat")==0){window.location=c}else{if(!document.layers&&tryActiveXAcro()){setThreeYearCookie("HasAcrobat");window.location=a}else{var d="/acrobat_help.jsp?url="+escape(a)+"&alt="+escape(c);if(b){window.open(d,"usePolicy",osmWinParams).focus()}else{window.location=d+"&popup=no"}}}}}function changeCookie(a,b){if(b){setThreeYearCookie(a)}else{deleteCookie(a)}}function setThreeYearCookieVal(b,c){var a=new Date();a.setTime(a.getTime()+1000*60*60*24*365*3);document.cookie=b+"="+c+";expires="+a.toGMTString()}function setThreeYearCookie(a){setThreeYearCookieVal(a,1)}function deleteCookie(a){var b=new Date();b.setFullYear(1970);document.cookie=a+"=0; expires="+b.toGMTString()}function getCookie(a){var b=document.cookie;var c=b.indexOf(a);if(c==-1){return(-1)}c+=a.length+1;endIndex=b.indexOf(";",c);if(endIndex==-1){endIndex=b.length}return unescape(b.substring(c,endIndex))}if(!window.OSM){OSM={}}OSM.PUB={};OSM.PUB.expandOrContract=function(d,c){d.stop();var f=d.target();f.innerHTML=c?"- hide":"+ see more";removeClass(f,c?"expander":"contractor");addClass(f,c?"contractor":"expander");var b=c?"expandee":"expanded";var a=getByTagAndClass("*",b,f.parentNode)[0];removeClass(a,b);addClass(a,c?"expanded":"expandee")};OSM.PUB.handlers={};OSM.PUB.handlers.expanderContractorClick=function(a){if(hasElementClass(a.target(),"expander")){OSM.PUB.expandOrContract(a,true)}else{if(hasElementClass(a.target(),"contractor")){OSM.PUB.expandOrContract(a,false)}}};OSM.PUB.thumbRoll={};OSM.PUB.thumbRoll.convertSrc=function(c,a){var d=c.match("(gif|jpg|png)$")[1];var b=c.slice(0,-6)+(a?"sm":"lg")+"."+d;return b};OSM.PUB.thumbRoll.mouseOver=function(b){b.stop();var a=getElementPosition(b.src()).x;var c=getElementPosition(b.src()).y;$("hoverImage").src=OSM.PUB.thumbRoll.convertSrc(b.src().src);$("hoverImage").style.left=(a-230)+"px";$("hoverImage").style.top=(c-240)+"px";$$("#hoverImage").show();$("thumbOverlay").style.width=getElementDimensions(b.src()).w+"px";$("thumbOverlay").style.height=getElementDimensions(b.src()).h+"px";$("thumbOverlay").style.left=a+"px";$("thumbOverlay").style.top=c+"px";$$("#thumbOverlay").show();window.thumbOverlayIdent=connect("thumbOverlay","onmouseout",OSM.PUB.thumbRoll.mouseOut)};OSM.PUB.thumbRoll.mouseOut=function(a){a.stop();disconnect(window.thumbOverlayIdent);$$("#thumbOverlay").hide();$$("#hoverImage").hide()};OSM.PUB.thumbRoll.connectThumbs=function(){var c=getByTagAndClass("div","ra_thumb");if(c.length>0){var a=IMG({id:"hoverImage",style:"display:none"});document.body.appendChild(a);var b=DIV({id:"thumbOverlay",style:"display:none"});document.body.appendChild(b);forEach(c,OSM.PUB.thumbRoll.connectThumbnail)}};OSM.PUB.thumbRoll.connectThumbnail=function(a){a=a.getElementsByTagName("img")[0];IMG({src:OSM.PUB.thumbRoll.convertSrc(a.src)});connect(a,"onmouseover",OSM.PUB.thumbRoll.mouseOver)};try{var jsonrpc=new JSONRpcClient("/JSON-RPC")}catch(e){if(window.console){console.log("Unable to initialize JSON-RPC")}}OSM.PUB.contact={};OSM.PUB.contact.defaults={email:"unknown-contact@on-site.com",message:"No message was entered.",name:"Unknown Contact",phone:"No phone number was provided",subject:"Contact Form Submission ("+window.location+")"};OSM.PUB.contact.getValidatedField=function(c,a){var d=getByClass("required",c.parentNode);if(d.length>0&&(c.value==null||c.value=="")){var b=d[0].innerHTML;alert("Please provide your "+c.name.toLowerCase())+".";throw"No "+c.name+" provided!"}return a?c:c.value};OSM.PUB.contact.getField=function(c,d){var a=getByClass(c+"ContactField",d);if(c=="other"){var b=[];forEach(a,function(f){b.push(OSM.PUB.contact.getValidatedField(f))});return b}else{if(a.length==0){return OSM.PUB.contact.defaults[c]}else{return OSM.PUB.contact.getValidatedField(a[0])}}};OSM.PUB.contact.getEmail=partial(OSM.PUB.contact.getField,"email");OSM.PUB.contact.getName=partial(OSM.PUB.contact.getField,"name");OSM.PUB.contact.getPhone=partial(OSM.PUB.contact.getField,"phone");OSM.PUB.contact.getSubject=partial(OSM.PUB.contact.getField,"subject");OSM.PUB.contact.getMessage=partial(OSM.PUB.contact.getField,"message");OSM.PUB.contact.getOtherFields=partial(OSM.PUB.contact.getField,"other");OSM.PUB.contact.submitContactForm=function(f){f.stop();var b=f.src();try{var j=OSM.PUB.contact.getName(b);var i=OSM.PUB.contact.getSubject(b);var h=OSM.PUB.contact.getEmail(b);var g=OSM.PUB.contact.getPhone(b);var a=OSM.PUB.contact.getOtherFields(b)}catch(f){return false}var d="**********************\n";d+="Contact's Information:\n";d+="**********************\n";d+="Name: "+j+"\n";if(h!=OSM.PUB.contact.defaults.email){d+="Email Address: "+h+"\n"}if(g!=OSM.PUB.contact.defaults.phone){d+="Phone Number: "+g+"\n"}d+="**********************\n";if(a.length>0){d+="** Other Information **\n";forEach(a,function(k){d+=k.name+": "+k.value+"\n"});d+="**********************\n"}d+=OSM.PUB.contact.getMessage(b)+"\n";var c=jsonrpc.contactHandler.submit(h,i,d);if(c){$$(b.parentNode).hide();$$("#"+b.id+"SuccessContainer").show()}else{$$(b.parentNode).hide();$$("#"+b.id+"FailureContainer").show()}};connect(window,"onload",function(){OSM.PUB.thumbRoll.connectThumbs();connect(document.body,"onclick",OSM.PUB.handlers.expanderContractorClick);var a=getByTagAndClass("form","contactForm");forEach(a,function(b){connect(b,"onsubmit",OSM.PUB.contact.submitContactForm)})});
var supersleight=function(){var d=false;var b=false;var h="/images/x.gif";var a=/x\.gif$/i;var g=function(){if(d){d=document.getElementById(d)}else{d=document}for(var j=d.all.length-1,k=null;(k=d.all[j]);j--){if(k.className=="noSupersleight"){continue}if(k.currentStyle.backgroundImage.match(/\.png/i)!==null){f(k)}if(k.tagName=="IMG"&&k.src.match(/\.png$/i)!==null){c(k)}if(b&&(k.tagName=="A"||k.tagName=="INPUT")&&k.style.position===""){k.style.position="relative"}}};var f=function(j){var l="scale";var i=j.currentStyle.backgroundImage;var k=i.substring(5,i.length-2);if(j.currentStyle.backgroundRepeat=="no-repeat"){l="crop"}j.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+k+"', sizingMethod='"+l+"')";j.style.backgroundImage="url("+h+")"};var c=function(i){var j=i.src;i.style.width=i.width+"px";i.style.height=i.height+"px";i.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+j+"', sizingMethod='scale')";i.src=h};var e=function(i){var j=window.onload;if(typeof window.onload!="function"){window.onload=i}else{window.onload=function(){if(j){j()}i()}}};return{init:function(){e(g)},limitTo:function(i){d=i},run:function(){g()}}}();supersleight.init();

