function previewRatingNew(b){clearRatingsNew();if(document.getElementById){for(var c=1;c<=b;c++){document.getElementById("myRatingStar"+c).src=stars_whole_your}}}function resetRatingsNew(){for(var b=1;b<=5;b++){document.getElementById("myRatingStar"+b).src=defaultStarsNew[b]}}function clearRatingsNew(){for(var b=1;b<=5;b++){document.getElementById("myRatingStar"+b).src=stars_empty}}var __savingRating=false;function saveRatingNew(b){if(!__savingRating){__savingRating=true;for(var c=1;c<=5;c++){defaultStarsNew[c]=document.getElementById("myRatingStar"+c).src}new Ajax.Updater("ratingDiv","/utility/rate_lens/"+theLensName,{asynchronous:true,method:"post",postBody:"rating="+b,onSuccess:function(){__savingRating=false}})}}function openFlagEdit(){document.getElementById("flagEditDiv").style.display="block";if(document.getElementById("comments")){document.getElementById("comments").select();document.getElementById("comments").focus()}}function closeFlagEdit(b){document.getElementById("flagEditDiv").style.display="none";if(b){new Effect.Highlight(document.getElementById("flagDiv"),{startcolor:"#FFFF99",endcolor:"#EEEEEE",restorecolor:"#EEEEEE"})}}function saveFlag(){if(!flagged){var f=document.getElementById("flag_form");pass=$("reason").value==""?false:true;if(pass){var d=f.getElementsByTagName("select");var e=f.getElementsByTagName("textarea");var c=saveFields(d);c+=saveFields(e);var b=function(h){if(h.responseText=="saved"){flagged=true;document.getElementById("flagDetailsDiv").innerHTML="<p>You have successfully reported this lens. Thank you.</p>";setTimeout("closeFlagEdit(true)",3000);document.getElementById("flagResultsDiv").innerHTML="";document.getElementById("flagDiv").innerHTML='<strong>Reported</strong> <img src="http://cdn.squidoo.com/images/icon-warn.gif" class="warn" />'}else{var g="<strong>"+h.responseText+"</strong>";document.getElementById("flagResultsDiv").innerHTML=g}};new Ajax.Request("/utility/flag_lens/"+theLensName,{asynchronous:true,method:"post",postBody:c,onSuccess:b})}else{alert("Before continuing, please tell us why you are reporting this lens as inappropriate.");Field.focus("comments")}}else{document.getElementById("flagDetailsDiv").innerHTML="<p>You have successfully reported this lens. Thank you.</p>";setTimeout("closeFlagEdit(true)",3000)}}function showAllFavorited(){new Ajax.Updater("fanroll","/utility/get_favorited/"+theLensName,{asynchronous:true})}function loadWorkshop(b){Element.show("divWorkshopPreloader");location.href="/lensmaster/workshop/"+b}function plexConfirmation(){if(!$("loginLiteMessage")){setTimeout("plexConfirmation()",1000)}else{$("loginLiteMessage").innerHTML='<strong>Yippeee you voted!</strong> <p>Would you like to go back to <a href="'+plexBack+'">where you came from</a> or stick around and <a href="#" onclick="Element.hide(\'overlay\');Effect.Fade(\'loginLite\');">vote for more stuff</a>?</p>';Element.show("loginLite","overlay")}}plexBack=null;function setClickOutTracking(){var b=document.getElementsByTagName("a");for(var d=0;d<b.length;d++){var e=b[d];try{if(typeof e.hostname=="unknown"){continue}if(e.href=="javascript:void(0);"){continue}if(e!=""&&e.hostname!=theRequestServerName&&e.hostname!=theServerName){if(e.className.indexOf("googleUrl")!=-1||e.className.indexOf("googleClickout")!=-1){e.onclick=trackAdWordClick;if(!theWindowPref){e.target="_blank"}}else{e.onclick=trackClickWrapper;if(!theWindowPref){e.target="_blank"}}}}catch(c){}}}function trackClickWrapper(){trackClick(this)}function trackClick(e){var d="url="+escape(e.href)+"&lens_id="+theLensId;new Ajax.Request("/utility/track_click",{asynchronous:true,method:"post",postBody:d});if(pageTracker!==undefined){var b=/https?:\/\/([\-a-zA-Z0-9.]+[\-a-zA-Z0-9\/+&@#\/%=~?_|!:,.;]*)/;var c=b.exec(e);if(c!=null&&c.length==2){pageTracker._trackPageview("/clickouts/"+c[1])}}}function trackAdWordClick(){var b=this.href;var c="url="+escape(b)+"&lens_id="+theLensId;new Ajax.Request("/utility/track_ad_click",{asynchronous:true,method:"post",postBody:c})}function trackReferrer(){var b="/utility/track_referrer?random="+Math.random();var c="lens_id="+theLensId;c+="&referrer="+escape(document.referrer);if(window.location.search.substring(1).indexOf("utm_campaign=search-discovery")!==-1||window.location.search.substring(1).indexOf("utm_campaign=lensmaster-discovery")!==-1){c+="&discovery=1"}new Ajax.Request(b,{asynchronous:true,method:"post",postBody:c})}if(window.trackReferrer){trackReferrer()}function fade(c,b){if(typeof Effect=="undefined"){return}if($("info")){new Effect.Highlight("info",{startcolor:"#86C80A",endcolor:"#DAEEB5",restorecolor:"#DAEEB5",duration:2.5})}}function setLoadFunctions(){setTooltips();fade();if(window.setClickOutTracking){setClickOutTracking()}}if(pageLoadActions==undefined){var pageLoadActions=[]}pageLoadActions.push(setLoadFunctions);function setDisplay(d,b){if($(d)){var c=$(d);c.style.display=b}}function toggleDisplay(f){var b=f+"Body";var d=f+"Hdr";if($(b)){var c=$(b);var h=c.style.display;var g="collapse";var e="expanded";if(h=="none"){setDisplay(b,"block");addClass(d,e);desist(f)}else{setDisplay(b,"none");addClass(d,g);persist(f,g)}}else{if($(f)){var c=$(f);var h=c.style.display;var g="collapse";var e="";if(h=="none"){setDisplay(f,"block")}else{setDisplay(f,"none")}}}}function addClass(e,b){if($(e)){var c=$(e);var d=c.className;c.className=b}}function persist(d,b){var c=new Date();c.setFullYear(c.getFullYear()+10);document.cookie=d+"="+b+"; path=/; expires="+c.toGMTString()}function desist(c){var b=new Date();b.setFullYear(b.getFullYear()-10);document.cookie=c+"=test; path=/; expires="+b.toGMTString()}function scheduleShow(){if(this.getElementsByTagName){setTipShow(this.getElementsByTagName("div"));setTipShow(this.getElementsByTagName("span"))}}function setTipShow(c){for(var b=0;b<c.length;b++){if(c[b].className.indexOf("toolTip")!=-1){c[b].mouseover=true;if(c[b].id){window.setTimeout('showTip("'+c[b].id+'")',250)}}}}function scheduleHide(){if(this.getElementsByTagName){setTipHide(this.getElementsByTagName("div"));setTipHide(this.getElementsByTagName("span"))}}var length=1000;function setTipHide(c){for(var b=0;b<c.length;b++){if(c[b].className.indexOf("toolTip")!=-1){c[b].mouseover=false;if(c[b].id){window.setTimeout('clearTip("'+c[b].id+'")',length)}}}}function showTip(c){var b=$(c);if(b.mouseover){b.style.display="block"}}function clearTip(c){var b=$(c);if(!b.mouseover){b.style.display="none"}else{window.setTimeout('clearTip("'+c+'")',1000)}}function recordParentMouseover(){this.parentNode.mouseover=true}function recordParentMouseout(){this.parentNode.mouseover=false}function setTooltips(b,f){if(f){length=f}if(!b){b="span"}if(document.getElementsByTagName){var d=document.getElementsByTagName(b);for(var c=0;c<d.length;c++){var e=d[c];if(e.className.indexOf("moreInfo")!=-1){e.onmouseover=scheduleShow;e.onmouseout=scheduleHide;setEvents(e,"div");setEvents(e,"span")}}}}function setEvents(d,b){var e=d.getElementsByTagName(b);for(var c=0;c<e.length;c++){if(e[c].className.indexOf("toolTip")!=-1){e[c].onmouseover=recordParentMouseover;e[c].onmouseout=recordParentMouseout}}}function swapDescriptions(c){var f=c.parentNode.parentNode;var e=f.getElementsByTagName("p");for(var b=0;b<e.length;b++){var d=e[b];if(d.className.indexOf("productDescriptionExcerpt")>=0){d.style.display="none"}else{if(d.className.indexOf("productDescriptionFullText")>=0){d.style.display="block"}}}}function openPlexSubmit(d,b,c){if(c){if(member_id!=""){Element.show("add-options"+d);Element.show("bulkSurfer"+d);new Ajax.Updater("captcha_"+d,"/utility/load_captcha",{asynchronous:true});return false}else{$("loginLiteMessage").innerHTML="<strong>Hey smarty!</strong>  To make your vote count, <a href=\"#\" onclick=\"Element.show('login-option'); Element.hide('join-option'); return false;\">login</a> or <a href=\"#\" onclick=\"Element.hide('login-option'); Element.show('join-option'); return false;\">join Squidoo</a> for free.";Element.show("loginLite","overlay");$("login_redirect").value="/"+b;$("reg_redirect").value="/"+b;window.scrollTo(0,0);return true}}else{Element.show("bulk"+d)}}function plexSubmit(f,b){var d=null;myform=$("plexoForm"+f);d=validate(myform);if(d){var c=myform.getElementsByTagName("input");var e=myform.getElementsByTagName("textarea");postString=saveFields(c);postString+=saveFields(e);new Ajax.Request("/utility/plexo_submit/"+f,{asynchronous:true,method:"post",postBody:postString,onSuccess:function(g){if(g.responseText=="captcha_error"){alert("The security word you entered is incorrect. Please try again.")}else{if(g.responseText==null||g.responseText==""){if(b=="manual"){$("add-options"+f).innerHTML='<div style="text-align: center; font-weight: bold; width: 80%; padding: 20px;"><img src="/images/btn-submitted.gif" alt="Submitted" style="text-align: center;" /> <br /><br />Thanks! Your item was submitted successfully, and is now pending approval from the lensmaster.</div>'}else{$("add-options"+f).innerHTML='<div style="text-align: center; font-weight: bold; width: 80%; padding: 20px;"><img src="/images/btn-submitted.gif" alt="Submitted" style="text-align: center;" /> <br /><br />Thanks! Your item was submitted successfully and will appear shortly. Don\'t forget to vote for it!</div>'}}else{alert("There was a problem saving your submission:\n\n"+g.responseText)}}}})}return false}function plexVote(lmi,lens_name,item_id,direction){if(member_id&&member_id!=""){new Ajax.Request("/utility/plexo_vote/"+item_id+"/"+direction,{onSuccess:function(response){if(response.responseText.indexOf("|")==0){var curPoints=response.responseText.substr(1);var children=$("plexItem"+item_id).getElementsByTagName("div");for(var i=0;i<children.length;i++){if(direction=="up"){if(children[i].className.indexOf("vote-up")>-1||children[i].className.indexOf("voted-up")>-1){children[i].className="voted-up"}else{if(children[i].className.indexOf("vote-down")>-1||children[i].className.indexOf("voted-down")>-1){children[i].className="vote-down"}}}else{if(direction=="down"){if(children[i].className.indexOf("vote-up")>-1||children[i].className.indexOf("voted-up")>-1){children[i].className="vote-up"}else{if(children[i].className.indexOf("vote-down")>-1||children[i].className.indexOf("voted-down")>-1){children[i].className="voted-down"}}}}}var newDisplay="";if(curPoints==-1||curPoints==1){newDisplay=curPoints+' point - <a href="javascript:window.location.reload();" title="refresh the page">refresh to rerank</a>'}else{newDisplay=curPoints+' points - <a href="javascript:window.location.reload()" title="refresh the page">refresh to rerank</a>'}var voteHistory=eval("voted"+lmi);if(!voteHistory[item_id]||voteHistory[item_id]!=direction){new Effect.Highlight("plexItem"+item_id);window.eval("voted"+lmi+"["+item_id+'] = "'+direction+'"')}$("pointsDisplay"+item_id).innerHTML=newDisplay}else{alert("There was a problem saving your vote. The problem was: \n\n"+response.repsponseText)}},asynchronous:true,method:"post"});return false}else{$("loginLiteMessage").innerHTML="<strong>Hey smarty!</strong>  To make your vote count, <a href=\"#\" onclick=\"Element.show('login-option'); Element.hide('join-option'); return false;\">login</a> or <a href=\"#\" onclick=\"Element.hide('login-option'); Element.show('join-option'); return false;\">join Squidoo</a> for free.";Element.show("loginLite","loginLiteMessage","default_onion");Element.show("default_onion");$("login_record_vote").value=item_id+"/"+direction;$("login_redirect").value="/"+lens_name;if(plexBack){$("login_redirect").value="/"+lens_name+"?plexBack="+escape(plexBack)}$("reg_record_vote").value=item_id+"/"+direction;$("reg_redirect").value="/"+lens_name;if(plexBack){$("reg_redirect").value="/"+lens_name+"?plexBack="+escape(plexBack)}window.scrollTo(0,0);return false}}function plexWidget(f,e,c,b,d){if(d){contents='<div id="plex'+e+'"><a href="'+d+'">Click through to see the plexo</a></div>'}else{contents='<div id="plex'+e+'"></div>'}contents+='<script type="text/javascript" src="http://www.squidoo.com/scripts/plexo/syndicate.php?plex_id='+e+'"><\/script>\n';contents+='<script type="text/javascript">\n';contents+="  openPlexo({\n";contents+='    "container" : "plex'+e+'"';if(c=="sidebar"){contents+=',\n    "size" : "sidebar"\n'}if(b!=undefined){contents+=',\n    "num_results" : "'+b+'"\n'}contents+="  });\n";contents+="<\/script>";$("widget-code-box"+f).value=contents;Element.show("widget-code"+f)}function openHelper(lmi,url){var width=550;var height=420;var _left=((screen.width-width)>>1);var _top=((screen.height-height)>>1);myWin=eval("helperWindow"+lmi);myWin=window.open(url,"modules_id"+lmi+"_helper","status=yes,scrollbars=yes,resizable=yes,width="+width+",height="+height+",left="+_left+",top="+_top);if(myWin.opener==null){myWin.opener=window}myWin.opener.name="opener";myWin.focus()}function showItems(e,b,d){var c="";if(b){c="Surfer"}Element.show("plexSubmission"+c+e);if(!d){Element.hide("bulk"+c+e)}new Effect.Highlight("bulkList"+c+e)}function hideToolbox(){$("toolbox-contents").hide();$("toggle-off").hide();$("toggle-on").show();var b=new Date();b.setTime(b.getTime()+(60*24*60*60*1000));var c=b.toGMTString();document.cookie="hide_toolbox = true; expires="+c+"; path=/";return false}function showToolbox(){$("toolbox-contents").show();$("toggle-off").show();$("toggle-on").hide();var b=new Date();b.setTime(b.getTime()+(-1*24*60*60*1000));var c=b.toGMTString();document.cookie="hide_toolbox = true; expires="+c+"; path=/";return false}function hideSquidUTips(){$("tip-squidu").hide();var b=new Date();b.setTime(b.getTime()+(60*24*60*60*1000));var c=b.toGMTString();document.cookie="hide_squidu_tips = true; expires="+c+"; path=/";return false}var RecaptchaOptions={theme:"white",tabindex:8};if(pageLoadActions==undefined){var pageLoadActions=[];var loaded=false}onPageLoadHandler=function(){if(!loaded){for(iterator=0;iterator<pageLoadActions.length;iterator++){pageLoadActions[iterator]()}loaded=true}};function hasPageLoaded(){if(typeof(pageBottomLoaded)!="undefined"){onPageLoadHandler()}}window.onload=onPageLoadHandler;window.setTimeout(hasPageLoaded,12000);var ajaxSpanStart='<span id="ajaxErrorText">';var ajaxSpanEnd="</span>";function validate(e,b){var c=true;if(b==null){b="errors"}var d=$(b);d.style.display="none";d.innerHTML="";inputresult=validateFields(e,"input",d);selectresult=validateFields(e,"select",d);textarearesult=validateFields(e,"textarea",d);ajaxresult=true;if($("ajaxErrors")&&$("ajaxErrors").innerHTML.length){ajaxresult=false}if(!ajaxresult){d.innerHTML+=ajaxSpanStart+"- "+$("ajaxErrors").innerHTML+ajaxSpanEnd}c=inputresult&&selectresult&&textarearesult&&ajaxresult;if($("notSubmittable")){c=false;d.innerHTML+=" - Your submission could not be processed. Please check the form for any remaining errors<br />"}if(!c){d.style.display="block";scrollToElement("errors")}else{d.style.display="none"}return c}function scrollToElement(e){var b=0;var d=0;var c=$(e);while(c){b+=c.offsetLeft;d+=c.offsetTop;c=c.offsetParent}window.scrollTo(b,d)}function waitForAJAX(c,d){if(!d){d="errors"}if(ajaxRunning){var b=setTimeout("waitForAJAX('"+c+"', '"+d+"')",500)}else{if(!$(d).innerHTML.length){$(d).style.display="none";$(c).submit()}else{$(d).style.display="block"}}}function validateFields(h,p,d){var z=h.getElementsByTagName(p);var b=true;var k="";var m=new Array();for(var u=0;u<z.length;u++){var B=true;var c=z[u].value;var A=z[u].name;var r=A.replace(/_/g," ");var y="";if(z[u].getAttribute("maxlength")){var v=z[u].getAttribute("maxlength");var q=z[u].value;if(q.length>v){q=q.substr(0,v);z[u].value=q}}var g="";if(z[u].getAttribute("errormessage")){g=" - "+z[u].getAttribute("errormessage")+"<br />"}if((!z[u].getAttribute("ignore")||z[u].getAttribute("ignore")==null)&&z[u].getAttribute("required")){if(p!="select"&&c==""){B=false;if(g==""){y=" - Please enter your "+r+"<br />"}else{y=g}}if(z[u].options){if(z[u].selectedIndex<1){B=false;if(g==""){y=" - Please select a "+r+"<br />"}else{y=g}}}if(z[u].className.indexOf("radio")>=0){var w=document.getElementsByName(A);B=false;for(var t=0;t<w.length;t++){if(w[t].checked){B=true}}if(!B){if(g==""){y=" - Please select a "+r+" value<br />"}else{y=g}}}}else{if(!z[u].getAttribute("ignore")&&z[u].getAttribute("validate")&&z[u].getAttribute("validate").length){var s=z[u].getAttribute("validate");if(s=="email"){s="[\\_\\d\\w\\.'\\-]+@([\\d\\w'\\-]\\.?)+"}else{if(s=="url"){c=c.replace("http://http","http");z[u].value=c;s="^https?://([\\_\\d\\w\\-]+\\.)+[\\_\\d\\w\\-]+(:\\d+)?(/[^\\s]*)*$"}else{if(s=="feed"){s="^((https?://)|(feed:(//)?))([\\_\\d\\w\\-]+\\.)+[\\_\\d\\w\\-]+(:\\d+)?(/[^\\s]*)*$"}else{if(s=="password"){s="[\\S]{4,8}"}else{if(s=="tag"){s="^[^\\\\\\/\\!@#$%\\^\\?<>\\|\\{\\}\\[\\]=+~`&\\*\\(\\)]+$"}}}}}var n=new RegExp(s);if(!n.test(c)){B=false;if(g==""){y=" - Please make sure that you are entering your "+r+" in the correct format<br />"}else{y=g}}}}if(!z[u].getAttribute("ignore")&&z[u].getAttribute("confirms")){var l=z[u].getAttribute("confirms");if($(l).value.toLowerCase()!=c.toLowerCase()){B=false;if(g==""){y=" - Please make sure that your "+l.replace("_"," ")+" is entered correctly in both fields<br />"}else{y=g}}}var x=findParentDiv(z[u]);var e=x.className;if(!x.getAttribute("classPristine")){x.setAttribute("classPristine",e)}if(!B){b=false;x.className=e+" error";z[u].setAttribute("error","true");var f=false;for(var t=0;t<m.length;t++){if(m[t]==y){f=true}}if(!f){m.push(y)}}else{if(z[u].getAttribute("error")){x.className=e.replace(" error","")}}}if(!b&&m.length>0){d.innerHTML+=m.join("\n")}return b}function findParentDiv(c){var b=c.parentNode;while(b.tagName!="DIV"){b=b.parentNode}return b}function saveFields(collection,lmi){var postString="";for(var i=0;i<collection.length;i++){var field=collection[i];var fieldId=field.id;var fieldName=field.name;var tempString="";if(field.type!="checkbox"&&field.type!="submit"&&field.type!="image"&&field.type!="select-one"&&field.type!="radio"){var value=field.value;var resultField=fieldId+"_value";if(fieldName.indexOf("[")>-1){resultField=fieldName.substr(0,fieldName.indexOf("["))+"_value"}if(field.type=="textarea"&&typeof(CKEDITOR)!="undefined"){var instance_name="modules_id"+lmi+"_lens_module_abstract";var instance=eval("CKEDITOR.instances.modules_id"+lmi+"_lens_module_abstract")}if(field.type=="textarea"&&typeof(instance)!="undefined"){value=instance.getData()+"<!-- wysiwyg -->"}else{if($(resultField)&&value!=""){if(fieldName.indexOf("[")>-1&&i>0){var current=$(resultField).innerHTML;if(current!=""){current=current+", "+escapeForDisplay(value,true)}else{current=escapeForDisplay(value)}$(resultField).innerHTML=current}else{$(resultField).innerHTML=escapeForDisplay(value,true)}}else{if($(resultField)&&value==""&&i==0){$(resultField).innerHTML=""}}}if(fieldName.indexOf("[]")>0){var newFieldName=fieldName.replace("[]","");if(postString.indexOf(newFieldName+"=")>=0){var nameAt=postString.indexOf(newFieldName+"=");var ampersandAt=postString.indexOf("&",nameAt);var postSlice=postString.slice(nameAt,ampersandAt);var newSlice=postSlice+","+escapeForURL(value);postString=postString.substr(0,nameAt)+newSlice+postString.substr(ampersandAt)}else{postString+=newFieldName+"="+escapeForURL(value)+"&"}}else{postString+=fieldName+"="+escapeForURL(value)+"&"}}else{if(field.type=="checkbox"&&field.checked&&fieldName.indexOf("[]")<0){postString+=fieldName+"=1&"}else{if(field.type=="checkbox"&&field.checked&&fieldName.indexOf("[]")>0){var newFieldName=fieldName.replace("[]","");var value=field.value;if(postString.indexOf(newFieldName+"=")>=0){var nameAt=postString.indexOf(newFieldName+"=");var ampersandAt=postString.indexOf("&",nameAt);var postSlice=postString.slice(nameAt,ampersandAt);var newSlice=postSlice+","+escapeForURL(value);postString=postString.substr(0,nameAt)+newSlice+postString.substr(ampersandAt)}else{postString+=newFieldName+"="+escapeForURL(value)+"&"}}else{if(field.type=="select-one"){var value=field.options[field.selectedIndex].value;postString+=fieldName+"="+escapeForURL(value)+"&"}else{if(field.type=="radio"){if(field.checked=="1"){postString+=fieldName+"="+escapeForURL(field.value)+"&"}}}}}}}return postString}function escapeForDisplay(c,d){if(c!=null){var b=new String(c);b=b.replace(/&/g,"&amp;");if(!d){b=b.replace(/</g,"&lt;");b=b.replace(/>/g,"&gt;");b=b.replace(/\"/g,"&quot;")}b=b.replace(/\r/g,"");b=b.replace(/\n/g,"<br />\n");b=b.replace(/&amp;nbsp;/g,"&nbsp;");return b}else{return""}}function escapeForFormField(b){return escapeForDisplay(b)}function escapeForURL(c){if(c!=null){var b=new String(escape(c));b=b.replace(/\+/g,"%2B");return b}else{return""}}function stripTags(c){var b=/<\/?[^>]+>/gi;c=c.replace(b,"");return c}function makeTinyMce(d,f){var e=false;var b=navigator.userAgent.indexOf("Safari")!=-1;if(elements){for(var c=0;c<elements.length;c++){if(elements[c].substr(0,d.length+1)==d+":"){e=true}}if(!b&&(!e||f)){elements.push(d);tinyMCE.execCommand("mceAddControl",false,d)}}}function unMakeTinyMce(d){var e=false;var b=navigator.userAgent.indexOf("Safari")!=-1;if(elements){for(var c=0;c<elements.length;c++){if(elements[c].substr(0,d.length+1)==d+":"){e=true}}if(!b&&e){elements.pop(d);tinyMCE.execCommand("mceRemoveControl",false,d)}}}function checkTinyMceContent(g){var l=g.getElementsByTagName("textarea");for(var f=0;f<l.length;f++){var d="";var c=l[f].id;for(var e=0;e<elements.length;e++){if(l[f].id+":"==elements[e].substr(0,l[f].id.length+1)){d=elements[e].replace(l[f].id+":","")}}var k=null;if(k=tinyMCE.getInstanceById(d)){var h=l[f].value;var b=k.getBody().innerHTML;if(h!=b){l[f].value=b}}}}var Carousel=Class.create();Carousel.prototype={initialize:function(c){this.carouselElemID=c;this.options=Object.extend({numVisible:1,scrollInc:1,animParameters:{},buttonStateHandler:null,animHandler:null,ajaxHandler:null,initDoneHandler:null,queue:"carousel",size:0,prevElementID:"prev-arrow",nextElementID:"next-arrow",ajaxParameters:null,url:null},arguments[1]||{});this.initDone=false;this.animRunning="none";this.requestIsRunning=false;this.animAfterFinish=this.options.animParameters.afterFinish;Object.extend(this.options.animParameters,{afterFinish:this._animDone.bind(this),queue:{position:"end",scope:this.options.queue}});this.prevScroll=this._prevScroll.bindAsEventListener(this);this.nextScroll=this._nextScroll.bindAsEventListener(this);this.onComplete=this._onComplete.bindAsEventListener(this);this.onFailure=this._onFailure.bindAsEventListener(this);Event.observe(this.options.prevElementID,"click",this.prevScroll);Event.observe(this.options.nextElementID,"click",this.nextScroll);var b="carousel-list";this.carouselList=document.getElementsByClassName(b,$(c))[0];this.options.size=$(this.carouselList.getElementsByTagName("li")).length;this._init()},destroy:function(){Event.stopObserving(this.options.prevElementID,"click",this.prevScroll);Event.stopObserving(this.options.nextElementID,"click",this.nextScroll)},scrollTo:function(b){var c=this.options.scrollInc;this.ignoreNoMoreImages=true;if(b>this.currentIndex){this.options.scrollInc=b-this.currentIndex;this._nextScroll(this)}else{this.options.scrollInc=this.currentIndex-b;this._prevScroll(this)}this.options.scrollInc=c},_init:function(){this.currentIndex=0;if(this.options.url){this._request(this.currentIndex,this.options.numVisible)}else{this._getLiElementSize();this._updateButtonStateHandler(this.options.prevElementID,false);this._updateButtonStateHandler(this.options.nextElementID,this.options.size>this.options.numVisible)}},_prevScroll:function(b){if(this.animRunning!="none"||this.currentIndex==0){return}var c=this.options.scrollInc;if(this.currentIndex-c<0){c=this.currentIndex}this._scroll(c);return false},_nextScroll:function(b){if(this.animRunning!="none"){return false}if(this.currentIndex+this.options.numVisible+this.options.scrollInc<=this.options.size){this._scroll(-this.options.scrollInc)}else{this.nbInCache=this.options.size-(this.currentIndex+this.options.numVisible);if(this.options.url&&this.noMoreImages==false){this._request(this.currentIndex+this.options.numVisible+this.nbInCache,this.options.scrollInc-this.nbInCache)}else{if(this.nbInCache>0){this._scroll(-this.nbInCache)}}}return false},_request:function(d,b){if(this.options.url&&!this.requestIsRunning){this.requestIsRunning=true;if(this.options.ajaxHandler){this.options.ajaxHandler(this,"before")}var c="start="+d+"&nb="+b;if(this.options.ajaxParameters!=null){c+="&"+this.options.ajaxParameters}new Ajax.Request(this.options.url,{parameters:c,onComplete:this.onComplete,onFailure:this.onFailure})}},_onComplete:function(b){this.requestIsRunning=false;this.carouselList.innerHTML+=b.responseText;var c=this.options.size;this.options.size=this.carouselList.getElementsByTagName("li").length;var d=this.options.size-c;if(this.initDone==false){this._getLiElementSize();this.currentIndex=0;this.initDone=true;if(this.options.initDoneHandler){this.options.initDoneHandler(this)}this._updateButtonStateHandler(this.options.prevElementID,false);this._updateButtonStateHandler(this.options.nextElementID,this.options.size==this.options.numVisible);this.noMoreImages=this.options.size<this.options.numVisible}else{if(!this.ignoreNoMoreImages){this.noMoreImages=d!=this.options.scrollInc}else{this.ignoreNoMoreImages=false}if(d>0){this._scroll(-d,this.noMoreImages)}else{if(this.nbInCache>0){this._scroll(-this.nbInCache,true)}this._updateButtonStateHandler(this.options.nextElementID,false)}}if(this.options.ajaxHandler){this.options.ajaxHandler(this,"after")}},_onFailure:function(b){this.requestIsRunning=false},_animDone:function(b){if(this.options.animHandler){this.options.animHandler(this.carouselElemID,"after",this.animRunning)}this.animRunning="none";if(this.animAfterFinish){this.animAfterFinish(b)}},_updateButtonStateHandler:function(b,c){if(this.options.buttonStateHandler){this.options.buttonStateHandler(b,c)}},_scroll:function(c,b){this.animRunning=c>0?"prev":"next";if(this.options.animHandler){this.options.animHandler(this.carouselElemID,"before",this.animRunning)}new Effect.MoveBy(this.carouselList,0,c*this.elementSize,this.options.animParameters);this.currentIndex-=c;this._updateButtonStateHandler(this.options.prevElementID,this.currentIndex!=0);if(this.options.url&&this.noMoreImages==false){enable=true}else{enable=(this.currentIndex+this.options.numVisible<this.options.size)}this._updateButtonStateHandler(this.options.nextElementID,(b?false:enable))},_getLiElementSize:function(){var b=$(this.carouselList.getElementsByTagName("li")[0]);this.elementSize=b.getDimensions().width+parseFloat(b.getStyle("margin-left"))+parseFloat(b.getStyle("margin-right"))}};var hs={graphicsDir:"http://cdn.squidoo.com/scripts/highslide/graphics/",restoreCursor:"zoomout.cur",expandSteps:10,expandDuration:250,restoreSteps:10,restoreDuration:250,allowMultipleInstances:true,hideThumbOnExpand:true,captionSlideSpeed:1,outlineWhileAnimating:false,outlineStartOffset:3,marginLeft:10,marginRight:35,marginTop:10,marginBottom:35,numberOfImagesToPreload:5,zIndexCounter:1001,fullExpandIcon:"fullexpand.gif",fullExpandTitle:"Expand to actual size",restoreTitle:"Click to close image, click and drag to move. Use arrow keys for next and previous.",focusTitle:"Click to bring to front",loadingText:"Loading...",loadingTitle:"Click to cancel",loadingOpacity:0.75,showCredits:true,creditsText:"Powered by <i>Highslide JS</i>",creditsHref:"http://vikjavev.no/highslide/",creditsTitle:"Go to the Highslide JS homepage",enableKeyListener:true,anchor:"auto",align:"auto",targetX:null,targetY:null,captionId:null,captionTemplateId:null,slideshowGroup:null,spaceForCaption:30,minWidth:200,minHeight:200,allowSizeReduction:true,outlineType:"drop-shadow",wrapperClassName:null,preloadTheseImages:new Array(),continuePreloading:true,expandedImagesCounter:0,expanders:new Array(),overrides:new Array("anchor","align","targetX","targetY","outlineType","outlineWhileAnimating","spaceForCaption","wrapperClassName","minWidth","minHeight","captionId","captionTemplateId","allowSizeReduction","slideshowGroup"),overlays:new Array(),pendingOutlines:new Array(),origNodes:new Array(),faders:new Array(),ie:(document.all&&!window.opera),safari:navigator.userAgent.indexOf("Safari")!=-1,hasFocused:false,$:function(b){return document.getElementById(b)},push:function(b,c){b[b.length]=c},createElement:function(b,g,c,d,f){var e=document.createElement(b);if(g){hs.setAttribs(e,g)}if(f){hs.setStyles(e,{padding:0,border:"none",margin:0})}if(c){hs.setStyles(e,c)}if(d){d.appendChild(e)}return e},setAttribs:function(c,d){for(var b in d){c[b]=d[b]}},setStyles:function(d,c){for(var b in c){try{if(hs.ie&&b=="opacity"){d.style.filter="alpha(opacity="+(c[b]*100)+")"}else{d.style[b]=c[b]}}catch(f){}}},ieVersion:function(){arr=navigator.appVersion.split("MSIE");return parseFloat(arr[1])},clientInfo:function(){var b=document.compatMode&&document.compatMode!="BackCompat"?document.documentElement:document.body;this.width=hs.ie?b.clientWidth:self.innerWidth;this.height=hs.ie?b.clientHeight:self.innerHeight;this.scrollLeft=hs.ie?b.scrollLeft:pageXOffset;this.scrollTop=hs.ie?b.scrollTop:pageYOffset},position:function(c){var b=c;var d={x:b.offsetLeft,y:b.offsetTop};while(b.offsetParent){b=b.offsetParent;d.x+=b.offsetLeft;d.y+=b.offsetTop;if(b!=document.body&&b!=document.documentElement){d.x-=b.scrollLeft;d.y-=b.scrollTop}}return d},expand:function(c,f,b){try{new HsExpander(c,f,b);return false}catch(d){return true}},focusTopmost:function(){var b=0,c=-1;for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]){if(hs.expanders[i].wrapper.style.zIndex&&hs.expanders[i].wrapper.style.zIndex>b){b=hs.expanders[i].wrapper.style.zIndex;c=i}}}if(c==-1){hs.focusKey=-1}else{hs.expanders[c].focus()}},closeId:function(b){return hs.close(b)},close:function(b){try{hs.getExpander(b).doClose()}catch(c){}return false},getAdjacentAnchor:function(f,g){var b=document.getElementsByTagName("A"),d=new Array,c=-1,e=0;for(i=0;i<b.length;i++){if(hs.isHsAnchor(b[i])&&((hs.expanders[f].slideshowGroup==hs.getParam(b[i],"slideshowGroup")))){d[e]=b[i];if(hs.expanders[f]&&b[i]==hs.expanders[f].a){c=e}e++}}return d[c+g]},getParam:function(a,param){try{var s=a.onclick.toString().replace(/\s/g," ").split("{")[2].split("}")[0];if(hs.safari){for(var i=0;i<hs.overrides.length;i++){s=s.replace(hs.overrides[i]+":",","+hs.overrides[i]+":").replace(new RegExp("^\\s*?,"),"")}}eval("var arr = {"+s+"};");if(arr[param]){return arr[param]}else{return hs[param]}}catch(e){return hs[param]}},getSrc:function(b){var c=hs.getParam(b,"src");if(c){return c}return b.rel.replace(/_slash_/g,"/")||b.href},cloneNode:function(d){if(!hs.$(d)&&!hs.origNodes[d]){return null}var c,b;if(hs.origNodes[d]){b=hs.origNodes[d];c=b.cloneNode(1);hs.setId(c,/-hsOrig$/,1)}else{b=hs.$(d);c=b.cloneNode(1);if(!d.match(/-hsCache[0-9]+$/)){hs.origNodes[d]=hs.$(d);hs.setId(hs.$(d),"-hsOrig")}}if(hs.ie&&hs.cloneFix){c=hs.cloneFix(b,c)}return c},setId:function(g,c,f){if(g.id){g.id=f?g.id.replace(c,""):g.id+c}if(g.name){g.name=f?g.name.replace(c,""):g.name+c}if(hs.geckoBug&&hs.geckoBug(g)){return}var b=g.childNodes;for(var e=0;e<b.length;e++){if(b[e]){hs.setId(b[e],c,f)}}},purge:function(f){var c=f.attributes,e,b,g;if(c){b=c.length;for(e=0;e<b;e+=1){g=c[e].name;if(typeof f[g]==="function"){f[g]=null}}}if(hs.geckoBug&&hs.geckoBug(f)){return}c=f.childNodes;if(c){b=c.length;for(e=0;e<b;e+=1){hs.purge(f.childNodes[e])}}},previousOrNext:function(b,f){var d=hs.getExpander(b);try{hs.getAdjacentAnchor(d.key,f).onclick()}catch(c){}try{d.doClose()}catch(c){}return false},previous:function(b){return hs.previousOrNext(b,-1)},next:function(b){return hs.previousOrNext(b,1)},keyHandler:function(b){if(!b){b=window.event}if(!b.target){b.target=b.srcElement}if(b.target.form){return}var c=null;switch(b.keyCode){case 34:case 39:case 40:c=1;break;case 33:case 37:case 38:c=-1;break;case 27:case 13:c=0}if(c!==null){hs.removeEventListener(document,"keydown",hs.keyHandler);try{if(!hs.enableKeyListener){return true}}catch(b){}if(b.preventDefault){b.preventDefault()}else{b.returnValue=false}if(c==0){try{hs.getExpander().doClose()}catch(b){}return false}else{return hs.previousOrNext(hs.focusKey,c)}}else{return true}},registerOverlay:function(b){hs.push(hs.overlays,b)},getWrapperKey:function(b){var d,c=/^highslide-wrapper-([0-9]+)$/;d=b;while(d.parentNode){d=d.parentNode;if(d.id&&d.id.match(c)){return d.id.replace(c,"$1")}}d=b;while(d.parentNode){if(d.tagName&&hs.isHsAnchor(d)){for(key=0;key<hs.expanders.length;key++){exp=hs.expanders[key];if(exp&&exp.a==d){return key}}}d=d.parentNode}},getExpander:function(b){try{if(!b){return hs.expanders[hs.focusKey]}if(typeof b=="number"){return hs.expanders[b]}if(typeof b=="string"){b=hs.$(b)}return hs.expanders[hs.getWrapperKey(b)]}catch(c){}},cleanUp:function(){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].isExpanded){hs.focusTopmost()}}},mouseClickHandler:function(f){if(!f){f=window.event}if(f.button>1){return true}if(!f.target){f.target=f.srcElement}if(f.target.form){return}var h=f.target;while(h.parentNode&&!(h.className&&h.className.match(/highslide-(image|move|html)/))){h=h.parentNode}if(!h.parentNode){return}hs.dragExp=hs.getExpander(h);if(h.className.match(/highslide-(image|move)/)){var d=true;var c=parseInt(hs.dragExp.wrapper.style.left);var g=parseInt(hs.dragExp.wrapper.style.top)}if(f.type=="mousedown"){if(d){if(h.className.match("highslide-image")){hs.dragExp.content.style.cursor="move"}hs.wLeft=c;hs.wTop=g;hs.dragX=f.clientX;hs.dragY=f.clientY;hs.addEventListener(document,"mousemove",hs.mouseMoveHandler);if(f.preventDefault){f.preventDefault()}if(hs.dragExp.content.className.match(/highslide-(image|html)-blur/)){hs.dragExp.focus();hs.hasFocused=true}return false}else{if(h.className.match(/highslide-html/)){hs.dragExp.focus();hs.dragExp.redoShowHide();hs.hasFocused=false}}}else{if(f.type=="mouseup"){hs.removeEventListener(document,"mousemove",hs.mouseMoveHandler);if(d&&hs.dragExp){if(h.className.match("highslide-image")){h.style.cursor=hs.styleRestoreCursor}var b=c!=hs.wLeft||g!=hs.wTop;if(!b&&!hs.hasFocused&&!h.className.match(/highslide-move/)){hs.dragExp.onClick()}else{if(b||(!b&&hs.hasHtmlexpanders)){hs.dragExp.redoShowHide()}}hs.hasFocused=false}else{if(h.className.match("highslide-image-blur")){h.style.cursor=hs.styleRestoreCursor}}}}},mouseMoveHandler:function(c){if(!hs.dragExp||!hs.dragExp.wrapper){return}if(!c){c=window.event}hs.dragExp.x.min=hs.wLeft+c.clientX-hs.dragX;hs.dragExp.y.min=hs.wTop+c.clientY-hs.dragY;var b=hs.dragExp.wrapper;b.style.left=hs.dragExp.x.min+"px";b.style.top=hs.dragExp.y.min+"px";if(hs.dragExp.objOutline){var d=hs.dragExp.objOutline;d.table.style.left=(hs.dragExp.x.min-d.offset)+"px";d.table.style.top=(hs.dragExp.y.min-d.offset)+"px"}return false},addEventListener:function(b,d,c){try{b.addEventListener(d,c,false)}catch(f){try{b.detachEvent("on"+d,c);b.attachEvent("on"+d,c)}catch(f){b["on"+d]=c}}},removeEventListener:function(b,d,c){try{b.removeEventListener(d,c,false)}catch(f){try{b.detachEvent("on"+d,c)}catch(f){b["on"+d]=null}}},isHsAnchor:function(b){return(b.onclick&&b.onclick.toString().replace(/\s/g," ").match(/hs.(htmlE|e)xpand/))},preloadFullImage:function(c){if(hs.continuePreloading&&hs.preloadTheseImages[c]&&hs.preloadTheseImages[c]!="undefined"){var b=document.createElement("img");b.onload=function(){hs.preloadFullImage(c+1)};b.src=hs.preloadTheseImages[c]}},preloadImages:function(b){if(b&&typeof b!="object"){hs.numberOfImagesToPreload=b}var d,c=0;var f=document.getElementsByTagName("A");for(i=0;i<f.length;i++){a=f[i];d=hs.isHsAnchor(a);if(d&&d[0]=="hs.expand"){if(c<hs.numberOfImagesToPreload){hs.preloadTheseImages[c]=hs.getSrc(a);c++}}}new HsOutline(hs.outlineType,function(){hs.preloadFullImage(0)});var e=hs.createElement("img",{src:hs.graphicsDir+hs.restoreCursor})},genContainer:function(){if(!hs.container){hs.container=hs.createElement("div",null,{position:"absolute",left:0,top:0,width:"100%",zIndex:hs.zIndexCounter},document.body,true)}},fade:function(e,f,c,b,d){f=parseFloat(f);if(f<=0){e.style.visibility="hidden"}else{e.style.visibility="visible"}if(b*(f-c)>0){return}if(d==null){d=hs.faders.length}if(typeof(e.i)!="undefined"&&e.i!=d){clearTimeout(hs.faders[e.i]);f=e.tempOpacity}e.i=d;e.tempOpacity=f;e.style.visibility=(f<=0)?"hidden":"visible";hs.setStyles(e,{opacity:f});hs.faders[d]=setTimeout(function(){hs.fade(e,Math.round((f+0.1*b)*100)/100,c,b,d)},25)}};HsOutline=function(g,c){if(!g){if(c){c()}return}this.onLoad=c;this.outlineType=g;var b=hs.ieVersion(),f;hs.genContainer();this.hasAlphaImageLoader=hs.ie&&b>=5.5&&b<7;this.hasPngSupport=!hs.ie||(hs.ie&&b>=7);this.hasOutline=this.outlineType&&(this.hasAlphaImageLoader||this.hasPngSupport);this.table=hs.createElement("table",{cellSpacing:0},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++,borderCollapse:"collapse"},hs.container,true);this.tbody=hs.createElement("tbody",null,null,this.table);this.td=Array();for(var d=0;d<=8;d++){if(d%3==0){f=hs.createElement("tr",null,null,this.tbody,true)}this.td[d]=hs.createElement("td",null,null,f,true);var e=d!=4?{lineHeight:0,fontSize:0}:{position:"relative"};hs.setStyles(this.td[d],e)}this.td[4].className=g;this.preloadGraphic()};HsOutline.prototype.preloadGraphic=function(){var c=hs.graphicsDir+"outlines/"+this.outlineType+".png";var b=hs.safari?hs.container:null;this.graphic=hs.createElement("img",null,{position:"absolute",left:"-9999px",top:"-9999px"},b,true);var d=this;this.graphic.onload=function(){d.onGraphicLoad()};this.graphic.src=c};HsOutline.prototype.onGraphicLoad=function(){var e=this.offset=this.graphic.width/4;var g=[[0,0],[0,-4],[-2,0],[0,-8],0,[-2,-8],[0,-2],[0,-6],[-2,-2]];for(var c=0;c<=8;c++){if(g[c]){if(this.hasAlphaImageLoader){var b=(c==1||c==7)?"100%":this.graphic.width+"px";var f=hs.createElement("div",null,{width:"100%",height:"100%",position:"relative",overflow:"hidden"},this.td[c],true);hs.createElement("div",null,{filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale, src='"+this.graphic.src+"')",position:"absolute",width:b,height:this.graphic.height+"px",left:(g[c][0]*e)+"px",top:(g[c][1]*e)+"px"},f,true)}else{hs.setStyles(this.td[c],{background:"url("+this.graphic.src+") "+(g[c][0]*e)+"px "+(g[c][1]*e)+"px"})}var d=2*e;hs.setStyles(this.td[c],{height:d+"px",width:d+"px"})}}hs.pendingOutlines[this.outlineType]=this;if(this.onLoad){this.onLoad()}};HsOutline.prototype.destroy=function(){hs.purge(this.table);try{this.table.parentNode.removeChild(this.table)}catch(b){}};HsExpander=function(j,e,g,l){hs.continuePreloading=false;this.custom=g;for(i=0;i<hs.overrides.length;i++){var b=hs.overrides[i];if(e&&typeof e[b]!="undefined"){this[b]=e[b]}else{this[b]=hs[b]}}var c;if(e&&e.thumbnailId){c=hs.$(e.thumbnailId)}else{c=j.getElementsByTagName("IMG")[0]}if(!c){c=j}for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb!=c&&!hs.expanders[i].onLoadStarted){hs.expanders[i].cancelLoading()}}for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&hs.expanders[i].thumb==c){hs.expanders[i].focus();return false}}if(!hs.allowMultipleInstances){var d=hs.expandedImagesCounter-1;if(hs.expanders[d]){hs.expanders[d].doClose()}}var k=this.key=hs.expandedImagesCounter++;hs.expanders[this.key]=this;if(l=="html"){this.isHtml=true;this.contentType="html"}else{this.isImage=true;this.contentType="image"}this.a=j;this.thumbsUserSetId=c.id||j.id;this.thumb=c;this.overlays=new Array();var h=hs.position(c);this.wrapper=hs.createElement("div",{id:"highslide-wrapper-"+this.key,className:this.wrapperClassName},{visibility:"hidden",position:"absolute",zIndex:hs.zIndexCounter++},null,true);this.wrapper.onmouseover=function(m){try{hs.expanders[k].onMouseOver()}catch(m){}};this.wrapper.onmouseout=function(m){try{hs.expanders[k].onMouseOut()}catch(m){}};this.thumbWidth=c.width?c.width:c.offsetWidth;this.thumbHeight=c.height?c.height:c.offsetHeight;this.thumbLeft=h.x;this.thumbTop=h.y;this.thumbOffsetBorderW=(this.thumb.offsetWidth-this.thumbWidth)/2;this.thumbOffsetBorderH=(this.thumb.offsetHeight-this.thumbHeight)/2;hs.genContainer();if(hs.pendingOutlines[this.outlineType]){this.connectOutline();this[this.contentType+"Create"]()}else{if(!this.outlineType){this[this.contentType+"Create"]()}else{this.displayLoading();var f=this;new HsOutline(this.outlineType,function(){f.connectOutline();f[f.contentType+"Create"]()})}}};HsExpander.prototype.connectOutline=function(b,d){var c=hs.pendingOutlines[this.outlineType];this.objOutline=c;hs.pendingOutlines[this.outlineType]=null};HsExpander.prototype.displayLoading=function(){if(this.onLoadStarted||this.loading){return}this.originalCursor=this.a.style.cursor;this.a.style.cursor="wait";if(!hs.loading){hs.loading=hs.createElement("a",{className:"highslide-loading",title:hs.loadingTitle,innerHTML:hs.loadingText},{position:"absolute",opacity:hs.loadingOpacity},hs.container)}this.loading=hs.loading;this.loading.href="javascript:hs.expanders["+this.key+"].cancelLoading()";this.loading.visibility="visible";this.loading.style.left=(this.thumbLeft+this.thumbOffsetBorderW+(this.thumbWidth-this.loading.offsetWidth)/2)+"px";this.loading.style.top=(this.thumbTop+(this.thumbHeight-this.loading.offsetHeight)/2)+"px";setTimeout("if (hs.expanders["+this.key+"] && hs.expanders["+this.key+"].loading) hs.expanders["+this.key+"].loading.style.visibility = 'visible';",100)};HsExpander.prototype.imageCreate=function(){var c=this.key;var b=document.createElement("img");this.content=b;b.onload=function(){try{hs.expanders[c].onLoad()}catch(d){}};b.className="highslide-image";b.style.visibility="hidden";b.style.display="block";b.style.position="absolute";b.style.maxWidth="none";b.style.zIndex=3;b.title=hs.restoreTitle;if(hs.safari){hs.container.appendChild(b)}b.src=hs.getSrc(this.a);this.displayLoading()};HsExpander.prototype.onLoad=function(){try{if(!this.content){return}if(this.onLoadStarted){return}else{this.onLoadStarted=true}if(this.loading){this.loading.style.visibility="hidden";this.loading=null;this.a.style.cursor=this.originalCursor||""}if(this.isImage){this.newWidth=this.content.width;this.newHeight=this.content.height;this.fullExpandWidth=this.newWidth;this.fullExpandHeight=this.newHeight;this.content.width=this.thumbWidth;this.content.height=this.thumbHeight}else{if(this.htmlGetSize){this.htmlGetSize()}}this.marginBottom=hs.marginBottom;this.getCaption();this.wrapper.appendChild(this.content);this.content.style.position="relative";if(this.caption){this.wrapper.appendChild(this.caption)}this.wrapper.style.left=this.thumbLeft+"px";this.wrapper.style.top=this.thumbTop+"px";hs.container.appendChild(this.wrapper);this.offsetBorderW=(this.content.offsetWidth-this.thumbWidth)/2;this.offsetBorderH=(this.content.offsetHeight-this.thumbHeight)/2;var d=hs.marginRight+2*this.offsetBorderW;this.marginBottom+=2*this.offsetBorderH;var j=this.newWidth/this.newHeight;var h=this.allowSizeReduction?this.minWidth:this.newWidth;var m=this.allowSizeReduction?this.minHeight:this.newHeight;var f={x:"auto",y:"auto"};if(this.align=="center"){f.x="center";f.y="center"}else{if(this.anchor.match(/^top/)){f.y=null}if(this.anchor.match(/right$/)){f.x="max"}if(this.anchor.match(/^bottom/)){f.y="max"}if(this.anchor.match(/left$/)){f.x=null}}client=new hs.clientInfo();this.x={min:parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW,span:this.newWidth,minSpan:this.newWidth<h?this.newWidth:h,justify:f.x,target:this.targetX,marginMin:hs.marginLeft,marginMax:d,scroll:client.scrollLeft,clientSpan:client.width,thumbSpan:this.thumbWidth};var c=this.x.min+parseInt(this.thumbWidth);this.x=this.justify(this.x);this.y={min:parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH,span:this.newHeight,minSpan:this.newHeight<m?this.newHeight:m,justify:f.y,target:this.targetY,marginMin:hs.marginTop,marginMax:this.marginBottom,scroll:client.scrollTop,clientSpan:client.height,thumbSpan:this.thumbHeight};var b=this.y.min+parseInt(this.thumbHeight);this.y=this.justify(this.y);if(this.isHtml){this.htmlSizeOperations()}if(this.isImage){this.correctRatio(j)}var l=this.x;var k=this.y;this.show()}catch(g){if(hs.expanders[this.key]&&hs.expanders[this.key].a){window.location.href=hs.getSrc(hs.expanders[this.key].a)}}};HsExpander.prototype.show=function(){var b={x:this.x.min-20,y:this.y.min-20,w:this.x.span+40,h:this.y.span+40+this.spaceForCaption};hs.hideSelects=(hs.ie&&hs.ieVersion()<7);if(hs.hideSelects){this.showHideElements("SELECT","hidden",b)}hs.hideIframes=(window.opera||navigator.vendor=="KDE"||(hs.ie&&hs.ieVersion()<5.5));if(hs.hideIframes){this.showHideElements("IFRAME","hidden",b)}if(this.objOutline&&!this.outlineWhileAnimating){this.positionOutline(this.x.min,this.y.min,this.x.span,this.y.span)}var c=this.objOutline?this.objOutline.offset:0;this.changeSize(1,this.thumbLeft+this.thumbOffsetBorderW-this.offsetBorderW,this.thumbTop+this.thumbOffsetBorderH-this.offsetBorderH,this.thumbWidth,this.thumbHeight,this.x.min,this.y.min,this.x.span,this.y.span,hs.expandDuration,hs.expandSteps,hs.outlineStartOffset,c)};HsExpander.prototype.justify=function(d){var f,c=d==this.x?"x":"y";if(d.target&&d.target.match(/ /)){f=d.target.split(" ");d.target=f[0]}if(d.target&&hs.$(d.target)){d.min=hs.position(hs.$(d.target))[c];if(f&&f[1]&&f[1].match(/^[-]?[0-9]+px$/)){d.min+=parseInt(f[1])}}else{if(d.justify=="auto"||d.justify=="center"){var e=false;var b=true;if(d.justify=="center"){d.min=Math.round(d.scroll+(d.clientSpan-d.span-d.marginMax)/2)}else{d.min=Math.round(d.min-((d.span-d.thumbSpan)/2))}if(d.min<d.scroll+d.marginMin){d.min=d.scroll+d.marginMin;e=true}if(d.span<d.minSpan){d.span=d.minSpan;b=false}if(d.min+d.span>d.scroll+d.clientSpan-d.marginMax){if(e&&b){d.span=d.clientSpan-d.marginMin-d.marginMax}else{if(d.span<d.clientSpan-d.marginMin-d.marginMax){d.min=d.scroll+d.clientSpan-d.span-d.marginMin-d.marginMax}else{d.min=d.scroll+d.marginMin;if(b){d.span=d.clientSpan-d.marginMin-d.marginMax}}}}if(d.span<d.minSpan){d.span=d.minSpan;b=false}}else{if(d.justify=="max"){d.min=Math.floor(d.min-d.span+d.thumbSpan)}}}if(d.min<d.marginMin){tmpMin=d.min;d.min=d.marginMin;if(b){d.span=d.span-(d.min-tmpMin)}}return d};HsExpander.prototype.correctRatio=function(d){var c=this.x;var g=this.y;var f=false;if(c.span/g.span>d){var b=c.span;c.span=g.span*d;if(c.span<c.minSpan){c.span=c.minSpan;g.span=c.span/d}f=true}else{if(c.span/g.span<d){var e=g.span;g.span=c.span/d;f=true}}if(f){c.min=parseInt(this.thumbLeft)-this.offsetBorderW+this.thumbOffsetBorderW;c.minSpan=c.span;this.x=this.justify(c);g.min=parseInt(this.thumbTop)-this.offsetBorderH+this.thumbOffsetBorderH;g.minSpan=g.span;this.y=this.justify(g)}};HsExpander.prototype.changeSize=function(u,y,f,n,l,w,c,m,k,v,x,e,b){var h=(m-n)/x,p=(k-l)/x,g=(w-y)/x,d=(c-f)/x,z=(b-e)/x,q,j="hs.expanders["+this.key+"]";for(i=1;i<=x;i++){n+=h;l+=p;y+=g;f+=d;e+=z;q=Math.round(i*(v/x));var r="try {";if(i==1){r+=j+".content.style.visibility = 'visible';if ("+j+".thumb.tagName == 'IMG' && hs.hideThumbOnExpand) "+j+".thumb.style.visibility = 'hidden';"}if(i==x){n=m;l=k;y=w;f=c;e=b}r+=j+"."+this.contentType+"SetSize("+Math.round(n)+", "+Math.round(l)+", "+Math.round(y)+", "+Math.round(f)+", "+Math.round(e);r+=");} catch (e) {}";setTimeout(r,q)}if(u==1){setTimeout("try { "+j+'.objOutline.table.style.visibility = "visible"; } catch (e){}',q);setTimeout("try { "+j+".onExpanded(); } catch(e){}",q+50)}else{setTimeout("try { "+j+".onEndClose(); } catch(e){}",q)}};HsExpander.prototype.imageSetSize=function(c,d,b,k,j){try{this.content.width=c;this.content.height=d;if(this.objOutline&&this.outlineWhileAnimating){var g=this.objOutline.offset-j;this.positionOutline(b+g,k+g,c-2*g,d-2*g,1)}hs.setStyles(this.wrapper,{visibility:"visible",left:b+"px",top:k+"px"})}catch(f){window.location.href=hs.getSrc(this.a)}};HsExpander.prototype.positionOutline=function(b,g,c,d,e){if(!this.objOutline){return}var f=this.objOutline;if(e){f.table.style.visibility="visible"}f.table.style.left=(b-f.offset)+"px";f.table.style.top=(g-f.offset)+"px";f.table.style.width=(c+2*(this.offsetBorderW+f.offset))+"px";c+=2*(this.offsetBorderW-f.offset);d+=+2*(this.offsetBorderH-f.offset);f.td[4].style.width=c>=0?c+"px":0;f.td[4].style.height=d>=0?d+"px":0;if(f.hasAlphaImageLoader){f.td[3].style.height=f.td[5].style.height=f.td[4].style.height}};HsExpander.prototype.onExpanded=function(){this.isExpanded=true;this.focus();if(this.isHtml&&this.objectLoadTime=="after"){this.writeExtendedContent()}this.createCustomOverlays();if(hs.showCredits){this.writeCredits()}if(this.caption){this.writeCaption()}if(this.fullExpandWidth>this.x.span){this.createFullExpand()}if(!this.caption){this.onDisplayFinished()}};HsExpander.prototype.onDisplayFinished=function(){var b=this.key;var c=this.outlineType;new HsOutline(c,function(){try{hs.expanders[b].preloadNext()}catch(d){}})};HsExpander.prototype.preloadNext=function(){var c=hs.getAdjacentAnchor(this.key,1);if(c.onclick.toString().match(/hs\.expand/)){var b=hs.createElement("img",{src:hs.getSrc(c)})}};HsExpander.prototype.cancelLoading=function(){this.a.style.cursor=this.originalCursor;if(this.loading){hs.loading.style.visibility="hidden"}hs.expanders[this.key]=null};HsExpander.prototype.writeCredits=function(){var b=hs.createElement("a",{href:hs.creditsHref,className:"highslide-credits",innerHTML:hs.creditsText,title:hs.creditsTitle});this.createOverlay(b,"top left")};HsExpander.prototype.getCaption=function(){if(!this.captionId&&this.thumbsUserSetId){this.captionId="caption-for-"+this.thumbsUserSetId}if(this.captionId){this.caption=hs.cloneNode(this.captionId)}if(this.captionTemplateId){var b=(this.caption)?this.caption.innerHTML:"";this.caption=hs.cloneNode(this.captionTemplateId);if(this.caption){this.caption.innerHTML=this.caption.innerHTML.replace(/\s/g," ").replace("{caption}",b)}}if(this.caption){this.marginBottom+=this.spaceForCaption}};HsExpander.prototype.writeCaption=function(){try{this.wrapper.style.width=this.wrapper.offsetWidth+"px";this.caption.style.visibility="hidden";this.caption.className+=" highslide-display-block";var height;if(hs.ie&&(hs.ieVersion()<6||document.compatMode=="BackCompat")){height=this.caption.offsetHeight}else{var temp=hs.createElement("div",{innerHTML:this.caption.innerHTML},null,null,true);this.caption.innerHTML="";this.caption.appendChild(temp);height=this.caption.childNodes[0].offsetHeight;this.caption.innerHTML=this.caption.childNodes[0].innerHTML}hs.setStyles(this.caption,{overflow:"hidden",height:0,zIndex:2});if(hs.captionSlideSpeed){step=Math.round(height/50);if(step==0){step=1}step=step*hs.captionSlideSpeed}else{this.placeCaption(height,1);return}var t=0;for(var h=height%step;h<=height;h+=step,t+=10){var end=(h==height)?1:0;var eval="try { hs.expanders["+this.key+"].placeCaption("+h+", "+end+");} catch (e) {}";setTimeout(eval,t)}}catch(e){}};HsExpander.prototype.placeCaption=function(c,b){if(!this.caption){return}this.caption.style.height=c+"px";this.caption.style.visibility="visible";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;var d=this.objOutline;if(d){d.td[4].style.height=(this.wrapper.offsetHeight-2*this.objOutline.offset)+"px";if(d.hasAlphaImageLoader){d.td[3].style.height=d.td[5].style.height=d.td[4].style.height}}if(b){this.onDisplayFinished()}};HsExpander.prototype.showHideElements=function(g,d,c){var e=document.getElementsByTagName(g);if(e){for(i=0;i<e.length;i++){if(e[i].nodeName==g){var b=e[i].getAttribute("hidden-by");if(d=="visible"&&b){b=b.replace("["+this.key+"]","");e[i].setAttribute("hidden-by",b);if(!b){e[i].style.visibility="visible"}}else{if(d=="hidden"){var k=hs.position(e[i]);k.w=e[i].offsetWidth;k.h=e[i].offsetHeight;var j=(k.x+k.w<c.x||k.x>c.x+c.w);var h=(k.y+k.h<c.y||k.y>c.y+c.h);var f=hs.getWrapperKey(e[i]);if(!j&&!h&&f!=this.key){if(!e[i].currentStyle||(e[i].currentStyle&&e[i].currentStyle.visibility!="hidden")){if(!b){e[i].setAttribute("hidden-by","["+this.key+"]")}else{if(!b.match("["+this.key+"]")){e[i].setAttribute("hidden-by",b+"["+this.key+"]")}}e[i].style.visibility="hidden"}}else{if(b=="["+this.key+"]"||hs.focusKey==f){e[i].setAttribute("hidden-by","");e[i].style.visibility="visible"}else{if(b&&b.match("["+this.key+"]")){e[i].setAttribute("hidden-by",b.replace("["+this.key+"]",""))}}}}}}}}};HsExpander.prototype.focus=function(){for(i=0;i<hs.expanders.length;i++){if(hs.expanders[i]&&i==hs.focusKey){var b=hs.expanders[i];b.content.className+=" highslide-"+b.contentType+"-blur";if(b.caption){hs.setId(b.caption,"-hsBlur"+i);b.caption.className+=" highslide-caption-blur"}if(b.isImage){b.content.style.cursor=hs.ie?"hand":"pointer";b.content.title=hs.focusTitle}else{hs.setId(b.innerContent,"-hsBlur"+i)}}}this.wrapper.style.zIndex=hs.zIndexCounter++;if(this.objOutline){this.objOutline.table.style.zIndex=this.wrapper.style.zIndex}this.content.className="highslide-"+this.contentType;if(this.caption){hs.setId(this.caption,"-hsBlur"+this.key,1);this.caption.className=this.caption.className.replace(" highslide-caption-blur","")}if(this.isImage){this.content.title=hs.restoreTitle;hs.styleRestoreCursor=window.opera?"pointer":"url("+hs.graphicsDir+hs.restoreCursor+"), pointer";if(hs.ie&&hs.ieVersion()<6){hs.styleRestoreCursor="hand"}this.content.style.cursor=hs.styleRestoreCursor}else{hs.setId(this.innerContent,"-hsBlur"+this.key,1)}hs.focusKey=this.key;hs.addEventListener(document,"keydown",hs.keyHandler)};HsExpander.prototype.onClick=function(){this.doClose()};HsExpander.prototype.doClose=function(){hs.removeEventListener(document,"keydown",hs.keyHandler);try{this.isClosing=true;var b=parseInt(this.wrapper.style.left);var l=parseInt(this.wrapper.style.top);var c=(this.isImage)?this.content.width:parseInt(this.content.style.width);var d=(this.isImage)?this.content.height:parseInt(this.content.style.height);if(this.objOutline){if(this.outlineWhileAnimating){this.positionOutline(b,l,c,d)}else{if(this.preserveContent){this.objOutline.table.style.visibility="hidden"}else{this.objOutline.destroy()}}}var k=this.wrapper.childNodes.length;for(i=k-1;i>=0;i--){var j=this.wrapper.childNodes[i];if(j!=this.content){hs.purge(this.wrapper.childNodes[i]);this.wrapper.removeChild(this.wrapper.childNodes[i])}}if(this.isHtml){this.htmlOnClose()}this.wrapper.style.width="auto";this.content.style.cursor="default";var f=this.objOutline?this.objOutline.offset:0;this.changeSize(-1,b,l,c,d,this.thumbLeft-this.offsetBorderW+this.thumbOffsetBorderW,this.thumbTop-this.offsetBorderH+this.thumbOffsetBorderH,this.thumbWidth,this.thumbHeight,hs.restoreDuration,hs.restoreSteps,f,hs.outlineStartOffset)}catch(g){this.onEndClose()}};HsExpander.prototype.onEndClose=function(){this.thumb.style.visibility="visible";if(hs.hideSelects){this.showHideElements("SELECT","visible")}if(hs.hideIframes){this.showHideElements("IFRAME","visible")}if(this.preserveContent){this.sleep()}else{if(this.objOutline&&this.outlineWhileAnimating){this.objOutline.destroy()}hs.purge(this.wrapper);this.wrapper.parentNode.removeChild(this.wrapper)}hs.expanders[this.key]=null;hs.cleanUp()};HsExpander.prototype.createOverlay=function(c,f,k,b){if(typeof c=="string"){c=hs.cloneNode(c)}if(!c||typeof c=="string"||!this.isImage){return}var e=hs.createElement("div",null,{left:0,top:0,position:"absolute",zIndex:3,visibility:"hidden"},this.wrapper,true);if(b){hs.setStyles(c,{opacity:b})}c.className+=" highslide-display-block";e.appendChild(c);var d=this.offsetBorderW;var j=this.content.width-e.offsetWidth;var h=this.offsetBorderH;var g=this.content.height-e.offsetHeight;if(!f){f="center center"}if(f.match(/^bottom/)){h+=g}if(f.match(/^center/)){h+=g/2}if(f.match(/right$/)){d+=j}if(f.match(/center$/)){d+=j/2}e.style.left=d+"px";e.style.top=h+"px";if(k){e.setAttribute("hideOnMouseOut",true)}e.setAttribute("opacity",b);hs.fade(e,0,b,1);hs.push(this.overlays,e)};HsExpander.prototype.createCustomOverlays=function(){for(i=0;i<hs.overlays.length;i++){var b=hs.overlays[i];if(b.thumbnailId==null||b.thumbnailId==this.thumbsUserSetId){this.createOverlay(b.overlayId,b.position,b.hideOnMouseOut,b.opacity)}}};HsExpander.prototype.onMouseOver=function(){for(i=0;i<this.overlays.length;i++){hs.fade(this.overlays[i],0,this.overlays[i].getAttribute("opacity"),1)}};HsExpander.prototype.onMouseOut=function(){var b=new Array();var c=0;for(i=0;i<this.overlays.length;i++){if(this.overlays[i].getAttribute("hideOnMouseOut")){b[c]=this.overlays[i];c++}}for(i=0;i<b.length;i++){hs.fade(b[i],b[i].getAttribute("opacity"),0,-1)}};HsExpander.prototype.createFullExpand=function(){var b=hs.createElement("a",{href:"javascript:hs.expanders["+this.key+"].doFullExpand();",title:hs.fullExpandTitle},{background:"url("+hs.graphicsDir+hs.fullExpandIcon+")",display:"block",margin:"0 10px 10px 0",width:"45px",height:"44px"},null,true);this.createOverlay(b,"bottom right",true,0.75);this.fullExpandIcon=b};HsExpander.prototype.doFullExpand=function(){try{hs.purge(this.fullExpandIcon);this.fullExpandIcon.parentNode.removeChild(this.fullExpandIcon);this.focus();this.x.min=parseInt(this.wrapper.style.left)-(this.fullExpandWidth-this.content.width)/2;if(this.x.min<hs.marginLeft){this.x.min=hs.marginLeft}this.wrapper.style.left=this.x.min+"px";var b=this.wrapper.offsetWidth-this.content.width;this.content.width=this.fullExpandWidth;this.content.height=this.fullExpandHeight;this.x.span=this.content.width;this.wrapper.style.width=(this.x.span+b)+"px";this.y.span=this.wrapper.offsetHeight-2*this.offsetBorderH;this.positionOutline(this.x.min,this.y.min,this.x.span,this.y.span);for(var c=0;c<this.overlays.length;c++){hs.purge(this.overlays[c]);this.overlays[c].parentNode.removeChild(this.overlays[c])}if(hs.showCredits){this.writeCredits()}this.createCustomOverlays();this.redoShowHide()}catch(d){window.location.href=this.content.src}};HsExpander.prototype.redoShowHide=function(){var b={x:parseInt(this.wrapper.style.left)-20,y:parseInt(this.wrapper.style.top)-20,w:this.content.offsetWidth+40,h:this.content.offsetHeight+40+this.spaceForCaption};if(hs.hideSelects){this.showHideElements("SELECT","hidden",b)}if(hs.hideIframes){this.showHideElements("IFRAME","hidden",b)}};hs.addEventListener(document,"mousedown",hs.mouseClickHandler);hs.addEventListener(document,"mouseup",hs.mouseClickHandler);hs.addEventListener(window,"load",hs.preloadImages);hs.allowWidthReduction=false;hs.allowHeightReduction=false;hs.objectLoadTime="before";hs.cacheAjax=false;hs.preserveContent=false;hs.push(hs.overrides,"contentId");hs.push(hs.overrides,"allowWidthReduction");hs.push(hs.overrides,"allowHeightReduction");hs.push(hs.overrides,"objectType");hs.push(hs.overrides,"objectWidth");hs.push(hs.overrides,"objectHeight");hs.push(hs.overrides,"objectLoadTime");hs.push(hs.overrides,"swfObject");hs.push(hs.overrides,"cacheAjax");hs.push(hs.overrides,"preserveContent");hs.preloadTheseAjax=new Array;hs.cacheBindings=new Array;hs.sleeping=new Array;hs.cacheCounter=0;hs.clearing=hs.createElement("div",null,{clear:"both",borderTop:"1px solid white"},null,true);hs.htmlExpand=function(c,g,b){if(!hs.$(g.contentId)&&!hs.origNodes[g.contentId]){return true}for(var d=0;d<hs.sleeping.length;d++){if(hs.sleeping[d]&&hs.sleeping[d].a==c){hs.sleeping[d].awake();hs.sleeping[d]=null;return false}}try{hs.hasHtmlexpanders=true;new HsExpander(c,g,b,"html");return false}catch(f){return true}};hs.identifyContainer=function(c,b){for(i=0;i<c.childNodes.length;i++){if(c.childNodes[i].className==b){return c.childNodes[i]}}};hs.geckoBug=function(b){return(!hs.ie&&b.className&&b.className=="highslide-body"&&hs.expanders[hs.getWrapperKey(b)]&&hs.expanders[hs.getWrapperKey(b)].swfObject)};hs.cloneFix=function(e,d){var b=e.getElementsByTagName("SELECT");var c=d.getElementsByTagName("SELECT");for(i=0;i<b.length;i++){c[i].selectedIndex=b[i].selectedIndex}return d};hs.preloadAjax=function(f){var g=document.getElementsByTagName("A");var b,d,c=0;for(i=0;i<g.length;i++){b=g[i];d=hs.isHsAnchor(b);if(d&&d[0]=="hs.htmlExpand"&&hs.getParam(b,"objectType")=="ajax"&&hs.getParam(b,"cacheAjax")){hs.preloadTheseAjax[c]=b;c++}}hs.preloadAjaxElement(0)};hs.preloadAjaxElement=function(d){if(!hs.preloadTheseAjax[d]){return}var b=hs.preloadTheseAjax[d];var c=hs.cloneNode(hs.getParam(b,"contentId"));var e=new HsAjax(b,c);e.onError=function(){};e.onLoad=function(){hs.setId(c,/-hsOrig$/,1);hs.setId(c,"-hsCache"+hs.cacheCounter);hs.genContainer();hs.container.appendChild(c);hs.cacheBindings[c.id]=b;hs.cacheCounter++;hs.preloadAjaxElement(d+1)};e.run()};hs.getCacheBinding=function(c){for(var b in hs.cacheBindings){if(hs.cacheBindings[b]==c){return hs.$(b)}}return false};HsExpander.prototype.htmlCreate=function(){this.tempContainer=hs.createElement("div",null,{padding:"0 "+hs.marginRight+"px 0 "+hs.marginLeft+"px",position:"absolute",left:0,top:0},document.body);this.innerContent=hs.getCacheBinding(this.a);if(this.innerContent){hs.setId(this.innerContent,/-hsCache[0-9]+/,1)}else{this.innerContent=hs.cloneNode(this.contentId)}this.setObjContainerSize(this.innerContent);this.tempContainer.appendChild(this.innerContent);hs.setStyles(this.innerContent,{position:"relative",visibility:"hidden"});this.innerContent.className+=" highslide-display-block";this.content=hs.createElement("div",{className:"highslide-html"},{position:"relative",zIndex:3,overflow:"hidden",width:this.thumbWidth+"px",height:this.thumbHeight+"px"},null);if(this.objectType=="ajax"&&!hs.getCacheBinding(this.a)){var b=new HsAjax(this.a,this.innerContent);var c=this;b.onLoad=function(){c.onLoad()};b.onError=function(){location.href=hs.getSrc(this.a)};b.run()}else{this.onLoad()}};HsExpander.prototype.htmlGetSize=function(){this.innerContent.appendChild(hs.clearing);this.newWidth=this.innerContent.offsetWidth;this.newHeight=this.innerContent.offsetHeight;this.innerContent.removeChild(hs.clearing);if(hs.ie&&this.newHeight>parseInt(this.innerContent.currentStyle.height)){this.newHeight=parseInt(this.innerContent.currentStyle.height)}};HsExpander.prototype.setObjContainerSize=function(b,e){if(this.swfObject||this.objectType=="iframe"){var d=hs.identifyContainer(b,"highslide-body");d.style.width=this.swfObject?this.swfObject.attributes.width+"px":this.objectWidth+"px";d.style.height=this.swfObject?this.swfObject.attributes.height+"px":this.objectHeight+"px"}};HsExpander.prototype.writeExtendedContent=function(){if(this.hasExtendedContent){return}this.objContainer=hs.identifyContainer(this.innerContent,"highslide-body");if(this.objectType=="iframe"){if(hs.ie&&hs.ieVersion()<5.5){window.location.href=hs.getSrc(this.a)}var b=this.key;this.iframe=hs.createElement("iframe",{frameBorder:0},{width:this.objectWidth+"px",height:this.objectHeight+"px"},this.objContainer);if(hs.safari){this.iframe.src=null}this.iframe.src=hs.getSrc(this.a);if(this.objectLoadTime=="after"){this.correctIframeSize()}}else{if(this.swfObject){this.objContainer.id=this.objContainer.id||"hs-flash-id-"+this.key;this.swfObject.write(this.objContainer.id)}}this.hasExtendedContent=true};HsExpander.prototype.correctIframeSize=function(){var c=this.innerContent.offsetWidth-this.objContainer.offsetWidth;if(c<0){c=0}var b=this.innerContent.offsetHeight-this.objContainer.offsetHeight;hs.setStyles(this.iframe,{width:(this.x.span-c)+"px",height:(this.y.span-b)+"px"});hs.setStyles(this.objContainer,{width:this.iframe.style.width,height:this.iframe.style.height});this.scrollingContent=this.iframe;this.scrollerDiv=this.scrollingContent};HsExpander.prototype.htmlSizeOperations=function(){this.setObjContainerSize(this.innerContent);if(this.objectLoadTime=="before"){this.writeExtendedContent()}if(this.x.span<this.newWidth&&!this.allowWidthReduction){this.x.span=this.newWidth}if(this.y.span<this.newHeight&&!this.allowHeightReduction){this.y.span=this.newHeight}this.scrollerDiv=this.innerContent;this.mediumContent=hs.createElement("div",null,{width:this.x.span+"px",position:"relative",left:(this.x.min-this.thumbLeft)+"px",top:(this.y.min-this.thumbTop)+"px"},this.content,true);this.mediumContent.appendChild(this.innerContent);document.body.removeChild(this.tempContainer);hs.setStyles(this.innerContent,{border:"none",width:"auto",height:"auto"});var f=hs.identifyContainer(this.innerContent,"highslide-body");if(f&&!this.swfObject&&this.objectType!="iframe"){var c=f.cloneNode(true);if(hs.ie){c=hs.cloneFix(f,c)}f.innerHTML="";f.id=null;hs.setStyles(f,{margin:0,border:"none",padding:0,overflow:"hidden"});f.appendChild(hs.clearing);f.appendChild(c);var d=this.innerContent.offsetWidth-f.offsetWidth;var b=this.innerContent.offsetHeight-f.offsetHeight;f.removeChild(hs.clearing);var e=hs.safari||navigator.vendor=="KDE"?1:0;hs.setStyles(f,{width:(this.x.span-d-e)+"px",height:(this.y.span-b)+"px",overflow:"auto",position:"relative"});if(e&&c.offsetHeight>f.offsetHeight){f.style.width=(parseInt(f.style.width)+e)+"px"}this.scrollingContent=f;this.scrollerDiv=this.scrollingContent}if(this.iframe&&this.objectLoadTime=="before"){this.correctIframeSize()}if(!this.scrollingContent&&this.y.span<this.mediumContent.offsetHeight){this.scrollerDiv=this.content}if(this.scrollerDiv==this.content&&!this.allowWidthReduction&&this.objectType!="iframe"){this.x.span+=17}if(this.scrollerDiv&&this.scrollerDiv.offsetHeight>this.scrollerDiv.parentNode.offsetHeight){setTimeout("try { hs.expanders["+this.key+"].scrollerDiv.style.overflow = 'auto'; } catch(e) {}",hs.expandDuration)}};HsExpander.prototype.htmlSetSize=function(d,f,b,l,k,c){try{hs.setStyles(this.wrapper,{visibility:"visible",left:b+"px",top:l+"px"});hs.setStyles(this.content,{width:d+"px",height:f+"px"});hs.setStyles(this.mediumContent,{left:(this.x.min-b)+"px",top:(this.y.min-l)+"px"});this.innerContent.style.visibility="visible";if(this.objOutline&&this.outlineWhileAnimating){var j=this.objOutline.offset-k;this.positionOutline(b+j,l+j,d-2*j,f-2*j,1)}}catch(g){window.location.href=hs.getSrc(this.a)}};HsExpander.prototype.reflow=function(){hs.setStyles(this.scrollerDiv,{height:"auto",width:"auto"});this.x.span=this.innerContent.offsetWidth;this.y.span=this.innerContent.offsetHeight;var b={width:this.x.span+"px",height:this.y.span+"px"};hs.setStyles(this.content,b);this.positionOutline(this.x.min,this.y.min,this.x.span,this.y.span)};HsExpander.prototype.htmlOnClose=function(){if(this.objectLoadTime=="after"&&!this.preserveContent){this.destroyObject()}if(this.scrollerDiv&&this.scrollerDiv!=this.scrollingContent){this.scrollerDiv.style.overflow="hidden"}if(this.swfObject){hs.$(this.swfObject.getAttribute("id")).StopPlay()}};HsExpander.prototype.destroyObject=function(){this.objContainer.innerHTML=""};HsExpander.prototype.sleep=function(){if(this.objOutline){this.objOutline.table.className="highslide-display-none"}this.wrapper.className+=" highslide-display-none";hs.setId(this.content,"-hsSleeping"+this.key);hs.push(hs.sleeping,this)};HsExpander.prototype.awake=function(){hs.expanders[this.key]=this;this.wrapper.className=this.wrapper.className.replace(/highslide-display-none/,"");var b=hs.zIndexCounter++;this.wrapper.style.zIndex=b;if(o=this.objOutline){if(!this.outlineWhileAnimating){o.table.style.visibility="hidden"}o.table.className=null;o.table.style.zIndex=b}hs.setId(this.content,"-hsSleeping"+this.key,1);this.show()};HsAjax=function(b,c){this.a=b;this.content=c};HsAjax.prototype.run=function(){try{this.xmlHttp=new XMLHttpRequest()}catch(c){try{this.xmlHttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){this.onError()}}}this.src=hs.getSrc(this.a);if(this.src.match("#")){var b=this.src.split("#");this.src=b[0];this.id=b[1]}var d=this;this.xmlHttp.onreadystatechange=function(){if(d.xmlHttp.readyState==4){if(d.id){d.getElementContent()}else{d.loadHTML()}}};this.xmlHttp.open("GET",this.src,true);this.xmlHttp.send(null)};HsAjax.prototype.getElementContent=function(){hs.genContainer();var c=window.opera?{src:this.src}:null;this.iframe=hs.createElement("iframe",c,{position:"absolute",left:"-9999px"},hs.container);try{this.loadHTML()}catch(b){var d=this;setTimeout(function(){d.loadHTML()},1)}};HsAjax.prototype.loadHTML=function(){var b=this.xmlHttp.responseText;if(!hs.ie||hs.ieVersion()>=5.5){b=b.replace(/\s/g," ");if(this.iframe){b=b.replace(new RegExp("<link[^>]*>","gi"),"");b=b.replace(new RegExp("<script[^>]*>.*?<\/script>","gi"),"");var d=this.iframe.contentDocument||this.iframe.contentWindow.document;d.open();d.write(b);d.close();try{b=d.getElementById(this.id).innerHTML}catch(c){}hs.container.removeChild(this.iframe)}else{b=b.replace(new RegExp("^.*?<body[^>]*>(.*?)</body>.*?$","i"),"$1")}}hs.identifyContainer(this.content,"highslide-body").innerHTML=b;this.onLoad()};hs.addEventListener(window,"load",hs.preloadAjax);var Facebook_Helper=function(){return{initialized:false,debug:false,connected_uid:null,connected:false,log:function(b){if(this.debug&&window.console){window.console.log(b)}},is_stage_server:function(){result=location.host.indexOf("octosquid");return(result>-1)},init:function(){if(this.is_stage_server()){FB.init("318fb8246d316616a7e69a9741215351","http://octosquid.squidoo.com:2000/utility/fb_connect/xd_receiver",{ifUserConnected:function(b){Facebook_Helper.log("connected: "+b);Facebook_Helper.connected_uid=b;Facebook_Helper.connected=true},ifUserNotConnected:function(b){Facebook_Helper.log("not connected: "+b);Facebook_Helper.connected_uid=b;Facebook_Helper.connected=false}})}else{FB.init("48c46e721c077b2f4713c5b8a68972df","http://www.squidoo.com/utility/fb_connect/xd_receiver",{ifUserConnected:function(b){Facebook_Helper.log("connected: "+b);Facebook_Helper.connected_uid=b;Facebook_Helper.connected=true},ifUserNotConnected:function(b){Facebook_Helper.log("not connected: "+b);Facebook_Helper.connected_uid=b;Facebook_Helper.connected=false}})}this.initialized=true},safe_call:function(b){if(!this.initialized){this.init()}if(b){return FB.ensureInit(b)}return null},stream_publish:function(b,g,c,h){var d=null;try{d=this.safe_call(function(){FB.Connect.streamPublish(b,g,c,null,h,function(j,e){Facebook_Helper.log(j);Facebook_Helper.log(e)})})}catch(f){}return d},get_uid:function(){var c=null;try{this.safe_call(function(){c=FB.Facebook.apiClient.get_session()?FB.Facebook.apiClient.get_session().uid:null})}catch(b){this.log("exception in Facebook_Helper::get_uid: "+b.description)}return c},get_status:function(){try{this.safe_call(function(){FB.Connect.get_status().waitUntilReady(function(c){Facebook_Helper.log("get_status: "+c);result=c})})}catch(b){this.log("exception in Facebook_Helper::get_status: ".ex.description)}return result},connect:function(e,d){try{var c=this.get_status();if(c==FB.ConnectState.connected){if(e){e()}}else{this.safe_call(function(){Facebook_Helper.log("requireSession");FB.Connect.requireSession(function(){if(e){Facebook_Helper.log("success connect");e()}},function(){if(d){Facebook_Helper.log("fail connect");d()}})})}}catch(b){this.log("exception in Facebook_Helper::connect: "+b.description)}},logout:function(b){try{this.safe_call(function(){FB.Connect.logout(b)})}catch(c){this.log("exception in Facebook_Helper::logout: ".ex.description)}},dummy:function(){}}}();var Twitter_Helper=function(){return{cb:null,debug:false,log:function(b){if(this.debug&&window.console){console.log(b)}},track_event:function(c){var b="url="+escape("http://twitter.com/"+c)+"&lens_id="+theLensId;new Ajax.Request("/utility/track_click",{asynchronous:true,method:"post",postBody:b})},popup:function(c,b,e,f,j){var h=(screen.width-e)/2;var g=(screen.height-f)/2;if(j){var d="url="+escape(c)+"&lens_id="+theLensId;new Ajax.Request("/utility/track_click",{asynchronous:true,method:"post",postBody:d})}window.open(c,b,"status=0,location=0,toolbar=0,resizable=1,scrollbars=1,height="+f.toString()+",width="+e.toString()+",left="+h.toString()+",top="+g.toString())},tweet:function(c){var b="http://twitter.com/home?status="+c;this.track_event("tweet");this.popup(b,"twitter",780,480,false)},retweet:function(b,e,d){var c="http://twitter.com/home?status=RT+%40"+b+"%3A+"+e.replace(/#/gi,"%23")+"+"+d;this.track_event("retweet");this.popup(c,"twitter",780,480,false)},reply:function(b,d){var c="http://twitter.com/home?status=%40"+b+"%3A++"+d;this.track_event("reply");this.popup(c,"twitter",780,480,false)},finalize:function(c,d,b){new Ajax.Request("/utility/twitter_list_item_finalize",{postBody:"id="+c+"&lmi="+d,method:"post",asynchronous:true,onSuccess:function(e){var f=e.responseText;if(f=="ok"){if(b){b(true)}}else{if(b){b(false)}}}})},post:function(c,e,b){var d=110;if(c.length>d){alert("The message you entered is too long. Please limit to "+d.toString()+" characters.")}else{if(c.length==0){alert("You must enter a message.")}else{new Ajax.Request("/utility/twitter_list_post",{postBody:"msg="+c+"&lmi="+e,method:"post",asynchronous:true,onSuccess:function(f){var g=f.responseText.split("|");if(g[0]=="ok"){if(b){b(true)}}else{Twitter_Helper.do_oauth(function(){Twitter_Helper.finalize(g[1],e,b)})}}})}}},do_oauth:function(f){var c=380;var b=780;var e=(screen.width-b)/2;var d=(screen.height-c)/2;this.cb=f;window.open("/utility/twitter_oauth","twitter_oauth","status=0,location=0,toolbar=0,resizable=0,scrollbars=0,height="+c.toString()+",width="+b.toString()+",left="+e.toString()+",top="+d.toString())},search:function(d,b,e){var c="";for(var f in d){c+=f+"="+d[f]+"&"}new Ajax.Request("/utility/twitter_search",{postBody:c,method:"post",asynchronous:true,onSuccess:function(g){if(b){if(e){b(g,e)}else{b(g)}}}})},add_search_item:function(h,g,e,f,d,b){var c="";c="id="+h+"&lmi="+g+"&tweet="+e+"&tweet_time="+f+"&tweet_user="+d;new Ajax.Request("/utility/twitter_add_list_item",{postBody:c,method:"post",asynchronous:true,onSuccess:function(j){if(b){b()}}})},delete_list_item:function(e,d,b){var c;c="id="+e+"&lmi="+d;new Ajax.Request("/utility/twitter_del_list_item",{postBody:c,method:"post",asynchronous:true,onSuccess:function(f){if(b){b()}}})},promote_user_item:function(d,c){var b;b="id="+d+"&lmi="+c;new Ajax.Request("/utility/twitter_promote_list_item",{postBody:b,method:"post",asynchronous:true,onSuccess:function(e){}})},get_screen_name:function(b){new Ajax.Request("/utility/twitter_get_current_screen_name",{postBody:"",method:"post",asynchronous:true,onSuccess:function(c){if(b){b(c.responseText)}}})},_callback:function(){this.log("Twitter_OAuth._callback()");if(this.cb){this.cb()}}}}();var SquidooComments=function(){return{show_on_close_el:null,current_form:null,initial_type:"visitor",fb_available:false,log:function(b){if(window&&window.console){}},setFocus:function(b){var c=b.parents("li:eq(0)");if(c.length==0){c=b.parents("div.module:eq(0)");if(c.length==0){return}}var d=c.offset();var e=d.top-0;b.focus();jQuery("html,body").animate({scrollTop:e},250)},display_tabs:function(g){var e=jQuery("li.gb_li_visitor",this.current_form);var f=jQuery("li.gb_li_squidoo",this.current_form);var d=jQuery("li.gb_li_facebook",this.current_form);var c=jQuery("li.gb_li_twitter",this.current_form);var b=jQuery("div.gb_email_check",this.current_form);if(g.visitor){e.show()}else{e.hide()}if(g.squidoo){f.show()}else{f.hide()}if(g.facebook){d.show()}else{d.hide()}if(g.twitter){c.show()}else{c.hide()}if(g.email_notify){b.show()}else{b.hide()}},new_form:function(g,b,d,f){if(this.current_form){this.close()}var e=jQuery("#primary_comment_input").clone().removeAttr("id").appendTo(b);jQuery("input[name='comment_lmi']",e).val(g);var c=jQuery("textarea",e);if(c){setTimeout(function(){SquidooComments.setFocus(c)},100)}e.show();this.switch_type(this.initial_type);this.show_on_close_el=d;this.current_form=e;this.display_tabs(f)},reply_form:function(e,c,b,d){pageTracker._trackEvent("Guestbook","Reply");this.new_form(e,b,null,d);jQuery("input[name='comment_parent_id']",this.current_form).val(c)},close:function(){if(this.current_form){this.current_form.parent().empty();this.current_form=null;if(this.show_on_close_el){this.show_on_close_el.show();this.show_on_close_el=null}}},save:function(){var d=true;this.hide_error();var c=jQuery.trim(jQuery("textarea",this.current_form).val());if(c==""){d=false;message="Your comment cannot be blank. Please enter a comment and try again."}if(d){var b=jQuery("form",this.current_form);var e=b.serialize();pageTracker._trackEvent("Guestbook","Submit");jQuery.post("/utility/post_blurb",e,function(f){SquidooComments.post_save(f)})}else{this.show_error(message)}return false},show_error:function(b){jQuery("#comment_error_message",this.current_form).html(b).show();setTimeout(function(){SquidooComments.hide_error()},5000)},hide_error:function(){this.log("here");jQuery("#comment_error_message",this.current_form).fadeOut(2500)},load_more:function(f,h,c,d,g,b){var e={lmi:h,per_page:c,page:d,show_photos:g?"true":"false",strip_html:b?"true":"false"};pageTracker._trackEvent("Guestbook","LoadMore");jQuery.post("/utility/more_blurbs",e,function(j){if(j!="error"){jQuery(f).parent().replaceWith(j)}})},cancel:function(){pageTracker._trackEvent("Guestbook","Cancel");this.close()},switch_fb:function(){this.log("switch_fb");Facebook_Helper.connect(function(){SquidooComments.fb_available=true;SquidooComments.switch_type("facebook")},function(){SquidooComments.switch_type(SquidooComments.initial_type)})},switch_type:function(c){var b=false;if(c=="facebook"){if(!this.fb_available){return this.switch_fb()}}jQuery("ul.gb_select li",this.current_form).removeClass("gb_selected");jQuery("ul.gb_select li.gb_li_"+c,this.current_form).addClass("gb_selected");jQuery("div.gb_type_elements div",this.current_form).hide();jQuery("div.gb_type_elements div.gb_elements_"+c,this.current_form).show();jQuery("input[name='comment_type']",this.current_form).val(c);jQuery("#gb_type_"+c).attr("checked","checked");if((c=="facebook")||(c=="twitter")){jQuery("div.captcha_wrap",this.current_form).hide()}else{jQuery("div.captcha_wrap",this.current_form).show()}this.initial_type=c;return true},set_initial_type:function(b){this.initial_type=b},set_fb_available:function(b){this.fb_available=b},post_save:function(d){var c;var b=JSON.parse(d);if(this.current_form){c=this.current_form.parent()}if(b.status=="success"){if(b.post_type=="facebook"){if(b.fb_data){var f=b.fb_data;var e=null;if(f.lens_image!=""){e=[{type:"image",href:f.module_url,src:f.lens_image}]}Facebook_Helper.stream_publish(f.comment_body,{name:f.module_title,href:f.module_url,caption:"{*actor*} just commented on "+f.module_title,description:f.module_abstract,comments_xid:f.module_url,media:e},[{text:"Join Discussion",href:f.module_url},{text:"View Lens",href:f.lens_url}],"Invite your friends to join the discussion:")}}this.close();var g=jQuery('<div class="gb_notice">'+b.message+"</div>");c.append(g);setTimeout(function(){g.hide()},5000)}else{this.show_error(b.message)}},xableFollowerEmail:function(b){var d=b.attr("checked");var c=jQuery("div.gb_follower_email_div",this.current_form);if(d){c.show()}else{c.hide()}},dummy:function(){}}}();if(!this.JSON){this.JSON={}}(function(){function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==="string"){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}}());