function _ss_hiBg(B){if(B!=null){B.style.backgroundColor="#E4ECDD";B.style.border="1px solid #C0E1A8";var A=B.getElementsByTagName("span");if(A.length>0){A[0].style.color="#2a4e0d";A[0].style.fontWeight="bold"}}}function _ss_lowBg(B,C){if(B!=null){if(!B.isActive){B.style.backgroundColor=(C?C:"#FFF");B.style.border="1px solid #FFF";var A=B.getElementsByTagName("span");if(A.length>0){A[0].style.color="";A[0].style.fontWeight="normal"}}}}function _ss_setSize(B,A){w=0;h=0;switch(B){case 0:w=$("width").value;h=$("height").value;if(window.mainObject.getLpcfg()["skinType"]!=0){if(w<300){w=300}if(h<250){h=250}}break;case 1:w=500;h=320;break;case 2:w=400;h=280;break;case 3:w=300;h=250;break}$("width").value=w;$("height").value=h;addSet({playerConfig:{width:w,height:h}});window.mainObject.updateMe();return false}function gb_uploadFinishedTest(A){if(!window._gb_uploadCname){return false}var G="";try{G=getCookieValue(window._gb_uploadCname,true)}catch(J){G=false}if(!G){setTimeout("gb_uploadFinishedTest();",300);return false
}G=decodeURIComponent(G);var L=false;var D=window.mainObject.ilMain.getTeaserContentId();if(D!=G){var C=new Imagelooop.LooopImage(window.mainObject.ilMain,D);C.deleteImage();window.mainObject.ilMain.setTeaserContentId(G)}var M=new Imagelooop.LooopImage(window.mainObject.ilMain,G);var I={};for(var H in window.mainObject.ilMainSettings){var F=window.mainObject.ilMainSettings[H];if(H!="id"&&H!="accessType"&&H!="test"&&typeof (F)!="object"){I[H]=decodeURIComponent(F)}}gb_addSet(I);L=true;var K=$("uploadFile");var B=K.cloneNode(true);B.value="";var E=$("uploadForm");E.removeChild(K);E.appendChild(B);$("uploadFile").style.display="block";$("file-uploading").style.display="none";setCookie(window._gb_uploadCname,null,cookieDomain);window._gb_uploadCname=null;if(!L){window.mainObject.updateMe(true)}return false}function gb_uploadFiles(C){while(C&&C.nodeName.toLowerCase()!="form"){C=C.parentNode}var B=window.mainObject.beforeCollectionCheck();window._gb_uploadCname="upload-"+B+"-"+new Date().getTime();$("file-uploading").style.display="block";
try{window.mainObject.ilMain.uploadImagesForm(C,null,null,window._gb_uploadCname)}catch(A){setCookie(window._gb_uploadCname,null,cookieDomain);window._gb_uploadCname=null;return false}try{$("uploadFile").style.display="none"}catch(A){alert("Couldn't set choosing-style. Error: "+A)}return false}window.swfUrl=mainSiteUrl+"/Guestbook.swf";window.cacheLpcfg={};window.defaultLpcfg="";function GuestbookMainObject(D,C,A,B){this.IlMainObject(D,C,A,B);this.updateMe=function(N,O){O=(O||"player");var Q=window.mainObject.getLpcfg();var L="";if(!Q||!Q.width){if(!window.defaultLpcfg||!window.defaultLpcfg.width){L=new Imagelooop.Looop(window.il,defaultId);Q=L.getLooopPlayerConfig()["playerConfig"];window.defaultLpcfg=Q}else{Q=window.defaultLpcfg}window.mainObject.ilMainSettings.playerConfig=Q}else{if(!window.defaultLpcfg||!window.defaultLpcfg.width){L=new Imagelooop.Looop(window.il,defaultId);window.defaultLpcfg=L.getLooopPlayerConfig()["playerConfig"]}}var H=(Q&&Q.width)?Q.width:425;var P=(Q&&Q.height)?Q.height:325;$("width").value=H;
$("height").value=P;var K=false;var J=$(O).getElementsByTagName("embed")[0];if(!J){J=$(O).getElementsByTagName("object")[0]}for(M in Q){if(window.cacheLpcfg[M]!=Q[M]){switch(M){case"width":$(O).style.width=(Q[M]+"px");break;case"height":$(O).style.height=(Q[M]+"px");break;case"skinType":makeActive("new_skin_fChoiceMenu",M,Q[M]);break}K=true;window.cacheLpcfg[M]=Q[M]}}if(!J||K||N){var G=this.getSettingsString().split("&");var E="";for(var M=0;M<G.length;M++){var F=G[M].search(/\$/);if(F>-1){G[M]=G[M].substring(F+1)}E+=(G[M]+"&")}E=E.replace(/coordinates=/gi,"location=").replace(/description=/gi,"message=");E+="c=01,05,01,01";var I=getPlayerCode(window.swfUrl,window.widgetName,H,P,E,false,false);I=I.replace(/id=/g,"Id=");$(O).innerHTML=I;embedAvail=false}if(window.ilSButtons&&window.mainObject.getId()!=defaultId&&window.mainObject.ilMainSettings.name&&window.mainObject.ilMainSettings.name!=i18nYourName){for(var M=0;M<window.ilSButtons.length;M++){window.ilSButtons[M].style.visibility="visible"}}else{for(var M=0;
M<window.ilSButtons.length;M++){window.ilSButtons[M].style.visibility="hidden"}}};this.saveMe=function(G){window.theForm=G;if(!window.il.isLoggedOn()){setCookie("setupCLooop",encodeURIComponent(window.mainObject.getId()),cookieDomain);setCookie("r",window.mainObject.ilMain.getPermalink()+"exportlooop.htm",cookieDomain)}var E=this.getSettingsString().replace(/id=/gi,"looopID=").replace(/name=/gi,"descriptiveName=").replace(/coordinates[^=]*=[^&]*/gi,"").replace(/test=[^&]*/gi,"");E+="&publishLooop=true";if(this.createParams){E+=((this.createParams.charAt(0)!="&"?"&":"")+this.createParams)}for(var F=0;F<window.ilSButtons.length;F++){window.ilSButtons[F].style.background="#B1B1B1";window.ilSButtons[F].oldOnclick=window.ilSButtons[F].onclick;window.ilSButtons[F].onclick=function(){}}this.ilObject.rpcCall("imagelooop.setLooopMetaData",E,function(H){if(!H||H.isException){for(var I=0;I<window.ilSButtons.length;I++){window.ilSButtons[I].setOpacity(1);window.ilSButtons[I].onclick=window.ilSButtons[I].oldOnclick}alert("Error on saving. Returned response was:\n"+H)
}else{if(window.theForm&&window.theForm.submit){G.submit()}else{window.location.href=(window.mainObject.getMetaData()["permalink"]+"exportlooop.htm")}}});return false}}copyPrototype(GuestbookMainObject,IlMainObject);function guestbookInit(){window.ilCheckItems=[];window.ilChooseItems=[];window.ilSButtons=new Array($("saveButton1"),$("saveButton2"));var F=$("uploaders").getElementsByTagName("div");for(var E=0;E<F.length;E++){if(F[E].className=="configValueTabLeft"||F[E].className=="configValueTabRight"){window.ilCheckItems.push(F[E])}}F=$("uploaders").getElementsByTagName("a");for(var E=0;E<F.length;E++){if(F[E].className=="configTab"){window.ilChooseItems.push(F[E])}}try{var C=window.mainObject.getLpcfg();$("width").value=C.width;$("height").value=C.height;window.mainObject.ilMainSettings.playerConfig["width"]=C.width;window.mainObject.ilMainSettings.playerConfig["height"]=C.height}catch(B){}try{Sortable.create("imagesPane",{tag:"div",overlap:"horizontal",onUpdate:function(){window.mainObject.updateImages()},constraint:false,format:/^(.*)$/,scroll:"window",ghosting:false})
}catch(A){}var D=$("uploaders").getElementsByTagName("a");for(var E=0;E<D.length;E++){if(D[E].className!="configTab"){continue}if(D[E].getAttribute("side")=="left"){D[E].setAttribute("activeColor","#D7D7D7");D[E].setAttribute("passiveColor","#E9E9E9")}else{D[E].setAttribute("activeColor","#C0E1A8");D[E].setAttribute("passiveColor","#E2F4DC")}D[E].onmouseover=function(){if(this.getAttribute("assignedTo")){this.style.backgroundColor=this.getAttribute("activeColor")}};D[E].onmouseout=function(){if(this.getAttribute("assignedTo")){if(this.getAttribute("clicked")&&this.getAttribute("clicked")!="false"){return false}this.style.backgroundColor=this.getAttribute("passiveColor")}};if(D[E].getAttribute("assignedTo")){D[E].onclick=function(){this.blur();if(this.getAttribute("clickable")&&this.getAttribute("clickable")=="false"){return false}this.setAttribute("clicked",true);var I=document.getElementById(this.getAttribute("assignedTo"));for(var J=0;J<window.ilCheckItems.length;J++){if(I==window.ilCheckItems[J]){var G=window.ilCheckItems[J].getElementsByTagName("img");
for(var H=0;H<G.length;H++){if(!G[H].getAttribute("src")){G[H].setAttribute("src",G[H].getAttribute("srz"))}}window.ilCheckItems[J].style.display="block"}else{if(window.ilCheckItems[J].getAttribute("side")==this.getAttribute("side")){window.ilCheckItems[J].style.display="none"}}}for(var J=0;J<window.ilChooseItems.length;J++){if(this==window.ilChooseItems[J]&&this.getAttribute("side")==window.ilChooseItems[J].getAttribute("side")){window.ilChooseItems[J].style.backgroundColor=this.getAttribute("activeColor");window.ilChooseItems[J].style.left="-1px";window.ilChooseItems[J].style.right="-1px";window.ilChooseItems[J].setAttribute("clicked",true)}else{if(this.getAttribute("side")==window.ilChooseItems[J].getAttribute("side")){window.ilChooseItems[J].style.backgroundColor=this.getAttribute("passiveColor");window.ilChooseItems[J].style.left="0px";window.ilChooseItems[J].style.right="0px";window.ilChooseItems[J].setAttribute("clicked",false)}}}return false}}}}function gb_coordinatesCallback(C){var D=C.responseXML.getElementsByTagName("Error");
if(D!=null&&D.length>0){alert("Map error: "+C.responseXML.getElementsByTagName("Message")[0].childNodes[0].nodeValue);return }var E=C.responseXML.getElementsByTagName("Result");if(E==null||E.length<=0){alert(guestbookCityNotFound);return }var B={};try{B.city=E[0].getElementsByTagName("City")[0].childNodes[0].nodeValue}catch(A){}try{B.state=E[0].getElementsByTagName("State")[0].childNodes[0].nodeValue}catch(A){}try{B.country=E[0].getElementsByTagName("Country")[0].childNodes[0].nodeValue}catch(A){}try{B.lat=E[0].getElementsByTagName("Latitude")[0].childNodes[0].nodeValue}catch(A){}try{B.lon=E[0].getElementsByTagName("Longitude")[0].childNodes[0].nodeValue}catch(A){}var F={};F.coordinatesAddress=(B.city+", "+B.state+", "+B.country);F.coordinates=B.lat+";"+B.lon;$("coordinatesAddress").setAttribute("oldvalue",F.coordinatesAddress);$("coordinatesAddress").value=F.coordinatesAddress;gb_addSet(F,true)}function gb_addSet(E){if(E.type&&E.value){var A=E.getAttribute("oldvalue");if(A&&A.replace(/^\s+/,"").replace(/\s+$/,"")==E.value){return 
}}else{if(E.type&&!E.value.replace(/^\s+/,"").replace(/\s+$/,"")){return }}if(E.name=="coordinatesAddress"){var D=new FlashXMLHttpRequest();D.setRequestHeader("Content-Type","text/xml");D.onload=function(){gb_coordinatesCallback(this)};var B="http://local.yahooapis.com/MapsService/V1/geocode?appid=if8kXUXV34HK5WfRn0xB.kAFHx9zn_1sTnxxCp7FNY7jSUSimivepvksBUi.2mdQXw--&location="+escape(E.value);D.open("GET",B);try{D.send("")}catch(I){alert("FlashXmlHTTPRequest failed: "+I)}return }else{if(defaultId!=window.mainObject.getId()){var C=new Imagelooop.LooopImage(window.mainObject.ilMain,window.mainObject.ilMain.getTeaserContentId());if(E.type){C.setMetaData((E.name+"="+encodeURIComponent(E.value)),function(J){})}else{if(typeof (E)=="object"){var H="";for(var G in E){H+=(G+"="+encodeURIComponent(E[G])+"&")}if(H){C.setMetaData(H,function(J){})}}}}}var F={};if(E.type){F[E.name]=encodeURIComponent(E.value);E.setAttribute("oldvalue",E.value.replace(/^\s+/,"").replace(/\s+$/,""))}else{if(typeof (E)=="object"){for(var G in E){if(typeof (E[G])=="string"){F[G]=encodeURIComponent(E[G])
}else{F[G]=E[G]}}}}addSet(F,true)}function addSet(B,C){var A="";for(foo in B){if(typeof (B[foo])=="object"){if(!window.mainObject.ilMainSettings[foo]){window.mainObject.ilMainSettings[foo]={}}for(bar in B[foo]){window.mainObject.ilMainSettings[foo][bar]=B[foo][bar];A+=(bar+"="+String(B[foo][bar]).split(",")[0]+"|")}}else{window.mainObject.ilMainSettings[foo]=B[foo];A+=(bar+"="+String(B[foo]).split(",")[0]+"|")}}window.mainObject.updateMe(C);return false}function makeActive(C,H,B){if(!C.childNodes){C=$(C)}var D=$("new_curr_"+H);var I=C.getElementsByTagName("div");var E=(!B||B=="0"||B=="0,");var J=false;var A=false;for(var F=0;F<I.length;F++){if(I[F].id==B){_ss_hiBg(I[F]);I[F].isActive=true;if(D){try{D.getElementsByTagName("span")[1].innerHTML=I[F].getAttribute("title");J=(B==window.defaultLpcfg[H]&&H=="transitionType");D.getElementsByTagName("a")[0].style.display=(J?"none":"inline");A=true}catch(G){}}}else{I[F].isActive=false;_ss_lowBg(I[F])}}if(D){var K=D.getElementsByTagName("span");K[0].style.display=(E?"none":"inline");
if(!A&&!E){K[1].innerHTML=i18nCustomOption}K[1].style.display=(E?"none":"inline");K[2].style.display=(E?"inline":"none");K[3].style.display=(J?"inline":"none");D.getElementsByTagName("a")[0].style.display=(E||J?"none":"inline")}return(H+"="+B)}function gb_choosePrivacy(){var B="";var A=document.forms.privacyForm.elements;for(var C=0;C<A.accessType.length;C++){if(A.accessType[C].checked){B+=A.accessType[C].value;break}}return addSet({accessType:B})};