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