/* This file came from Pixelsilk at http://www.glennsmithdds.com/api2.min.js
 *  Version: 3.0.16.8437 | 8/16/2011 11:28:30 AM */
if(!window["pixelsilk2"]){window["pixelsilk2"]=(function(){var p=1;var z=1200;var k;var c;var r;var A,h,j;function d(){if(typeof(A)==="function"){A()}}function b(){if(typeof(h)==="function"){h()}}function s(i){if(typeof(j)==="function"){j(i)}else{if(i.error){alert(i.message)}}}function o(i,F,D,B,E){g("JSON","/_System/Scripts/json2.min.js");d();if(typeof(E)!=="function"&&typeof(B)==="function"){E=B;B=null}else{if(typeof(E)!=="function"&&typeof(D)==="function"){E=D;D=null}}var C=function(G){b();if(E){E(G)}};a(i,F,D,B,C)}function a(C,H,F,E,G){var D=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");if(H==="GET"){var B=C+t(F,E)+"&format=json";if(B.length>z){H="POST"}else{C=B}}D.open(H,C,true);D.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");D.onreadystatechange=function(){if(D.readyState===4&&D.status===200&&(D.responseText||D.responseText==="")){var I=JSON.parse(D.responseText);if(I&&I.error===true){s(I)}else{if(G!==null){G(I)}}}else{if(D.readyState===4&&D.status===500){var J=JSON.parse(D.responseText);s(J)}else{if(D.readyState===4&&D.status===0){e(C,F,eventCallback)}}}};var i=m(F,E);D.send(i)}function e(B,E,H){var G=p++;var F=y(G,H);var D=m(E);var i=l(B,D,F,G);var C=document.getElementsByTagName("head")[0];C.appendChild(i)}function y(C,B){var i="callback"+C;window["pixelsilk2"][i]=function(D){window["pixelsilk2"][i]=null;var E=document.getElementById("pixelsilk2api"+C);if(E){E.parentNode.removeChild(E)}B(D)};return"pixelsilk2."+i}function t(H,G){var B="?";for(var F in H){B+=F+"=";if(typeof(H[F])=="object"&&(H[F] instanceof Array)){B+="[";if(H[F].length>0){if(typeof(H[F][0])=="object"){for(var E=0;E<H[F].length;E++){B+="{";for(var D in H[F][E]){B+=D+"="+H[F][E][D]+","}B=B.substr(0,B.length-1)+"},"}}else{for(var E=0;E<H[F].length;E++){B+=H[F][E]+","}}B=B.substr(0,B.length-1)}B+="]"}else{B+=H[F]}B+="&"}if(c){var C=q(B);B+="appId="+encodeURIComponent(c)+"&signature="+encodeURIComponent(C)+"&"}if(k&&!G){B+="token="+encodeURIComponent(k)+"&"}if(G){B+="auth="+encodeURIComponent(G.auth)+"&token="+encodeURIComponent(G.token)+"&"}return B.substr(0,B.length-1)}function m(E,C){var D="json=";if(typeof(E)!=="undefined"){var B=JSON.stringify(E);D+=encodeURIComponent(B)}if(k&&!C){D+="&token="+encodeURIComponent(k)}if(c){var i=q(B);D+="&appId="+encodeURIComponent(c)+"&signature="+encodeURIComponent(i)}if(C){D+="&auth="+encodeURIComponent(C.auth)+"&token="+encodeURIComponent(C.token)}return D}function q(i){if(typeof(i)==="undefined"){i=""}var B=i+r;g("SHA1","/_System/Scripts/webtoolkit.sha1.min.js");return f(B)}function l(B,C,F,E){var i=document.createElement("script");i.type="text/javascript";var D=B+"?"+C+"&callback="+F;if(D.length>2000){throw"URL length is over 2000 characters, not creating script tag."}i.src=D;i.id="pixelsilk2api"+E;i.className="pixelsilk2api";return i}function x(i){return function(D,C,E){var B=window["pixelsilk2"].urlBase+i.name;o(B,i.httpMethod,D,C,E)}}var n={init:function(i){k=i},setKey:function(B,i){c=B;r=i},start:function(i){A=i},end:function(i){h=i},error:function(i){j=i},ajaxPost:function(i,C,B,D){o(i,"POST",C,B,D)},domain:"www.glennsmithdds.com",urlBase:"http://www.glennsmithdds.com/api2/",appPath:""};function g(C,E){if(!window[C]){var B=window.location.protocol+"//"+n.domain;if(n.appPath){B+="/"+n.appPath}B+=E;var i=document.createElement("script");i.type="text/javascript";i.src=B;var D=document.getElementsByTagName("head")[0];D.appendChild(i)}}
/*
        *
        *  Secure Hash Algorithm (SHA1)
        *  http://www.webtoolkit.info/
        *
        **/
function f(J){function I(C,B){var i=(C<<B)|(C>>>(32-B));return i}function V(E){var D="";var B;var W;var C;for(B=0;B<=6;B+=2){W=(E>>>(B*4+4))&15;C=(E>>>(B*4))&15;D+=W.toString(16)+C.toString(16)}return D}function Y(E){var D="";var C;var B;for(C=7;C>=0;C--){B=(E>>>(C*4))&15;D+=B.toString(16)}return D}function G(B){B=B.replace(/\r\n/g,"\n");var i="";for(var D=0;D<B.length;D++){var C=B.charCodeAt(D);if(C<128){i+=String.fromCharCode(C)}else{if((C>127)&&(C<2048)){i+=String.fromCharCode((C>>6)|192);i+=String.fromCharCode((C&63)|128)}else{i+=String.fromCharCode((C>>12)|224);i+=String.fromCharCode(((C>>6)&63)|128);i+=String.fromCharCode((C&63)|128)}}}return i}var M;var aa,Z;var H=new Array(80);var Q=1732584193;var O=4023233417;var N=2562383102;var L=271733878;var K=3285377520;var X,U,T,S,R;var ab;J=G(J);var F=J.length;var P=new Array();for(aa=0;aa<F-3;aa+=4){Z=J.charCodeAt(aa)<<24|J.charCodeAt(aa+1)<<16|J.charCodeAt(aa+2)<<8|J.charCodeAt(aa+3);P.push(Z)}switch(F%4){case 0:aa=2147483648;break;case 1:aa=J.charCodeAt(F-1)<<24|8388608;break;case 2:aa=J.charCodeAt(F-2)<<24|J.charCodeAt(F-1)<<16|32768;break;case 3:aa=J.charCodeAt(F-3)<<24|J.charCodeAt(F-2)<<16|J.charCodeAt(F-1)<<8|128;break}P.push(aa);while((P.length%16)!=14){P.push(0)}P.push(F>>>29);P.push((F<<3)&4294967295);for(M=0;M<P.length;M+=16){for(aa=0;aa<16;aa++){H[aa]=P[M+aa]}for(aa=16;aa<=79;aa++){H[aa]=I(H[aa-3]^H[aa-8]^H[aa-14]^H[aa-16],1)}X=Q;U=O;T=N;S=L;R=K;for(aa=0;aa<=19;aa++){ab=(I(X,5)+((U&T)|(~U&S))+R+H[aa]+1518500249)&4294967295;R=S;S=T;T=I(U,30);U=X;X=ab}for(aa=20;aa<=39;aa++){ab=(I(X,5)+(U^T^S)+R+H[aa]+1859775393)&4294967295;R=S;S=T;T=I(U,30);U=X;X=ab}for(aa=40;aa<=59;aa++){ab=(I(X,5)+((U&T)|(U&S)|(T&S))+R+H[aa]+2400959708)&4294967295;R=S;S=T;T=I(U,30);U=X;X=ab}for(aa=60;aa<=79;aa++){ab=(I(X,5)+(U^T^S)+R+H[aa]+3395469782)&4294967295;R=S;S=T;T=I(U,30);U=X;X=ab}Q=(Q+X)&4294967295;O=(O+U)&4294967295;N=(N+T)&4294967295;L=(L+S)&4294967295;K=(K+R)&4294967295}var ab=Y(Q)+Y(O)+Y(N)+Y(L)+Y(K);return ab.toLowerCase()}var w=[{"name":"addNewPageType","httpMethod":"POST"},{"name":"addNewSystemFile","httpMethod":"POST"},{"name":"addPageTypeField","httpMethod":"POST"},{"name":"addPageTypeFieldValue","httpMethod":"POST"},{"name":"addRole","httpMethod":"POST"},{"name":"addSection","httpMethod":"POST"},{"name":"addTheme","httpMethod":"POST"},{"name":"addUser","httpMethod":"POST"},{"name":"canEditPassword","httpMethod":"POST"},{"name":"checkPermissions","httpMethod":"POST"},{"name":"checkValidNewControl","httpMethod":"POST"},{"name":"checkValidNewPageTypeField","httpMethod":"POST"},{"name":"copyControl","httpMethod":"POST"},{"name":"copyListItem","httpMethod":"POST"},{"name":"copyPageType","httpMethod":"POST"},{"name":"copySystemFile","httpMethod":"POST"},{"name":"copyTheme","httpMethod":"POST"},{"name":"createControl","httpMethod":"POST"},{"name":"createNewSectionSkin","httpMethod":"POST"},{"name":"deleteAlbum","httpMethod":"POST"},{"name":"deleteControl","httpMethod":"POST"},{"name":"deleteFile","httpMethod":"POST"},{"name":"deleteItem","httpMethod":"POST"},{"name":"deletePageType","httpMethod":"POST"},{"name":"deletePageTypeField","httpMethod":"POST"},{"name":"deletePageTypeFieldValue","httpMethod":"POST"},{"name":"deleteRole","httpMethod":"POST"},{"name":"deleteSectionById","httpMethod":"POST"},{"name":"deleteSectionSkin","httpMethod":"POST"},{"name":"deleteSystemFile","httpMethod":"POST"},{"name":"deleteTheme","httpMethod":"POST"},{"name":"deleteUser","httpMethod":"POST"},{"name":"editTheme","httpMethod":"POST"},{"name":"enablePlugin","httpMethod":"POST"},{"name":"enableSectionById","httpMethod":"POST"},{"name":"getAlbumContents","httpMethod":"POST"},{"name":"getAlbums","httpMethod":"POST"},{"name":"getAllSections","httpMethod":"POST"},{"name":"getBaseTypes","httpMethod":"POST"},{"name":"getConfiguration","httpMethod":"POST"},{"name":"getContent","httpMethod":"GET"},{"name":"getControlProperties","httpMethod":"POST"},{"name":"getControls","httpMethod":"POST"},{"name":"getControlSecurity","httpMethod":"POST"},{"name":"getControlSettings","httpMethod":"POST"},{"name":"getControlSkins","httpMethod":"POST"},{"name":"getControlTypes","httpMethod":"POST"},{"name":"getEdgeEnabled","httpMethod":"POST"},{"name":"getEmailAddressMessages","httpMethod":"POST"},{"name":"getEmailSettings","httpMethod":"POST"},{"name":"getEveryone","httpMethod":"POST"},{"name":"getFile","httpMethod":"POST"},{"name":"getIsSiteQueued","httpMethod":"POST"},{"name":"getLayoutSkins","httpMethod":"POST"},{"name":"getListItems","httpMethod":"GET"},{"name":"getLoginMessages","httpMethod":"POST"},{"name":"getPageTypeFields","httpMethod":"POST"},{"name":"getPageTypeFieldValues","httpMethod":"POST"},{"name":"getPageTypes","httpMethod":"POST"},{"name":"getPageTypeSkins","httpMethod":"POST"},{"name":"getPasswordMessages","httpMethod":"POST"},{"name":"getPasswordRequirements","httpMethod":"POST"},{"name":"getPlugins","httpMethod":"POST"},{"name":"getPluginSettings","httpMethod":"POST"},{"name":"getPluginsWithJavaScript","httpMethod":"POST"},{"name":"getPotentialUrl","httpMethod":"POST"},{"name":"getRoles","httpMethod":"POST"},{"name":"getSection","httpMethod":"POST"},{"name":"getSections","httpMethod":"POST"},{"name":"getSectionsUrl","httpMethod":"POST"},{"name":"getSecuritySettings","httpMethod":"POST"},{"name":"getSiteListSections","httpMethod":"POST"},{"name":"getSkins","httpMethod":"POST"},{"name":"getSystemFile","httpMethod":"POST"},{"name":"getSystemFilenames","httpMethod":"POST"},{"name":"getSystemFiles","httpMethod":"POST"},{"name":"getSystemImages","httpMethod":"POST"},{"name":"getThemes","httpMethod":"POST"},{"name":"getTokens","httpMethod":"POST"},{"name":"getTypeSkins","httpMethod":"POST"},{"name":"getUsernameMessages","httpMethod":"POST"},{"name":"getUsers","httpMethod":"POST"},{"name":"getWebboxContent","httpMethod":"GET"},{"name":"login","httpMethod":"POST"},{"name":"moveFile","httpMethod":"POST"},{"name":"movePageTypeFieldValueInsertBefore","httpMethod":"POST"},{"name":"movePageTypeFieldValueInsertBefore","httpMethod":"POST"},{"name":"moveSectionInsertBefore","httpMethod":"POST"},{"name":"moveSectionMakeChild","httpMethod":"POST"},{"name":"newSection","httpMethod":"POST"},{"name":"promoteControl","httpMethod":"POST"},{"name":"promoteFile","httpMethod":"POST"},{"name":"promotePageType","httpMethod":"POST"},{"name":"promoteTheme","httpMethod":"POST"},{"name":"purgeEdgeHost","httpMethod":"POST"},{"name":"purgeEdgeUrls","httpMethod":"POST"},{"name":"renameFile","httpMethod":"POST"},{"name":"renameSystemFile","httpMethod":"POST"},{"name":"renderSkin","httpMethod":"GET"},{"name":"saveAlbum","httpMethod":"POST"},{"name":"sendEmailVerificationLink","httpMethod":"POST"},{"name":"sendMailForPasswordUpdate","httpMethod":"POST"},{"name":"sendPasswordLink","httpMethod":"POST"},{"name":"sendVerificationEmail","httpMethod":"POST"},{"name":"setContent","httpMethod":"POST"},{"name":"setWebboxContent","httpMethod":"POST"},{"name":"showSectionInMenu","httpMethod":"POST"},{"name":"showSectionInSitemap","httpMethod":"POST"},{"name":"updateConfig","httpMethod":"POST"},{"name":"updateControlProperties","httpMethod":"POST"},{"name":"updateEmailSettings","httpMethod":"POST"},{"name":"updatePageType","httpMethod":"POST"},{"name":"updatePageTypeField","httpMethod":"POST"},{"name":"updatePageTypeFieldValue","httpMethod":"POST"},{"name":"updatePluginSettings","httpMethod":"POST"},{"name":"updateRole","httpMethod":"POST"},{"name":"updateSection","httpMethod":"POST"},{"name":"updateSecuritySettings","httpMethod":"POST"},{"name":"updateSkins","httpMethod":"POST"},{"name":"updateSystemFile","httpMethod":"POST"},{"name":"updateUser","httpMethod":"POST"},{"name":"updateUserByObject","httpMethod":"POST"},{"name":"useEmailAsUsername","httpMethod":"POST"},{"name":"verifyUserUniqueness","httpMethod":"POST"}];for(var u=0;u<w.length;u++){var v=w[u];n[v.name]=x(v)}return n}())};
