
function formSubmit(c,b){if(b){for(var a in b){if(b[a]!=null){document.getElementById(a).value=b[a]}}}frm=document.getElementById(c);frm.submit()}function InPlaceEdit_Show(o,l,d,a,g){if(a==null){return}var q="hid_txt_"+a;if(document.getElementById(q)){return}var h=document.getElementById(o);if(h==null){return}var p=h.innerHTML;var n=p;var f=document.getElementById(g);if(f!=null){n=f.innerHTML}var e="";var c=document.getElementById(l);if(c!=null){e=c.innerHTML}if(d!=null){d["#the content#"]=n;for(var b in d){var m=d[b];if(m!=null){e=e.replace(new RegExp(b,"g"),m)}}}e=e.concat('<input type="hidden" id="'+q+'" value="'+escape(p)+'" />');e=e.concat('<input type="hidden" id="hid_inplaceid_'+a+'" value="'+o+'" />');h.innerHTML=e;return}function InPlaceEdit_Cancel(d){if(d==null){return}var a=document.getElementById("hid_txt_"+d);if(a==null){return}var b=document.getElementById("hid_inplaceid_"+d);if(b==null){return}var c=document.getElementById(b.value);if(c==null){return}c.innerHTML=unescape(a.value)}function showElement(c,a){var b=document.getElementById(c);if(a==null){a="block"}b.style.display=a}function showElementInline(c,a){var b=document.getElementById(c);if(a==null){a="inline"}b.style.display=a}function hideElement(b){var a=document.getElementById(b);a.style.display="none"}function clearInput(b){var a=document.getElementById(b);a.value=""}function setInput(c,b){var a=document.getElementById(c);a.value=b}function setInputFocus(b){var a=document.getElementById(b);a.focus()}function addEvtListener(obj,evt,fn,cap){if(obj.addEventListener){obj.addEventListener(evt,fn,cap)}else{if(obj.attachEvent){obj.attachEvent("on"+evt,fn)}else{eval("obj.on"+evt+"="+fn)}}}function trim(a){return a.replace(/^\s*|\s*$/g,"")}function loadPage(a){window.location.href=a}var pubPriHelpWin;function showPubPriHelp(b){try{pubPriHelpWin.focus()}catch(a){pubPriHelpWin=window.open(b,"","top=100,left=200,height=300,width=500,fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")}}function pubPriHelpWinClosed(){pubPriHelpWin=null}var itemVotingHelpWin;function showItemVotingHelp(){try{itemVotingHelpWin.focus()}catch(a){itemVotingHelpWin=window.open("/ht/html/itemVotingHelp.html","","top=100,left=200,height=300,width=500,fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")}}function itemVotingHelpWinClosed(){itemVotingHelpWin=null}var pagePurposeHelpWin;function pagePurposeHelpWinClosed(){pagePurposeHelpWin=null}var htmlTagsHelpWin;function showHtmlTagsHelp(){try{htmlTagsHelpWin.focus()}catch(a){htmlTagsHelpWin=window.open("/ht/html/htmlTagSupportGuide.html","","top=100,left=200,height=500,width=500,fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0")}}function htmlTagsHelpWinClosed(){htmlTagsHelpWin=null}function scale_to_fit(b,a){var c=a*1;if(b.classname=="processed"){return}if(b.height>b.width&&b.height>c){b.width=parseInt(b.width*c/b.height);b.classname="processed"}else{if(b.width>=b.height&&b.width>c){b.width=c;b.classname="processed"}else{}}b.style.visibility="visible"}function onLoadForScaling(c,a){var b=document.getElementById(c);if(b==null){return}if(b.height==0&&b.width==0){setTimeout("scale_to_fit(document.getElementById('"+c+"'), "+a+")",500)}else{scale_to_fit(document.getElementById(c),a)}}function findPosX(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b}function findPosY(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}var _correctPng=true;function correctPNG(){if(navigator.appVersion.indexOf("MSIE")>=0&&_correctPng){var f=navigator.appVersion.split("MSIE");var g=parseFloat(f[1]);if((g>=5.5&&g<7)&&(document.body.filters)){for(var c=0;c<document.images.length;c++){var d=document.images[c];var l=d.src.toUpperCase();if(l.substring(l.length-3,l.length)=="PNG"){var e=(d.id)?"id='"+d.id+"' ":"";var m=(d.className)?"class='"+d.className+"' ":"";var b=(d.title)?"title='"+d.title+"' ":"title='"+d.alt+"' ";var h="display:inline-block;"+d.style.cssText;if(d.align=="left"){h="float:left;"+h}if(d.align=="right"){h="float:right;"+h}if(d.parentElement.href){h="cursor:hand;"+h}var a="<span "+e+m+b+' style="width:'+d.width+"px; height:"+d.height+"px;"+h+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+d.src+"', sizingMethod='scale');\"></span>";d.outerHTML=a;c=c-1}}}}}function URLEncode(e){var g="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_.!~*'()";var b="0123456789ABCDEF";var f="";for(var c=0;c<e.length;c++){var d=e.charAt(c);if(d==" "){f+="+"}else{if(g.indexOf(d)!=-1){f+=d}else{var a=d.charCodeAt(0);if(a>255){alert("Unicode Character '"+d+"' cannot be encoded using standard URL encoding.\n(URL encoding only supports 8-bit characters.)\nA space (+) will be substituted.");f+="+"}else{f+="%";f+=b.charAt((a>>4)&15);f+=b.charAt(a&15)}}}}return f}function URLDecode(){var a="0123456789ABCDEFabcdef";var e=document.URLForm.F2.value;var d="";var b=0;while(b<e.length){var c=e.charAt(b);if(c=="+"){d+=" ";b++}else{if(c=="%"){if(b<(e.length-2)&&a.indexOf(e.charAt(b+1))!=-1&&a.indexOf(e.charAt(b+2))!=-1){d+=unescape(e.substr(b,3));b+=3}else{alert("Bad escape combination near ..."+e.substr(b));d+="%[ERROR]";b++}}else{d+=c;b++}}}document.URLForm.F1.value=d;return false}function stripTags(a){return a.replace(/<\/?[^>]+>/gi,"")}function escapeHTML(a){var c=document.createElement("div");var b=document.createTextNode(a);c.appendChild(b);return c.innerHTML}function unescapeHTML(b){var a=document.createElement("div");a.innerHTML=stripTags(b);return a.childNodes[0].nodeValue}addEvtListener(window,"load",correctPNG,false);function limitCharacters(c,b){var a=c.value.length;if(a>b){c.value=c.value.substring(0,b)}}function isI18N(b){if(b==null){return false}for(var a=0;a<b.length;a++){if(b.charCodeAt(a)>255){return true}}return false}function addBookmark(a,b){if(window.sidebar){window.sidebar.addPanel(b,a,"")}else{if(document.all){window.external.AddFavorite(a,b)}else{alert("Sorry, your browser doesn't support bookmarks")}}}function validateImageFile(a,b,n,e,h){if(typeof b=="undefined"){b=true}if(typeof h=="undefined"){h="Invalid image. Please upload a file ending with JPG, JPEG, GIF, or PNG."}var m=document.getElementById(a).value;if(m==""){if(b){document.getElementById(e).innerHTML=h;setInputFocus(a)}return(!b)}var f=true;if(navigator.appVersion.indexOf("MSIE")>=0){var g=navigator.appVersion.split("MSIE");var l=parseFloat(g[1]);if(l<7){f=(m.indexOf(":")==1)}}if(!f){document.getElementById(e).innerHTML="Please specify a valid path";setInputFocus(a);return false}if(!(m=="")&&f){var c=m;var o=c.lastIndexOf(".");if(o!=-1){c=c.substr(o+1).toLowerCase()}else{c=""}if((c=="jpeg")||(c=="jpg")||(c=="gif")||(c=="png")){if(typeof n!="undefined"&&n!=null){var d=document.getElementById(n);d.value=m}if(typeof e!="undefined"&&e!=null){document.getElementById(e).innerHTML=""}return true}if(typeof e!="undefined"&&e!=null){document.getElementById(e).innerHTML=h}setInputFocus(a);return false}}function showUserPagesCall(d,c){var b=document.getElementById("myPagesLink");var a=document.getElementById("myPagesDefContainer").innerHTML;showPopupAboveRight(b,300,160,a,true,-35,158,"popUpMyPagesDiv","popUpMyPagesContent");formSubmitAJAX("/za/userPages",null,"showUserPagesCallback")}function showUserPagesCallback(f,d){if(f.firstChild){var c="";for(var e=0;e<f.childNodes.length;e++){c+=f.childNodes[e].nodeValue}var b=document.getElementById("myPagesLink");var a=showAndReturnPopupAboveRight(b,320,400,c,true,-60,374,"popUpMyPagesDiv","popUpMyPagesContent");onMouseMovedPopup(a.popupIndex)}}function getHTTPRequestObject(){var xmlHttpRequest;
/*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (exception1) {
      try {
        xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (exception2) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttpRequest = false;
  @end @*/
if(!xmlHttpRequest&&typeof XMLHttpRequest!="undefined"){try{xmlHttpRequest=new XMLHttpRequest()}catch(exception){xmlHttpRequest=false}}return xmlHttpRequest}var requestsArray=new Array();var MAX_REQUEST_SIZE=5;function processResponse(index){var request=requestsArray[index];if(request.httpRequester.readyState==4){if(request.httpRequester.status==200){try{request.complete=true;var xmlResponse=request.httpRequester.responseXML;var resultStatus=xmlResponse.getElementsByTagName("result")[0].firstChild.nodeValue;if(resultStatus==0){var results=xmlResponse.getElementsByTagName("results")[0];eval(request.callbackMethod)(results,request.callbackParams);try{var trackNodes=xmlResponse.getElementsByTagName("track");if(trackNodes!=null&&trackNodes.length>0){var track=trackNodes[0].firstChild.nodeValue;if(typeof popv!="undefined"&&track!=null&&track.length>0){setTimeout("popv(eval("+track+"))",5)}}var operation=xmlResponse.getElementsByTagName("operation")[0].firstChild.nodeValue;if(typeof tcLink!="undefined"&&operation!=null&&operation!=""){setTimeout("tcLink(true,'"+operation+"')",5)}}catch(trackError){}}else{if(resultStatus==3){if(!request.ignoreError){document.location.href="/za/activity-limited"}else{eval(request.callbackMethod)(null,request.callbackParams)}}else{if(resultStatus==2){if(!request.ignoreError){alert("Oops!  You need to be logged in to do this. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}else{if(!request.ignoreError){alert("Oops! Something went wrong. Error code: CL-1. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}}}}catch(error){if(!request.ignoreError){alert("Oops! Something went wrong. Error code: CL-2. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}}else{if(request.httpRequester.status!=0){if(!request.ignoreError){alert("Oops! Something went wrong. Error code: CL-3. The page will refresh after you click ok");document.location.reload()}else{eval(request.callbackMethod)(null,request.callbackParams)}}}}}function initialize(b){var c=requestsArray[b];if(c.varMap){for(var a in c.varMap){if(c.varMap[a]!=null){if(c.postValueStr==""){c.postValueStr=a+"="+encodeURIComponent(c.varMap[a])}else{c.postValueStr+="&"+a+"="+encodeURIComponent(c.varMap[a])}}}}}function initializeForm(a){var d=requestsArray[a];if(d.formid){var c=document.getElementById(d.formid);for(var b=0;b<c.elements.length;b++){if(d.postValueStr==""){d.postValueStr=c.elements[b].name+"="+encodeURIComponent(c.elements[b].value)}else{d.postValueStr+="&"+c.elements[b].name+"="+encodeURIComponent(c.elements[b].value)}}}}function makeServerCall(a,c){var b=requestsArray[a];if(!c){c="POST"}b.httpRequester.open(c,b.url,b.asyncCall);b.httpRequester.setRequestHeader("Content-Type","application/x-www-form-urlencoded");if(b.asyncCall){b.httpRequester.onreadystatechange=new Function("","processResponse("+b.index+");")}b.httpRequester.send(b.postValueStr);if(!b.asyncCall){processResponse(b.index)}}function initRequestObject(f,e,b){var d=null;var c=false;for(var a=0;a<requestsArray.length;a++){if(requestsArray[a].complete==true){d=requestsArray[a];c=true;break}}if(!c){if(requestsArray.length==MAX_REQUEST_SIZE&&b==false){alert("Oops! Something went wrong. Error code: CL04.");return}d=new Object();d.httpRequester=getHTTPRequestObject();d.index=requestsArray.length;requestsArray[d.index]=d}d.complete=false;return d}function abortAJAXCalls(){for(var a=0;a<requestsArray.length;a++){if(requestsArray[a].httpRequester&&!requestsArray[a].complete){requestsArray[a].httpRequester.abort();requestsArray[a].httpRequester.send(null)}}}function htmlFormSubmitAJAX(b,d,c,a,e){request=initRequestObject();request.url=b;request.formid=d;request.callbackMethod=c;request.callbackParams=a;request.postValueStr="";request.ignoreError=(typeof ignoreError=="undefined"||ignoreError==null)?false:ignoreError;request.asyncCall=(typeof asyncCall=="undefined"||ignoreError==null)?true:asyncCall;initializeForm(request.index);makeServerCall(request.index,e)}function formSubmitAJAX(b,f,d,a,g,e,c,h){request=initRequestObject(g,e,c);request.url=b;request.varMap=f;request.callbackMethod=d;request.callbackParams=a;request.postValueStr="";request.ignoreError=(typeof g=="undefined"||g==null)?false:g;request.asyncCall=(typeof e=="undefined"||g==null)?true:e;initialize(request.index);makeServerCall(request.index,h)}var popupArray=new Array();function KaboodlePopup(l,c,n,e,b,h,o,d,m,a,g){this.srcEle=l;if(!a){this.xPosition=calcXCoordinates(l,c,b,m);this.yPosition=calcYCoordinates(l,n,h)}this.width=c;this.height=n;this.nonsticky=e;this.popUpDivId=o;this.popUpContentId=d;this.blanktimeout=0;this.popupIndex=-1;this.center=a;this.mouseOutTime=g;for(var f=0;f<popupArray.length;f++){if(popupArray[f].popUpDivId==o){this.popupIndex=f;break}}if(this.popupIndex==-1){this.popupIndex=popupArray.length;popupArray[popupArray.length]=this}this.populateHtml=function(p){document.getElementById(this.popUpContentId).innerHTML=p};this.showPopup=function(){hideElement(this.popUpDivId);var s=document.getElementById(this.popUpDivId);if(this.nonsticky){s.onmouseout=new Function("","onMouseOutPopup("+this.popupIndex+");");s.onmousemove=new Function("","onMouseMovedPopup("+this.popupIndex+");");this.srcEle.onmouseout=new Function("","onMouseOutPopup("+this.popupIndex+");");this.srcEle.onmousemove=new Function("","onMouseMovedPopup("+this.popupIndex+");")}else{s.onmouseout="";s.onmousemove=""}if(this.center){var r;var q;if(navigator.appVersion.indexOf("MSIE")>=0){if(typeof document.documentElement!="undefined"&&typeof document.documentElement.clientWidth!="undefined"&&document.documentElement.clientWidth!=0){r=parseInt(document.documentElement.clientWidth);q=parseInt(document.documentElement.clientHeight)}else{r=parseInt(document.getElementsByTagName("body")[0].clientWidth);q=parseInt(document.getElementsByTagName("body")[0].clientHeight)}q=(q-h)/2}else{r=parseInt(window.innerWidth);q=(parseInt(window.innerHeight)-h)/2}if(r<940){r=180}else{r=(r-b)/2}s.style.position="absolute";s.style.left=r+"px";if(navigator.userAgent.indexOf("Safari")>=0){s.style.top=(q+parseInt(document.body.scrollTop))+"px"}else{s.style.top=(q+parseInt(document.documentElement.scrollTop))+"px"}}else{var p=document.getElementById(this.popUpContentId);if(this.height>0){p.style.height=this.height+"px"}if(this.width>0){p.style.width=this.width+"px";s.style.width=(this.width+9)+"px"}s.style.position="absolute";if(this.yPosition){s.style.top=(this.yPosition)+"px"}if(this.xPosition){s.style.left=(this.xPosition)+"px"}}s.style.display="block"};this.closePopup=function(){hideElement(this.popUpDivId)}}function onMouseMovedPopup(b){var a=popupArray[b];clearTimeout(a.blanktimeout)}function onMouseOutPopup(b){var a=popupArray[b];if(a.mouseOutTime==undefined){a.blanktimeout=setTimeout("hideElement('"+a.popUpDivId+"')",500)}else{a.blanktimeout=setTimeout("hideElement('"+a.popUpDivId+"')",a.mouseOutTime)}a.srcEle.onmouseout="";a.srcEle.onmousemove=""}function calcXCoordinates(c,e,d,b){var a=findPosX(c);if(!b){a+=c.offsetWidth}if(typeof d!="undefined"){a+=d}if(a<0){a=0}return a}function calcYCoordinates(b,a,c){var d;if(a>0){d=findPosY(b)+b.offsetHeight-a}else{d=findPosY(b)+b.offsetHeight}if(typeof c!="undefined"){d+=c}if(d<0){d=0}return d}function showPopupAboveRight(g,c,h,e,d,a,f,l,b){showAndReturnPopupAboveRight(g,c,h,e,d,a,f,l,b)}function showAndReturnPopupAboveRight(l,d,n,f,e,b,h,o,c,a,g){if(typeof o=="undefined"||o==null){o="popUpDiv"}if(typeof c=="undefined"||c==null){c="popUpContent"}hideSelectBoxes();var m=new KaboodlePopup(l,d,n,e,b,h,o,c,false,a,g);m.populateHtml(f);m.showPopup();return m}function showAndReturnPopupAboveLeft(h,c,m,e,d,a,g,n,b,f){if(typeof n=="undefined"||n==null){n="popUpDiv"}if(typeof b=="undefined"||b==null){b="popUpContent"}hideSelectBoxes();var l=new KaboodlePopup(h,c,m,d,a,g,n,b,true,false,f);l.populateHtml(e);l.showPopup();return l}function hideSelectBoxes(){if(navigator.appVersion.indexOf("MSIE")>=0){var d=navigator.appVersion.split("MSIE");var a=parseFloat(d[1]);if(a<7&&document.body.filters){var c=document.getElementsByTagName("SELECT");if(c!=null){for(var b=0;b<c.length;b++){if(c[b]!=null){c[b].style.display="none"}}}}}}function showSelectBoxes(){if(navigator.appVersion.indexOf("MSIE")>=0){var c=navigator.appVersion.split("MSIE");var a=parseFloat(c[1]);if(a<7&&document.body.filters){var b=document.getElementsByTagName("SELECT");if(b!=null){for(k=0;k<b.length;k++){b[k].style.display="block"}}}}}function hidePopupAndShow(b){if(navigator.appVersion.indexOf("MSIE")>=0){var d=navigator.appVersion.split("MSIE");var a=parseFloat(d[1]);if(a<7&&document.body.filters){for(i=0;i<document.forms.length;i++){for(j=0;j<document.forms[i].elements.length;j++){if(document.forms[i].elements[j].options!=null){var c=document.forms[i].elements[j].className;document.forms[i].elements[j].className=c.replace("hidePopup","")}}}}}showSelectBoxes();hideElement(b)}function searchTopNav(b,c){if(!b&&trim(document.getElementById("searchBox").value)==""){alert("Please enter your search query in the search box");return}var a=document.getElementById("searchBox").value;if(a=="Search for Sales"||a=="Search for Products"||a=="Search for Lists"||a=="Search for Styleboards"||a=="Search for People"||a=="Search for Stores"){alert("Please enter your search query in the search box");return}document.getElementById("searchBox").style.fontStyle="normal";if(document.getElementById("section")){document.getElementById("section").value=""}if(document.getElementById("st").value=="group"){document.getElementById("search").action="/groups";document.getElementById("search").submit()}else{if(c&&document.getElementById("st").value=="collage"){document.getElementById("search").action="/styleboards";document.getElementById("search").submit()}else{document.getElementById("search").submit()}}}function callOnEnterKey(event,callBack){if(event.keyCode==13){eval(callBack)}}function getCookie_c(c){var b=document.cookie;var e=c+"=";var d=b.indexOf("; "+e);if(d==-1){d=b.indexOf(e);if(d!=0){return null}}else{d+=2}var a=document.cookie.indexOf(";",d);if(a==-1){a=b.length}return unescape(b.substring(d+e.length,a))}function setCookie_c(b,d,a,f,c,e){document.cookie=b+"="+escape(d)+((a)?"; expires="+a.toGMTString():"")+((f)?"; path="+f:"")+((c)?"; domain="+c:"")+((e)?"; secure":"")}function deleteCookie_c(a,c,b){if(getCookie_c(a)){document.cookie=a+"="+((c)?"; path="+c:"")+((b)?"; domain="+b:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}}function checkIfBrowserSupportCookies(){if(document.cookie!=null&&document.cookie!=""){return true}else{setCookie_c("hp","0");if(getCookie_c("hp")){deleteCookie_c("hp");return true}else{return false}}}function clearActionText(){if(document.getElementById("actionDivId")){document.getElementById("actionDivId").style.display="none"}}function generateAJAXResponseHTML(b){var a="";for(var c=0;c<b.length;c++){a+=b[c].nodeValue}return a}var inlineEditTimers=new Array();function editTextMouseOver(a){clearTimeout(inlineEditTimers[a]);document.getElementById("editMOSection_"+a).className="inline-edit-mo"}function editTextMouseOut(a){inlineEditTimers[a]=setTimeout("editTextMouseOutTimerFunc('"+a+"')",500)}function editTextMouseOutTimerFunc(a){document.getElementById("editMOSection_"+a).className=""}function inlineEditStart(a){document.getElementById("editTextbox_"+a).value=document.getElementById("orignalText_"+a).innerHTML;showElement("editSection_"+a,"inline");hideElement("editText_"+a)}function inlineEditAbort(a){hideElement("editSection_"+a);showElement("editText_"+a,"inline");document.getElementById("editMOSection_"+a).className="";document.getElementById("editError_"+a).innerHTML="";hideElement("editError_"+a)
}function inlineEditSubmit(e,b,d,c){d.inlineEditedText=document.getElementById("editTextbox_"+e).value;var a=new Object();a.uniqueID=e;a.inlineEditedText=d.inlineEditedText;a.callbackMethod=c;formSubmitAJAX(b,d,"inlineEditSubmitCallback",a)}function inlineEditSubmitCallback(results,callbackParams){var validationError=results.getElementsByTagName("validationError");if(validationError.length==0){var inlineEditedNode=results.getElementsByTagName("inlineEditedText")[0];var inlineEditedText="";if(inlineEditedNode.firstChild){inlineEditedText=inlineEditedNode.firstChild.nodeValue}document.getElementById("editText_"+callbackParams.uniqueID).innerHTML=inlineEditedText;document.getElementById("orignalText_"+callbackParams.uniqueID).innerHTML=callbackParams.inlineEditedText;inlineEditAbort(callbackParams.uniqueID);if(callbackParams.callbackMethod!=""){eval(callbackParams.callbackMethod)(inlineEditedText)}}else{document.getElementById("editError_"+callbackParams.uniqueID).innerHTML=validationError[0].firstChild.nodeValue;showElement("editError_"+callbackParams.uniqueID)}}var snTimeout=0;var firstRollover=true;var snArray;function snOver(a){if(firstRollover){snTimeout=setTimeout("showSn('"+a+"')",300);firstRollover=false}else{showSn(a);snTimeout=0}}function snOut(){if(snTimeout!=0){clearTimeout(snTimeout);snTimeout=0;firstRollover=true}}function showProfileLinks(){var a=document.getElementById("my-profile");var c=document.getElementById("popNavDiv");var b=document.getElementById("profile-links").innerHTML;showAndReturnPopupAboveLeft(a,-1,-1,b,true,-18,-7,"popNavDiv","popNavContent",0)}function showSearchLinks(){var a=document.getElementById("searchBox");var d=document.getElementById("popNavDiv");var b=document.getElementById("search-links").innerHTML;var c=33;if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1){c=23}showAndReturnPopupAboveLeft(a,150,0,b,true,c,-4,"popNavDiv","popNavContent",0)}function hideSearchLinks(a){document.getElementById("st").value=a;if(searchTextBlur(true)){searchTopNav(true,false)}document.getElementById("popNavDiv").innerHtml="";hideElement("popNavDiv")}function showSn(c){var a=document.getElementById("n"+c);var d=document.getElementById("popNavDiv");if(document.getElementById("sn"+c)){var b=document.getElementById("sn"+c).innerHTML;showAndReturnPopupAboveLeft(a,-1,-1,b,true,0,-5,"popNavDiv","popNavContent",0)}else{var b='<div class="cb-loading loadingSn"></div>';showAndReturnPopupAboveLeft(a,-1,-1,b,true,0,-5,"popNavDiv","popNavContent",0)}}function fbs_click(a,b){window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(a)+"&t="+encodeURIComponent(b),"sharer","toolbar=0,status=0,width=626,height=436")}function msp_click(c,d,b,a){var e="http://www.myspace.com/Modules/PostTo/Pages/?t="+encodeURIComponent(c)+"&c="+encodeURIComponent(d)+"&u="+encodeURIComponent(b)+"&l="+a;window.open(e)}function twit_click(a,b,c){if(c=="slideshow"){var d="http://twitter.com/home?status="+encodeURIComponent("Check out this rockin' slideshow: ")+encodeURIComponent(b)+encodeURIComponent(" at Kaboodle ")+encodeURIComponent(a)}else{var d="http://twitter.com/home?status="+encodeURIComponent("Check out this rockin' list on Kaboodle: ")+encodeURIComponent(b)+encodeURIComponent(" ")+encodeURIComponent(a)}window.open(d)}function validateFormField(e,a,c){if(e!=null&&trim(e)!=""){var d=new Object();d.fieldValue=e;d.fieldType=a;var b=new Object();b.errorId=c;formSubmitAJAX("/za/validate-field",d,"validateFormFieldCallback",b,true)}}function validateFormFieldCallback(d,b){var a=d.getElementsByTagName("fieldError");try{if(a.length>0){var e=a[0].firstChild.nodeValue;document.getElementById(b.errorId).innerHTML=e;document.getElementById(b.errorId).style.display=""}else{document.getElementById(b.errorId).innerHTML="";document.getElementById(b.errorId).style.display="none"}}catch(c){}}function showNFPopuup(d){var c=document.getElementById("NFPopUp_"+d);var b=document.getElementById("NFImg_"+d);var a=calcXCoordinates(b,0,-130);var e=calcYCoordinates(b,0,10);c.style.position="absolute";c.style.top=e+"px";c.style.left=a+"px";c.style.display=""}function closeNFPopuup(a){hideElement("NFPopUp_"+a)}var userMiniProfilePopup;function showMiniProfilePopup(a,c,b){hideMiniProfilePopup();document.getElementById("umppscreenName").innerHTML=c;document.getElementById("umppuserLists").href="/member/"+c+"/lists";document.getElementById("umppuserFriends").href="/member/"+c+"/friends";document.getElementById("umppuserGroups").href="/member/"+c+"/groups";document.getElementById("umppuserPolls").href="/member/"+c+"/polls";document.getElementById("umppuserPhotos").href="/member/"+c+"/photos";document.getElementById("umppuserBrands").href="/member/"+c+"/stores";document.getElementById("umppuserBlogazine").href="/member/"+c+"/blogs";document.getElementById("umppuserStyleboards").href="/member/"+c+"/styleboards";if(document.getElementById("umppminiPopupAddFriendImg")!=null){document.getElementById("umppminiPopupAddFriendImg").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','addFriend');";document.getElementById("umppminiPopupAddFriendLnk").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','addFriend');";document.getElementById("umppcomposeMessagePopupImg").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','sendMessage');";document.getElementById("umppcomposeMessagePopupLnk").href="javascript:checkForFriendAJAX('"+b+"','"+c+"','sendMessage');"}userMiniProfilePopup=new KaboodlePopup(a,141,220,false,-110,170,"umppuserMiniProfilePopup","umppuserMiniProfilePopup",false,false);userMiniProfilePopup.showPopup()}function hideMiniProfilePopup(){document.getElementById("umppscreenName").innerHTML="#";document.getElementById("umppuserLists").href="#";document.getElementById("umppuserFriends").href="#";document.getElementById("umppuserGroups").href="#";document.getElementById("umppuserPolls").href="#";document.getElementById("umppuserPhotos").href="#";document.getElementById("umppuserBrands").href="#";document.getElementById("umppuserBlogazine").href="#";document.getElementById("umppuserStyleboards").href="#";if(document.getElementById("umppminiPopupAddFriendImg")!=null){document.getElementById("umppminiPopupAddFriendImg").href="#";document.getElementById("umppminiPopupAddFriendLnk").innerHTML="Add as a Friend";document.getElementById("umppcomposeMessagePopupLnk").innerHTML="Send Message";document.getElementById("umppminiPopupAddFriendLnk").href="#";document.getElementById("umppcomposeMessagePopupImg").href="#";document.getElementById("umppcomposeMessagePopupLnk").href="#"}if(userMiniProfilePopup!=null){userMiniProfilePopup.closePopup()}}function checkForFriendAJAX(c,e,b){var d=new Object();d.userUid=c;d.action="userFriendCheck";var a=new Object();a.friendUid=c;a.next=b;a.friendScreenName=e;formSubmitAJAX("/za/userProfile",d,"addFriendMiniProfileCallback",a)}function addFriendMiniProfileCallback(d,c){var a=d.getElementsByTagName("isFriend");if(a.length>0){var b=generateAJAXResponseHTML(a[0].childNodes);if(b=="false"){if(c.next=="addFriend"){var e=new Object();e.friendUid=c.friendUid;e.ajax="true";formSubmitAJAX("/za/inviteInSystemFriend",e,"userFriendCallback")}else{if(c.next=="sendMessage"){document.getElementById("umppcomposeMessagePopupLnk").innerHTML="User is not your friend."}}}else{if(c.next=="addFriend"){document.getElementById("umppminiPopupAddFriendLnk").innerHTML="User is already your friend."}else{if(c.next=="sendMessage"){showComposeMessagePopup(null,null,c.friendScreenName)}}}}}function userFriendCallback(b,a){document.getElementById("umppminiPopupAddFriendLnk").innerHTML="Request Pending"}var sendButtonClicked=false;function showComposeMessagePopup(f,d,e,b,c,l){if(!loggedIn){window.location.href="/za/login?p_ret= "+onMsgPageUrl;return}else{if(emailNotVerified){window.location.href="/za/activity-limited?p_ret= "+onMsgPageUrl;return}}var a=new Object();a.action="getPopupView";a.contentTheme=c;if(l!=null&&typeof l!="undefined"){a.currentUrl=l}if(f!=null&&typeof f!="undefined"){a.replyTo=f.to;a.subject=f.subject;a.retailerName=f.retailerName}populateEntityMapInfo(a,d);if(e!=null&&typeof e!="undefined"){a.toSN=e;a.to=e}if(b!=null&&typeof b!="undefined"){a.allowNonFriend=b}var h=new Object();var g=document.getElementById("messageSpinner").innerHTML;showAndReturnPopupAboveRight(null,-1,-1,g,false,850,500,"messagePopup","messagePopupContent",true);formSubmitAJAX("/za/compose-message",a,"getComposeMessageCallback",h)}function getComposeMessageCallback(results,callbackParams){var evalScript=results.getElementsByTagName("evalScript");if(evalScript.length>0){var evalString=generateAJAXResponseHTML(evalScript[0].childNodes);eval(evalString)}var view=results.getElementsByTagName("view");if(view.length>0){var htmlValue=generateAJAXResponseHTML(view[0].childNodes);document.getElementById("messagePopupContent").innerHTML=htmlValue}registerSmartInputListeners()}function hideComposeMessagePopup(){hideSmartInputFloater();document.getElementById("messagePopupContent").innerHTML="";hideElement("messagePopup")}function sendNewMessage(d,b,f,c,l,g,e){var a=new Object();a.action=d;a.subject=document.getElementById("msgSubjectID").value;a.description=document.getElementById("msgDescriptionID").value;if(l!=null&&typeof l!="undefined"){a.currentUrl=l}if(b!=null&&typeof b!="undefined"&&b!=""){a.replyTo=b;a.to=b;if(e!=null&&typeof e!="undefined"&&e!=""){a.retailerName=e}}else{if(document.getElementById("msgToID")){a.to=document.getElementById("msgToID").value}}populateEntityMapInfo(a,f);if(g!=null&&typeof g!="undefined"&&g!=""){a.to=g;a.toSN=g}if(c!=null&&typeof c!="undefined"){a.allowNonFriend=c}var h=new Object();hideElement("msgSendBtns");showElement("msgSendSpinner");if(d!=null&&typeof d!="undefined"&&d=="sendUserMsg"){sendButtonClicked=true}formSubmitAJAX("/za/compose-message",a,"sendNewMessageCallback",h)}function sendNewMessageCallback(d,c){var a=d.getElementsByTagName("view");if(a.length>0){var b=generateAJAXResponseHTML(a[0].childNodes);document.getElementById("messagePopupContent").innerHTML=b}else{hideComposeMessagePopup()}}function populateEntityMapInfo(b,a){if(a!=null&&typeof a!="undefined"){if(typeof a.entityId!="undefined"&&a.entityId!=""){b.entityId=a.entityId}if(typeof a.entityType!="undefined"&&a.entityType!=""){b.entityType=a.entityType}if(typeof a.storeDomain!="undefined"&&a.storeDomain!=""){b.storeDomain=a.storeDomain}if(typeof a.allFans!="undefined"&&a.allFans!=""){b.allFans=a.allFans;if(b.allFans){b.to="All Fans"}}}}function removeDefaultText(a){hideElement("inputTextBox");showElement("inputTextArea");if(document.getElementById("msgToID")){document.getElementById("msgToID").focus()}}function addDefaultTextIfEmpty(b){if(document.getElementById("msgToID")){var a=document.getElementById("msgToID").value;if(a.length==0){hideElement("inputTextArea");showElement("inputTextBox")}}}function closeClicked(){hideElement("showfriendscreen");showElement("sharescreen")}function selectAll(b){var a=document.getElementById("friendsData");var d=a.getElementsByTagName("input");if(d!=null){for(var c=0;c<d.length;c++){if(d[c].type=="checkbox"){d[c].checked=b}}}}function showFriendsScreen(){var b=document.getElementById("msgToID").value;var a=document.getElementById("friendsData");if(a!=null){var d=a.getElementsByTagName("input");if(d!=null){for(var c=0;c<d.length;c++){if(d[c].type=="checkbox"){if(b==""){d[c].checked=false}else{if(b==d[c].value){d[c].checked=true}else{if(b.indexOf(" "+d[c].value+",")!=-1){d[c].checked=true}else{if(b.length>d[c].value.length&&b.substring(0,b.indexOf(","))==d[c].value){d[c].checked=true}else{if(b.substring(b.lastIndexOf(",")+2)==d[c].value){d[c].checked=true}else{d[c].checked=false}}}}}}}}}hideElement("sharescreen");showElement("showfriendscreen")}function doneChoosing(c,b){if(c==document.getElementById("msgToID").value){document.getElementById("msgToID").value=""}if(b==document.getElementById("msgToID").value){document.getElementById("msgToID").value=""}var d=document.getElementById("msgToID").value;var a=document.getElementById("friendsData");var f=a.getElementsByTagName("input");if(d.indexOf(",")!=-1){if(trim(d.substring(d.lastIndexOf(",")+1))==""){d=d.substring(0,d.lastIndexOf(","))}}if(f!=null){for(var e=0;e<f.length;e++){if(f[e].type=="checkbox"){if(!f[e].checked){if(d==""||d==f[e].value){d=""}else{if(d.indexOf(" "+f[e].value+",")!=-1){d=d.replace((" "+f[e].value+","),"")}else{if(d.length>f[e].value.length&&d.substring(0,d.indexOf(","))==f[e].value){d=d.substring(d.indexOf(",")+2)}else{if(d.substring(d.lastIndexOf(",")+2)==f[e].value){d=d.substring(0,d.lastIndexOf(","))}}}}}else{if(d.length==0){d=f[e].value}else{if(d.indexOf(f[e].value)==-1){d+=", "+f[e].value}else{if(f[e].value==d||d.indexOf(",")!=-1&&((d.length>f[e].value.length&&d.substring(0,f[e].value.length+1)==(f[e].value+","))||(d.substring(d.lastIndexOf(",")+2)==f[e].value)||(d.indexOf(", "+f[e].value+",")!=-1))){continue}else{d+=", "+f[e].value}}}}}}document.getElementById("msgToID").value=d;if(d!=""&&document.getElementById("errorToField")!=null){hideElement("errorToField")}}hideElement("showfriendscreen");showElement("sharescreen");if(document.getElementById("msgToID").value.length==0){hideElement("inputTextArea");showElement("inputTextBox")}else{hideElement("inputTextBox");showElement("inputTextArea")}}function getMatch(a,b){var d=document.getElementById("fb_form").action;var c='<img src="http://cn3.kaboodle.com/ht/img/page/spinning.gif?v=r0_56_0_128"/>';if(b=="n"){if(document.getElementById("next-btn")){document.getElementById("next-btn").innerHTML=c}}else{if(document.getElementById("prev-btn")){document.getElementById("prev-btn").innerHTML=c}}d+="&startIndex="+a;document.getElementById("fb_form").action=d;document.location.href=d}function getItem(c,b){var a="";if(typeof b!="undefined"&&(b==true||b=="true")){a+="/store"}a+="/"+document.getElementById("userName").value;a+="/"+document.getElementById("listName").value;if(c!=""){a+="?"+c}window.location.href=a}function getPreviousNextFB(b,c){var a="/"+document.getElementById("userName").value;a+="/"+b;if(c!=""){a+=c}window.location.href=a}function searchTextFocus(a){var c=document.getElementById("st").value;var b="Search for ";if(c=="item"||c=="Items"){b+="Products"}else{if(c=="page"){b+="Lists"}else{if(c=="collage"){b+="Styleboards"}else{if(c=="user"){b+="People"}else{if(c=="deal"){b+="Sales"}else{if(c=="retailer"){b+="Stores"}}}}}}if(document.getElementById("searchBox").value==b){document.getElementById("searchBox").value=""}document.getElementById("searchBox").style.fontStyle="normal";onFocusTopSearchbox(a)}function searchTextBlur(c){var g=document.getElementById("st").value;var h="Search for ";var l="Products";var d="Lists";var e="Styleboards";var f="People";var b="Sales";var a="Stores";var m;if(g=="item"||g=="Items"){m=l}else{if(g=="page"){m=d}else{if(g=="collage"){m=e}else{if(g=="user"){m=f}else{if(g=="deal"){m=b}else{if(g=="retailer"){m=a}}}}}}if((c&&(document.getElementById("searchBox").value==h+l||document.getElementById("searchBox").value==h+d||document.getElementById("searchBox").value==h+e||document.getElementById("searchBox").value==h+b||document.getElementById("searchBox").value==h+a||document.getElementById("searchBox").value==h+f))||document.getElementById("searchBox").value==""||document.getElementById("searchBox").value.length<=0){document.getElementById("searchBox").value=h+m;document.getElementById("searchBox").style.fontStyle="italic";return false}document.getElementById("searchBox").style.fontStyle="normal";return true}function onFocusTopSearchbox(a){if(typeof YAHOO=="undefined"||typeof YAHOO.widget.AutoComplete=="undefined"){var m;var l;var h;var g;var f;var d;var c;try{m=document.standardCreateElement("script");l=document.standardCreateElement("script");h=document.standardCreateElement("script");g=document.standardCreateElement("script");f=document.standardCreateElement("script");d=document.standardCreateElement("script");c=document.standardCreateElement("script")}catch(b){m=document.createElement("script");l=document.createElement("script");h=document.createElement("script");g=document.createElement("script");f=document.createElement("script");d=document.createElement("script");c=document.createElement("script")}m.type="text/javascript";m.src="http://cn2.kaboodle.com/ht/scripts/searchAutoCompleteList.js?v="+a;document.getElementsByTagName("head")[0].appendChild(m);l.type="text/javascript";l.src="http://cn2.kaboodle.com/ht/scripts/yui/yahoo-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(l);h.type="text/javascript";h.src="http://cn2.kaboodle.com/ht/scripts/yui/dom/dom-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(h);g.type="text/javascript";g.src="http://cn2.kaboodle.com/ht/scripts/yui/event/event-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(g);f.type="text/javascript";f.src="http://cn2.kaboodle.com/ht/scripts/yui/animation/animation-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(f);d.type="text/javascript";d.src="http://cn2.kaboodle.com/ht/scripts/yui/datasource/datasource-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(d);c.type="text/javascript";c.src="http://cn2.kaboodle.com/ht/scripts/yui/autocomplete/autocomplete-min.js?v="+a;document.getElementsByTagName("head")[0].appendChild(c)}pollAndLoadSearchAutoComplete()}var topSearchAC=null;function pollAndLoadSearchAutoComplete(){if(typeof YAHOO=="undefined"||typeof YAHOO.widget.AutoComplete=="undefined"){window.setTimeout("pollAndLoadSearchAutoComplete()",200)}else{if(topSearchAC==null){topSearchAC=new YAHOO.widget.AutoComplete("searchBox","topSearchACSection",new YAHOO.util.LocalDataSource(topSearchACOptions));topSearchAC.minQueryLength=0;topSearchAC.allowBrowserAutocomplete=false;topSearchAC.autoHighlight=false;topSearchAC.maxResultsDisplayed=15;topSearchAC.queryMatchContains=true}}}String.prototype.replaceAll=function(c,d){var a=this;var b=a.indexOf(c);while(b!=-1){a=a.replace(c,d);b=a.indexOf(c)}return a};
var catalogRatingObjects=new Array();var catalogGroupRatingObjects=new Array();var isUserLoggedIn=false;function catalogRatingObj_onmouseover(c,b){var a=catalogRatingObjects[c];a.changeDisplay(b)}function catalogRatingObj_onclick(d,c,a){var b=catalogRatingObjects[d];if(!b.loginRequired||isUserLoggedIn){if(b.modeSCT){if(c==-1){b.userSkipped=true;c=0}else{b.userSkipped=false}}b.setRateIndex(c);b.submitRating()}else{location.href=a}}function catalogRatingObj_onmouseout(b,c){b.cancelBubble=true;var a=catalogRatingObjects[c];a.revertRating(a.userRating)}function sctCatalogRatingObj_onmouseout(b){var a=catalogRatingObjects[b];if(a.userSkipped){hideElement("cat_rating_widget_"+b);showElement("sct_rating_no_opinion"+b)}}function catalogRating(j,a,h,d,i,c,b,f,e,g){this.changeDisplay=function(l){for(var m=5;m>=1;m--){var n;if(m<=l){n="rating-full-star.gif"}else{if(m<=this.originalUserRating){n="rating-full-faded-star.gif"}else{n="rating-empty-star.gif"}}var k=document.getElementById("cat_item"+this.index+"_rateImg"+m);k.src="http://cn3.kaboodle.com/ht/img/rate/"+this.imgFolder+"/"+n}this.setLabel(l)};this.setLabel=function(m){if(this.modeSCT){var l=document.getElementById("cat_rat_lbl"+this.index);if(l){var n="Rate it";var k=m>0?"rated":"un-rated";switch(m){case 1:case"1":n="Not for me";break;case 2:case"2":n="Not great";break;case 3:case"3":n="It's okay";break;case 4:case"4":n="Like it";break;case 5:case"5":n="L-O-V-E";break}l.innerHTML=n;l.className=k}}};this.setRateIndex=function(k){this.userRating=k;this.changeDisplay(this.userRating)};this.revertRating=function(){this.userRating=this.originalUserRating;this.changeDisplay(this.userRating)};this.reinitialize=function(k,l){this.originalUserRating=k;this.userRating=k;if(this.modeSCT){this.userSkipped=(l=="true")?true:false;if(this.userSkipped){document.getElementById("cat_rating_widget_"+this.index).style.display="none";document.getElementById("sct_rating_no_opinion"+this.index).style.display=""}else{document.getElementById("cat_rating_widget_"+this.index).style.display="";document.getElementById("sct_rating_no_opinion"+this.index).style.display="none"}}this.changeDisplay(this.userRating)};this.submitRating=function(){var l=new Object();l.action=this.modeSCT?"postSCTRating":"postCatalogItemRating";l.catalogitemid=this.catalogItemId;l.userRating=this.userRating;l.userSkipped=this.userSkipped;l.frmSubmit=true;var k=new Object();k.index=this.index;k.callback=this.catalogRatingCallback;formSubmitAJAX("/ci/rating?"+this.queryStr,l,"catalogRatingSubmitCallback",k)};isUserLoggedIn=c;this.loginRequired=d;this.imgFolder=i;this.originalUserRating=j;this.userRating=j;this.userSkipped=a;this.catalogItemId=h;this.index=catalogRatingObjects.length;this.modeSCT=b;this.queryStr=e;this.combinedMode=g;this.catalogRatingCallback=(typeof f=="undefined"?"":f);catalogRatingObjects[catalogRatingObjects.length]=this;this.setLabel(j)}function catalogRatingSubmitCallback(results,callbackParams){var userRating=results.getElementsByTagName("userRating")[0].firstChild.nodeValue;var ratingObj=catalogRatingObjects[callbackParams.index];if(!ratingObj.modeSCT){var totalRating=results.getElementsByTagName("totalRating")[0].firstChild.nodeValue;var numberOfRatings=results.getElementsByTagName("numberOfRatings")[0].firstChild.nodeValue;if(ratingObj.combinedMode){ratingObj.reinitialize(totalRating/numberOfRatings)}else{ratingObj.reinitialize(userRating);if(callbackParams.index<catalogGroupRatingObjects.length){var groupRatingObj=catalogGroupRatingObjects[callbackParams.index];groupRatingObj.changeDisplay(totalRating/numberOfRatings)}}if(callbackParams.callback!=""){eval(callbackParams.callback)(callbackParams.index,userRating,totalRating,numberOfRatings)}}else{var userSkipped=results.getElementsByTagName("userSkipped")[0].firstChild.nodeValue;ratingObj.reinitialize(userRating,userSkipped);if(callbackParams.callback!=""){eval(callbackParams.callback)(callbackParams.index,userRating,userSkipped)}}}function catalogGroupRating(a){this.changeDisplay=function(b){for(var d=5;d>=1;d--){var e;if(d<=b){e="rating-results-full-star.gif"}else{e="rating-results-empty-star.gif"}var c=document.getElementById("cat_item"+this.index+"_grprateImg"+d);c.src="http://cn3.kaboodle.com/ht/img/rate/"+this.imgFolder+"/"+e}};this.index=catalogGroupRatingObjects.length;this.imgFolder=a;catalogGroupRatingObjects[catalogGroupRatingObjects.length]=this}function catalogItemRatingCB(b,c,d,a){if(isOrignallyLoggedOut){location.reload()}var e=document.getElementById("ratingCountID");if(e){e.innerHTML=a+(a==1?" Rating":" Ratings")}}function seeMoreOrLessLists(c,e){var d=document.getElementById("moreListsContainer_"+c);var b=document.getElementById("moreListsLink_"+c);var a=document.getElementById("lessListsLink_"+c);if(e){d.style.display="";b.style.display="none";a.style.display=""}else{d.style.display="none";b.style.display="";a.style.display="none"}}function changePrimary(a){document.getElementById("bigImageContainer").innerHTML=documentImageElements[a]}function catalogHeartingCallBack(){document.getElementById("catCommentText").value="";var c=document.getElementById("addCatalogCommentPopup").innerHTML;var b=document.getElementById("catalogHearting");var a=document.getElementById("addCatalogCommentPopup").innerHTML;document.getElementById("addCatalogCommentPopup").innerHTML="";if(document.getElementById("popUpDiv")){showElement("popUpDiv")}showAndReturnPopupAboveRight(b,450,220,a,false,-450,20)}function hidePopupDiv(){hideElement("popUpDiv");if(document.getElementById("catalogCommentsubmitBtn")&&document.getElementById("catalogCommentsubmitBtnInactive")){showElement("catalogCommentsubmitBtn");hideElement("catalogCommentsubmitBtnInactive")}document.getElementById("addCatalogCommentPopup").innerHTML=document.getElementById("popUpContent").innerHTML;document.getElementById("popUpContent").innerHTML=""};
function addCatCommentSigninupCB(){isUserLoggedIn=true;addCatalogComment(true,_g_catalogItemId,_g_callbackMethod,_g_commentDeleteCallback)}function addCatalogComment(c,j,e,h,d,b,f,i){i=(typeof i=="undefined")?"":i;if(c||isUserLoggedIn){_g_catalogItemId=null;_g_callbackMethod=null;_g_commentDeleteCallback=null;document.getElementById("addCatCommentBtn").disabled=true;if(document.getElementById("catalogCommentsubmitBtn")&&document.getElementById("catalogCommentsubmitBtnInactive")){hideElement("catalogCommentsubmitBtn");showElement("catalogCommentsubmitBtnInactive")}var a=new Object();a.catalogitemid=j;a.action="addCatalogItemComment";if(f!=undefined&&f!=null&&f!=""&&f!="undefined"){if(document.getElementById(f).value==""){hidePopupDiv();if(document.getElementById("addCatCommentBtn")){document.getElementById("addCatCommentBtn").disabled=false}return}a.comment=document.getElementById(f).value}else{if(document.getElementById("catCommentText").value==""||document.getElementById("catCommentText").value==i){document.getElementById("addCatCommentBtn").disabled=false;return}a.comment=document.getElementById("catCommentText").value}a.commentDeleteCallback=h;var g=new Object();if(d){a.fromPopup=d;g.fromPopup=d}else{a.fromPopup=false;g.fromPopup=false}g.callbackMethod=e;g.defaultText=i;formSubmitAJAX("/ci/comments",a,"submitAddCatalogCommentCallback",g)}else{if(b){location.href=b}else{_g_catalogItemId=j;_g_callbackMethod=e;_g_commentDeleteCallback=h;addSignInCallback("addCatCommentSigninupCB");addSignUpCallback("addCatCommentSigninupCB");showSigninMode("addCatCommentBtn",0,250)}}}function submitAddCatalogCommentCallback(results,callbackParams){if(document.getElementById("addCatCommentBtn")){document.getElementById("addCatCommentBtn").disabled=false}var validationError=results.getElementsByTagName("validationError");var errorMsgEleId="catCommentError";if(validationError.length>0&&document.getElementById(errorMsgEleId)){document.getElementById(errorMsgEleId).innerHTML=generateAJAXResponseHTML(validationError[0].childNodes);showElement(errorMsgEleId);return}if(document.getElementById(errorMsgEleId)){hideElement(errorMsgEleId)}var comments=results.getElementsByTagName("comment");if(comments.length>0){var htmlValue="";for(var i=0;i<comments.length;i++){htmlValue=htmlValue+comments[i].firstChild.nodeValue}if(callbackParams.callbackMethod!=""){eval(callbackParams.callbackMethod)(htmlValue)}}if(document.getElementById("catCommentText")){document.getElementById("catCommentText").value=callbackParams.defaultText}if(document.getElementById("catCommentTextPopup")){document.getElementById("catCommentTextPopup").value=""}if(document.getElementById("catalogCommentsubmitBtn")&&document.getElementById("catalogCommentsubmitBtnInactive")){showElement("catalogCommentsubmitBtn");hideElement("catalogCommentsubmitBtnInactive")}var totalComments=results.getElementsByTagName("totalComments");if(document.getElementById("commentCount")){if(totalComments[0]){document.getElementById("commentCount").innerHTML="<h2>Comments ("+totalComments[0].firstChild.nodeValue+")</h2>"}}if(document.getElementById("subtab1")){if(callbackParams.fromPopup){var commentCount=document.getElementById("catalogItemCommentsCount").value;commentCount=parseInt(commentCount)+1;document.getElementById("catalogItemCommentsCount").value=commentCount;document.getElementById("subtab1").innerHTML="<a href='javascript:showTab(1);'>Comments ("+commentCount+")</a>"}else{if(totalComments[0]){document.getElementById("subtab1").innerHTML="<a href='javascript:showTab(1);'>Comments ("+totalComments[0].firstChild.nodeValue+")</a>"}}}else{if(document.getElementById("popUpDiv")&&document.getElementById("popUpDiv").style.display=="block"){hidePopupDiv()}}}function deleteCatalogComment(c,f,a,e){var d=new Object();d.action="deleteCatalogItemComment";d.catalogitemid=f;d.commentId=c;var b=new Object();b.containerId=a;b.callbackMethod=e;formSubmitAJAX("/ci/comments",d,"submitDeleteCatalogCommentCallback",b)}function submitDeleteCatalogCommentCallback(results,callbackParams){var containerEle=document.getElementById(callbackParams.containerId);containerEle.style.display="none";if(callbackParams.callbackMethod!=""){eval(callbackParams.callbackMethod)()}var totalComments=results.getElementsByTagName("totalComments");if(document.getElementById("commentCount")){if(totalComments[0]){document.getElementById("commentCount").innerHTML="<h2>Comments ("+totalComments[0].firstChild.nodeValue+")</h2>"}}}function ci_commentDeletedCallback(){}function ci_commentAddedCallback(c){if(isOrignallyLoggedOut){location.reload()}if(document.getElementById("ci_numComments")){var a=parseInt(document.getElementById("ci_numComments").innerHTML)}if(document.getElementById("catalogCommentsubmitBtn")&&document.getElementById("catalogCommentsubmitBtnInactive")){showElement("catalogCommentsubmitBtn");hideElement("catalogCommentsubmitBtnInactive")}var b=document.getElementById("currentCommentsHolder");b.style.display="";var d=b.innerHTML;document.getElementById("currentCommentsHolder").innerHTML=d+c;if(document.getElementById("ci_numComments_header")){document.getElementById("ci_numComments_header").style.display="";document.getElementById("ci_numComments_header").innerHTML=(a+1)}}function ci_commentDeletedCallbackLI(){var a=parseInt(document.getElementById("allCommentCount").innerHTML);document.getElementById("allCommentCount").innerHTML=(a-1);if(a==1){showElement("noCommText")}}function ci_commentAddedCallbackLI(c){var b=document.getElementById("currentCommentsHolderLI");b.style.display="";var d=b.innerHTML;document.getElementById("currentCommentsHolderLI").innerHTML=d+c;var a=parseInt(document.getElementById("allCommentCount").innerHTML);document.getElementById("allCommentCount").innerHTML=(a+1);if(document.getElementById("catalogCommentsubmitBtn")&&document.getElementById("catalogCommentsubmitBtnInactive")){showElement("catalogCommentsubmitBtn");hideElement("catalogCommentsubmitBtnInactive")}hideElement("noCommText")}function ci_commentAddedPopupCallback(b){if(isOrignallyLoggedOut){location.reload()}var a=document.getElementById("currentCommentsHolder");if(a){a.style.display="";document.getElementById("currentCommentsHolder").innerHTML=b+document.getElementById("currentCommentsHolder").innerHTML}if(document.getElementById("catalogCommentsubmitBtn")&&document.getElementById("catalogCommentsubmitBtnInactive")){showElement("catalogCommentsubmitBtn");hideElement("catalogCommentsubmitBtnInactive")}if(document.getElementById("addCommentLink")){document.getElementById("addCommentLink").style.display="none"}}function addItemComment(h,e,d,j,g,a,c,i){if(document.getElementById(d).value!=""&&document.getElementById(d).value!=i){document.getElementById("addlistItemCommentBtn_"+g).disabled=true;var b=new Object();b.pid=e;b.action="postItemComment";b.itemId=h;b.comment=document.getElementById(d).value;b.uniqueId=g;var f=new Object();f.parentEleId=j;f.uniqueId=g;f.commentAreaId=d;f.isOwner=a;f.defaultText=i;f.isGroupList=(typeof c=="undefined")?"":c;formSubmitAJAX("/za/comment",b,"addItemCommentCallback",f)}}function addItemCommentCallback(d,b){document.getElementById("addlistItemCommentBtn_"+b.uniqueId).disabled=false;var e=d.getElementsByTagName("validationError");var c="itemCommentError"+b.uniqueId;if(e.length>0&&document.getElementById(c)){document.getElementById(c).innerHTML=generateAJAXResponseHTML(e[0].childNodes);showElement(c);return}if(document.getElementById(c)){hideElement(c)}document.getElementById(b.commentAreaId).value=b.defaultText;if(document.getElementById("catalogCommentsubmitBtn")&&document.getElementById("catalogCommentsubmitBtnInactive")){showElement("catalogCommentsubmitBtn");hideElement("catalogCommentsubmitBtnInactive")}document.getElementById(b.parentEleId).innerHTML=document.getElementById(b.parentEleId).innerHTML+generateAJAXResponseHTML(d.getElementsByTagName("comment")[0].childNodes);var a=parseInt(document.getElementById("allCommentCount").innerHTML);document.getElementById("allCommentCount").innerHTML=(a+1);document.getElementById("addItemCommentLink1_"+b.uniqueId).innerHTML="Add a comment";hideElement("noCommText")}function deleteListItemComment(e,c,a,d){var f=new Object();f.commentId=e;f.pid=c;f.action="deleteItemComment";var b=new Object();b.containerId=a;b.callbackMethod=d;formSubmitAJAX("/za/comment",f,"submitDeleteListItemCommentCallback",b)}function submitDeleteListItemCommentCallback(c,b){hideElement(b.containerId);var a=parseInt(document.getElementById("allCommentCount").innerHTML);document.getElementById("allCommentCount").innerHTML=(a-1);if(a==1){showElement("noCommText")}}function leaveConversation(b,e,c){var d=new Object();d.entityId=b;d.action="leaveConversation";var a=new Object();a.linkId=e;a.addCommentId=(typeof c=="undefined")?null:c;formSubmitAJAX("/za/conversation",d,"leaveConversationCallback",a)}function leaveConversationCallback(b,a){hideElement(a.linkId);if(a.addCommentId!=null){document.getElementById(a.addCommentId).innerHTML="Join this conversation"}}function showAddItemCommentBox(b,e){for(var c=0;true;c++){var d=document.getElementById("addItemCommentLink_"+c);var a=document.getElementById("addItemCommentBox_"+c);if(d&&a){if(c==b){hideElement("addItemCommentLink_"+c);showElement("addItemCommentBox_"+c)}else{showElement("addItemCommentLink_"+c);hideElement("addItemCommentBox_"+c)}}else{break}}if(e=="true"){if(b==-1){showElement("addCatalogComments");hideElement("catalogAddCommLink")}else{hideElement("addCatalogComments");showElement("catalogAddCommLink")}}}function removeDefaultCommentText(a,b){if(document.getElementById(a).value==b){document.getElementById(a).value=""}}function addDefaultText(a,b){if(document.getElementById(a).value==""){document.getElementById(a).value=b}};
function google_ad_request_done(b){var c="";var a;if(typeof adl=="undefined"){adl="multiline"}if(b.length==0){return}if(b[0].type=="flash"){}else{if(b[0].type=="image"){}else{if(b.length>=1){c+='<div class="ad-holder"><div class="title"><a href="'+google_info.feedback_url+'">Ads by Google</a></div><div class="ads">';for(a=0;a<b.length;++a){c+='<div class="ad-item"><a href="'+b[a].url+'" onClick="cpcExit(this);" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+b[a].visible_url+"';return true\">"+b[a].line1+"</a>";c+=layout(adl,b[a].line2,b[a].line3);c+='<a class="site" href="'+b[a].url+'" onClick="cpcExit(this);" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+b[a].visible_url+"';return true\">"+b[a].visible_url+"</a></div>"}c+="</div></div>"}}}document.write(c);return}function GetParam(b){var a=new RegExp(b+"=(.+)[&]","i").exec(location.search);if(a==null){a=new RegExp(b+"=(.+)","i").exec(location.search)}if(a==null){return null}a=a+"";result=a.split(",");return result[1]}function google_afs_request_done(c){var e=c.length;if(e<=0){return}if(typeof adl=="undefined"){adl="multiline"}var b="";var a="";if(c.length>=1){var d="";d+='<div class="ad-holder"><div class="title"><a href="http://services.google.com/feedback/online_hws_feedback">Ads by Google</a></div><div class="ads">';for(i=0;i<c.length;++i){if(c[i].type=="text/wide"){d+='<div class="ad-item"><a href="'+c[i].url+'" onClick="cpcExit(this);" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+c[i].visible_url+"';return true\">"+c[i].line1+"</a>";if(c[i].line2){d+=layout(adl,c[i].line2)}if(c[i].line3){d+=c[i].line3}d+='</p><a class="site" href="'+c[i].url+'" onClick="cpcExit(this);" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to '+c[i].visible_url+"';return true\">"+c[i].visible_url+"</a></div>"}}d+="</div></div>"}document.write(d)}function inlineLayout(b,a){nextLine=" - "+b;if(a){nextLine+=" "+a}nextLine="<span class='site'>"+nextLine+"</span><p/>";return nextLine}function multilineLayout(b,a){nextLine=b;if(a){nextLine+=" "+a}nextLine="<p>"+nextLine+"</p>";return nextLine}function layout(c,b,a){if(c=="inline"){return inlineLayout(b,a)}else{return multilineLayout(b,a)}};
var ratingObjects=new Array();var userLoggedIn=false;var signinupflow=false;function EntityRating(l,j,d,g,f,b,c,m,h,a,e,k){userLoggedIn=c;this.parentId=j;this.originalRating=d;this.rating=d;this.entityId=g;this.entityType=f;this.uniqueId=l;this.callbackFunction=b;this.ratingId=m;this.pid=h;this.blogId=e;this.imageSize=k;this.loadPageForNLI=(a==""?null:a);ratingObjects[l]=this;this.changeDisplay=function(n){if(n==1){var q=document.getElementById("item"+this.uniqueId+"_rateImg1");q.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/like-voted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-1-pressed.gif?v=r0_56_0_128";var p=document.getElementById("item"+this.uniqueId+"_rateImg2");p.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/love-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-2.gif?v=r0_56_0_128";var o=document.getElementById("item"+this.uniqueId+"_rateImg3");o.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/adore-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-3.gif?v=r0_56_0_128"}else{if(n==2){var q=document.getElementById("item"+this.uniqueId+"_rateImg1");q.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/like-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-1.gif?v=r0_56_0_128";var p=document.getElementById("item"+this.uniqueId+"_rateImg2");p.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/love-voted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-2-pressed.gif?v=r0_56_0_128";var o=document.getElementById("item"+this.uniqueId+"_rateImg3");o.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/adore-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-3.gif?v=r0_56_0_128"}else{if(n==3){var q=document.getElementById("item"+this.uniqueId+"_rateImg1");q.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/like-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-1.gif?v=r0_56_0_128";var p=document.getElementById("item"+this.uniqueId+"_rateImg2");p.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/love-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-2.gif?v=r0_56_0_128";var o=document.getElementById("item"+this.uniqueId+"_rateImg3");o.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/adore-voted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-3-pressed.gif?v=r0_56_0_128"}else{var q=document.getElementById("item"+this.uniqueId+"_rateImg1");q.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/like-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-1.gif?v=r0_56_0_128";var p=document.getElementById("item"+this.uniqueId+"_rateImg2");p.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/love-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-2.gif?v=r0_56_0_128";var o=document.getElementById("item"+this.uniqueId+"_rateImg3");o.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/adore-unvoted.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-3.gif?v=r0_56_0_128"}}}};this.changeDisplayOnMouseOver=function(n){if(n==1){var q=document.getElementById("item"+this.uniqueId+"_rateImg1");q.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/like-hover.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-1-pressed.gif?v=r0_56_0_128"}else{if(n==2){var p=document.getElementById("item"+this.uniqueId+"_rateImg2");p.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/love-hover.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-2-pressed.gif?v=r0_56_0_128"}else{if(n==3){var o=document.getElementById("item"+this.uniqueId+"_rateImg3");o.src=this.imageSize=="large"?"http://cn3.kaboodle.com/ht/img/contest/adore-hover.gif":"http://cn3.kaboodle.com/ht/img/entityRater/hcount-sm-3-pressed.gif?v=r0_56_0_128"}}}};this.setRateIndex=function(n){this.rating=n;this.changeDisplay(this.rating)};this.submitRating=function(){var o=new Object();o.entityId=this.entityId;o.entityType=this.entityType;o.userRating=this.rating;o.ratingId=this.ratingId;o.pid=this.pid;o.blogId=this.blogId;o.oldRating=this.originalRating;var n=new Object();n.uniqueId=this.uniqueId;n.callbackFn=this.callbackFn;n.rating=this.rating;n.entityId=o.entityId;formSubmitAJAX("/za/entityRating",o,"entityRatingCB",n)};this.reinitialize=function(n){this.originalRating=n;this.rating=n;this.changeDisplay(this.rating)}}function ratingsObj_onmouseover(c,b){var a=ratingObjects[c];if(a){a.changeDisplayOnMouseOver(b)}}function ratingsObj_onmouseout(c,b){var a=ratingObjects[c];a.changeDisplay(a.rating)}function ratingsObj_onclick(c,b){var a=ratingObjects[c];if(userLoggedIn){a.setRateIndex(b);a.submitRating()}else{if(a.loadPageForNLI!=null){location.href=a.loadPageForNLI}}}function entityRatingCB(results,callbackParams){if(signinupflow){location.reload()}var loginStatus=results.getElementsByTagName("isUserLoggedIn")[0].firstChild.nodeValue;var rObj=ratingObjects[callbackParams.uniqueId];if(loginStatus=="false"||!loginStatus){userLoggedIn=false;rObj.reinitialize(0);rObj.ratingId="";ratingsObj_onclick(callbackParams.uniqueId,callbackParams.rating)}else{var rating=results.getElementsByTagName("rating")[0].firstChild.nodeValue;var totalRating=results.getElementsByTagName("totalRating")[0].firstChild.nodeValue;var totalAggregate=results.getElementsByTagName("totalAggregate")[0].firstChild;if(totalAggregate){totalAggregate=totalAggregate.nodeValue}else{totalAggregate=null}if(results.getElementsByTagName("ratingId")[0].firstChild){rObj.ratingId=results.getElementsByTagName("ratingId")[0].firstChild.nodeValue}rObj.reinitialize(rating);if(document.getElementById("heart_"+callbackParams.uniqueId)){document.getElementById("heart_"+callbackParams.uniqueId).innerHTML=totalRating}if(document.getElementById("bts_heart_"+callbackParams.uniqueId)){document.getElementById("bts_heart_"+callbackParams.uniqueId).innerHTML=totalRating}var ratingText=document.getElementById("ratingText");if(ratingText){ratingText.innerHTML="Thanks!"}if(rObj.callbackFunction){eval(rObj.callbackFunction)(rating,totalRating,totalAggregate,callbackParams.entityId,callbackParams.uniqueId)}}}function initEntityRater(l,j,d,g,f,b,c,m,h,a,e,k){var n=ratingObjects[l];if(!n){new EntityRating(l,j,d,g,f,b,c,m,h,a,e,k)}}function changeNonAjaxDisplay(a,e){if(a==1){var d=document.getElementById("item"+e+"_rateImg1");d.src="http://cn3.kaboodle.com/ht/img/contest/like-voted.gif?v=r0_56_0_128";var c=document.getElementById("item"+e+"_rateImg2");c.src="http://cn3.kaboodle.com/ht/img/contest/love-unvoted.gif?v=r0_56_0_128";var b=document.getElementById("item"+e+"_rateImg3");b.src="http://cn3.kaboodle.com/ht/img/contest/adore-unvoted.gif?v=r0_56_0_128"}else{if(a==2){var d=document.getElementById("item"+e+"_rateImg1");d.src="http://cn3.kaboodle.com/ht/img/contest/like-unvoted.gif?v=r0_56_0_128";var c=document.getElementById("item"+e+"_rateImg2");c.src="http://cn3.kaboodle.com/ht/img/contest/love-voted.gif?v=r0_56_0_128";var b=document.getElementById("item"+e+"_rateImg3");b.src="http://cn3.kaboodle.com/ht/img/contest/adore-unvoted.gif?v=r0_56_0_128"}else{if(a==3){var d=document.getElementById("item"+e+"_rateImg1");d.src="http://cn3.kaboodle.com/ht/img/contest/like-unvoted.gif?v=r0_56_0_128";var c=document.getElementById("item"+e+"_rateImg2");c.src="http://cn3.kaboodle.com/ht/img/contest/love-unvoted.gif?v=r0_56_0_128";var b=document.getElementById("item"+e+"_rateImg3");b.src="http://cn3.kaboodle.com/ht/img/contest/adore-voted.gif?v=r0_56_0_128"}else{var d=document.getElementById("item"+e+"_rateImg1");d.src="http://cn3.kaboodle.com/ht/img/contest/like-unvoted.gif?v=r0_56_0_128";var c=document.getElementById("item"+e+"_rateImg2");c.src="http://cn3.kaboodle.com/ht/img/contest/love-unvoted.gif?v=r0_56_0_128";var b=document.getElementById("item"+e+"_rateImg3");b.src="http://cn3.kaboodle.com/ht/img/contest/adore-unvoted.gif?v=r0_56_0_128"}}}}function changeNonAjaxDisplayOnMouseOver(a,e){if(a==1){var d=document.getElementById("item"+e+"_rateImg1");d.src="http://cn3.kaboodle.com/ht/img/contest/like-hover.gif?v=r0_56_0_128"}else{if(a==2){var c=document.getElementById("item"+e+"_rateImg2");c.src="http://cn3.kaboodle.com/ht/img/contest/love-hover.gif?v=r0_56_0_128"}else{if(a==3){var b=document.getElementById("item"+e+"_rateImg3");b.src="http://cn3.kaboodle.com/ht/img/contest/adore-hover.gif?v=r0_56_0_128"}}}}function rateItem(b,d){changeNonAjaxDisplay(b,d);for(i=1;i<=3;i++){var a=document.getElementById("item"+d+"_rateImg"+i);a.onmouseout=function(){changeNonAjaxDisplay(b,d)}}var c=document.getElementById("userHearts");c.value=b};
var collection=new Array();var isCommaDelimiter=true;function freezeEvent(b){if(b.preventDefault){b.preventDefault()}b.returnValue=false;b.cancelBubble=true;if(b.stopPropagation){b.stopPropagation()}return false}function isWithinNode(g,d,h,b,f){answer=false;te=g;while(te&&!answer){if((te.id&&(te.id==d))||(te.className&&(te.className==d+"Class"))||(!b&&h&&te.className&&(te.className==h))||(!b&&h&&te.className&&(te.className.indexOf(h)!=-1))||(b&&te.tagName&&(te.tagName.toLowerCase()==b))||(f&&(te==f))){answer=te}else{te=te.parentNode}}return te}function getEvent(b){return(b?b:window.event)}function getEventElement(b){return(b.srcElement?b.srcElement:(b.target?b.target:b.currentTarget))}function findElementPosX(b){curleft=0;if(b.offsetParent){while(b.offsetParent){curleft+=b.offsetLeft;b=b.offsetParent}}else{if(b.x){curleft+=b.x}}if(b.offsetLeft!=undefined&&siw.isWinIE){curleft+=b.offsetLeft}return curleft}function findElementPosY(b){curtop=0;if(b.offsetParent){while(b.offsetParent){curtop+=b.offsetTop;b=b.offsetParent}}else{if(b.y){curtop+=b.y}}return curtop}function handleKeyPress(b){e=getEvent(b);eL=getEventElement(e);if(typeof handleKeyUpCustom!="undefined"){handleKeyUpCustom(eL)}upEl=isWithinNode(eL,null,"wickEnabled",null,null);kc=e.keyCode;if(siw&&((kc==13))){siw.selectingSomething=true;if(siw.isSafari){siw.inputBox.blur()}siw.inputBox.focus();siw.inputBox.value=siw.inputBox.value.replace(/[ \r\n\t\f\s]+$/gi," ");hideSmartInputFloater();freezeEvent(e)}else{if(upEl&&(kc!=38)&&(kc!=40)&&(kc!=37)&&(kc!=39)&&(kc!=13)&&(kc!=27)){if(!siw||(siw&&!siw.selectingSomething)){processSmartInput(upEl)}}else{if(siw&&siw.inputBox){siw.inputBox.focus()}}}}function handleKeyDown(b){e=getEvent(b);eL=getEventElement(e);if(siw&&(kc=e.keyCode)){if(kc==40){siw.selectingSomething=true;freezeEvent(e);if(siw.isGecko){siw.inputBox.blur()}selectNextSmartInputMatchItem()}else{if(kc==38){siw.selectingSomething=true;freezeEvent(e);if(siw.isGecko){siw.inputBox.blur()}selectPreviousSmartInputMatchItem()}else{if((kc==13)){siw.selectingSomething=true;activateCurrentSmartInputMatch();freezeEvent(e)}else{if(kc==27){hideSmartInputFloater();freezeEvent(e)}else{siw.selectingSomething=false}}}}}}function handleFocus(b){e=getEvent(b);eL=getEventElement(e);if(typeof handleFocusCustom!="undefined"){handleFocusCustom(eL)}if(focEl=isWithinNode(eL,null,"wickEnabled",null,null)){if(!siw||(siw&&!siw.selectingSomething)){processSmartInput(focEl)}}}function handleBlur(b){e=getEvent(b);eL=getEventElement(e);if(typeof handleBlurCustom!="undefined"){handleBlurCustom(eL)}if(blurEl=isWithinNode(eL,null,"wickEnabled",null,null)){if(siw&&!siw.selectingSomething){hideSmartInputFloater()}}}function handleClick(b){e2=getEvent(b);eL2=getEventElement(e2);if(siw&&siw.selectingSomething){selectFromMouseClick()}}function handleMouseOver(b){e=getEvent(b);eL=getEventElement(e);if(siw&&(mEl=isWithinNode(eL,null,"matchedSmartInputItem",null,null))){siw.selectingSomething=true;selectFromMouseOver(mEl)}else{if(isWithinNode(eL,null,"siwCredit",null,null)){siw.selectingSomething=true}else{if(siw){siw.selectingSomething=false}}}}function showSmartInputFloater(){if(!siw.floater.style.display||(siw.floater.style.display=="none")){if(!siw.customFloater){x=findElementPosX(siw.inputBox);y=findElementPosY(siw.inputBox)+siw.inputBox.offsetHeight;if(!siw.isGecko&&!siw.isWinIE){x+=8}if(!siw.isGecko&&!siw.isWinIE){y+=10}siw.floater.style.left=x+"px";siw.floater.style.top=y+"px"}else{}siw.floater.style.display="block";siw.floater.style.visibility="visible";if(typeof showFloaterCustom!="undefined"){showFloaterCustom()}}}function hideSmartInputFloater(){if(siw){siw.floater.style.display="none";siw.floater.style.visibility="hidden";siw=null;if(typeof hideFloaterCustom!="undefined"){hideFloaterCustom()}}}function processSmartInput(b){if(!siw){siw=new smartInputWindow()}siw.inputBox=b;siw.autoShow=b.accept;classData=b.className.split(" ");siwDirectives=null;for(i=0;(!siwDirectives&&classData[i]);i++){if(classData[i].indexOf("wickEnabled")!=-1){siwDirectives=classData[i]}}if(siwDirectives&&(siwDirectives.indexOf(":")!=-1)){siw.customFloater=true;newFloaterId=siwDirectives.split(":")[1];siw.floater=document.getElementById(newFloaterId);siw.floaterContent=siw.floater.getElementsByTagName("div")[0]}setSmartInputData();if(siw.matchCollection&&(siw.matchCollection.length>0)){selectSmartInputMatchItem(0)}content=getSmartInputBoxContent();if(content){modifySmartInputBoxContent(content);showSmartInputFloater()}else{hideSmartInputFloater()}}function smartInputMatch(b,d){this.cleanValue=b;this.value=d;this.isSelected=false}function simplify(b){return b.toLowerCase().replace(/^[ \s\f\t\n\r]+/,"").replace(/[ \s\f\t\n\r]+$/,"")}function getUserInputToMatch(b){a=b;if(isCommaDelimiter){fields=b.split(",");if(fields.length>0){a=fields[fields.length-1]}}return a}function getUserInputBase(){s=siw.inputBox.value;a=s;if((lastComma=s.lastIndexOf(","))!=-1){a=a.replace(/^(.*\,[ \r\n\t\f\s]*).*$/i,"$1")}else{a=""}return a}function runMatchingLogic(d,b){d=simplify(d);uifc=d.charAt(0).toLowerCase();if(uifc=='"'){uifc=(n=d.charAt(1))?n.toLowerCase():"z"}if(b){d=uifc}if(siw){siw.matchCollection=new Array()}pointerToCollectionToUse=collection;if(siw&&siw.revisedCollection&&(siw.revisedCollection.length>0)&&siw.lastUserInput&&(d.indexOf(siw.lastUserInput)==0)){pointerToCollectionToUse=siw.revisedCollection}else{if(collectionIndex[d]&&(collectionIndex[d].length>0)){pointerToCollectionToUse=collectionIndex[d]}else{if(collectionIndex[uifc]&&(collectionIndex[uifc].length>0)){pointerToCollectionToUse=collectionIndex[uifc]}else{if(siw&&(d.length==1)&&(!collectionIndex[uifc])){siw.buildIndex=true}else{if(siw){siw.buildIndex=false}}}}}pointerToCollectionToUse=collection;tempCollection=new Array();re1m=new RegExp('^([ "><-]*)('+d+")","i");re2m=new RegExp('([ "><-]+)('+d+")","i");re1=new RegExp('^([ "}{-]*)('+d+")","gi");re2=new RegExp('([ "}{-]+)('+d+")","gi");for(i=0,j=0;(i<pointerToCollectionToUse.length);i++){displayMatches=((!b)&&(j<siw.MAX_MATCHES));entry=pointerToCollectionToUse[i];mEntry=simplify(entry);if(!b&&(mEntry.indexOf(d)==0)){d=d.replace(/\>/gi,"\\}").replace(/\< ?/gi,"\\{");re=new RegExp("("+d+")","i");if(displayMatches){siw.matchCollection[j]=new smartInputMatch(entry,mEntry.replace(/\>/gi,"}").replace(/\< ?/gi,"{").replace(re,"<b>$1</b>"))}tempCollection[j]=entry;j++}else{if(mEntry.match(re1m)||mEntry.match(re2m)){if(!b&&displayMatches){siw.matchCollection[j]=new smartInputMatch(entry,mEntry.replace(/\>/gi,"}").replace(/\</gi,"{").replace(re1,"$1<b>$2</b>").replace(re2,"$1<b>$2</b>"))}tempCollection[j]=entry;j++}}}if(siw){siw.lastUserInput=d;siw.revisedCollection=tempCollection.join(",").split(",");collectionIndex[d]=tempCollection.join(",").split(",")}if(b||siw.buildIndex){collectionIndex[uifc]=tempCollection.join(",").split(",");if(siw){siw.buildIndex=false}}}function setSmartInputData(){if(siw){orgUserInput=siw.inputBox.value;orgUserInput=getUserInputToMatch(orgUserInput);userInput=orgUserInput.toLowerCase().replace(/[\r\n\t\f\s]+/gi," ").replace(/^ +/gi,"").replace(/ +$/gi,"").replace(/ +/gi," ").replace(/\\/gi,"").replace(/\[/gi,"").replace(/\(/gi,"").replace(/\./gi,".").replace(/\?/gi,"");if((siw.autoShow||userInput&&(userInput!=""))&&(userInput!='"')){runMatchingLogic(userInput)}else{siw.matchCollection=null}}}function getSmartInputBoxContent(){a=null;if(siw&&siw.matchCollection&&(siw.matchCollection.length>0)){a="";for(i=0;i<siw.matchCollection.length;i++){selectedString=siw.matchCollection[i].isSelected?" selectedSmartInputItem":"";a+='<p class="matchedSmartInputItem'+selectedString+'">'+siw.matchCollection[i].value.replace(/\{ */gi,"&lt;").replace(/\} */gi,"&gt;")+"</p>"}}return a}function modifySmartInputBoxContent(b){siw.floaterContent.innerHTML='<div id="smartInputResults">'+b+(siw.showCredit?('<p class="siwCredit">Powered By: <a target="PhrawgBlog" href="http://chrisholland.blogspot.com/?from=smartinput&ref='+escape(location.href)+'">Chris Holland</a></p>'):"")+"</div>";siw.matchListDisplay=document.getElementById("smartInputResults")}function selectFromMouseOver(b){currentIndex=getCurrentlySelectedSmartInputItem();if(currentIndex!=null){deSelectSmartInputMatchItem(currentIndex)}newIndex=getIndexFromElement(b);selectSmartInputMatchItem(newIndex);modifySmartInputBoxContent(getSmartInputBoxContent())}function selectFromMouseClick(){siw.inputBox.focus();activateCurrentSmartInputMatch();hideSmartInputFloater()}function getIndexFromElement(b){index=0;while(b=b.previousSibling){index++}return index}function getCurrentlySelectedSmartInputItem(){answer=null;for(i=0;((i<siw.matchCollection.length)&&!answer);i++){if(siw.matchCollection[i].isSelected){answer=i}}return answer}function selectSmartInputMatchItem(b){siw.matchCollection[b].isSelected=true}function deSelectSmartInputMatchItem(b){siw.matchCollection[b].isSelected=false}function selectNextSmartInputMatchItem(){currentIndex=getCurrentlySelectedSmartInputItem();if(currentIndex!=null){deSelectSmartInputMatchItem(currentIndex);if((currentIndex+1)<siw.matchCollection.length){selectSmartInputMatchItem(currentIndex+1)}else{selectSmartInputMatchItem(0)}}else{selectSmartInputMatchItem(0)}modifySmartInputBoxContent(getSmartInputBoxContent())}function selectPreviousSmartInputMatchItem(){currentIndex=getCurrentlySelectedSmartInputItem();if(currentIndex!=null){deSelectSmartInputMatchItem(currentIndex);if((currentIndex-1)>=0){selectSmartInputMatchItem(currentIndex-1)}else{selectSmartInputMatchItem(siw.matchCollection.length-1)}}else{selectSmartInputMatchItem(siw.matchCollection.length-1)}modifySmartInputBoxContent(getSmartInputBoxContent())}function activateCurrentSmartInputMatch(){baseValue=getUserInputBase();if((selIndex=getCurrentlySelectedSmartInputItem())!=null){addedValue=siw.matchCollection[selIndex].cleanValue;theString=(baseValue?baseValue:"")+addedValue;if(isCommaDelimiter){theString=theString+", "}siw.inputBox.value=theString;runMatchingLogic(addedValue,true)}}function smartInputWindow(){this.customFloater=false;this.floater=document.getElementById("smartInputFloater");this.floaterContent=document.getElementById("smartInputFloaterContent");this.selectedSmartInputItem=null;this.MAX_MATCHES=15;this.isGecko=(navigator.userAgent.indexOf("Gecko/200")!=-1);this.isSafari=(navigator.userAgent.indexOf("Safari")!=-1);this.isWinIE=((navigator.userAgent.indexOf("Win")!=-1)&&(navigator.userAgent.indexOf("MSIE")!=-1));this.showCredit=false}function registerSmartInputListeners(){inputs=document.getElementsByTagName("input");texts=document.getElementsByTagName("textarea");allinputs=new Array();z=0;y=0;while(inputs[z]){allinputs[z]=inputs[z];z++}while(texts[y]){allinputs[z]=texts[y];z++;y++}for(i=0;i<allinputs.length;i++){if((c=allinputs[i].className)&&(c=="wickEnabled")){allinputs[i].setAttribute("autocomplete","OFF");allinputs[i].onfocus=handleFocus;allinputs[i].onblur=handleBlur;allinputs[i].onkeydown=handleKeyDown;allinputs[i].onkeyup=handleKeyPress}}}siw=null;if(document.addEventListener){document.addEventListener("keydown",handleKeyDown,false);document.addEventListener("keyup",handleKeyPress,false);document.addEventListener("mouseup",handleClick,false);document.addEventListener("mouseover",handleMouseOver,false)}else{document.onkeydown=handleKeyDown;document.onkeyup=handleKeyPress;document.onmouseup=handleClick;document.onmouseover=handleMouseOver}window.addEventListener?window.addEventListener("load",registerSmartInputListeners,false):window.attachEvent("onload",registerSmartInputListeners);document.write('<table id="smartInputFloater" class="floater" cellpadding="0" cellspacing="0"><tr><td id="smartInputFloaterContent" nowrap="nowrap"></td></tr></table>');for(x=0;x<collection.length;x++){collection[x]=collection[x].replace(/\,/gi,"")}collectionIndex=new Array();ds="";function debug(b){ds+=(b+"\n")};
var baseDomainURL="http://www.kaboodle.com";var signInMode=false;var showAsPopup=true;var signInCallbacks=new Array();var signUpCallbacks=new Array();var showCancel=true;var referrerUserId=null;var referredThrough=null;var isSSO=false;var partnerSignInUrl=null;var partnerSignUpUrl=null;var srcEleIdG;function showSigninMode(a,b,c){if(!checkIfBrowserSupportCookies()){document.location.href="/ht/html/enableCookies.html";return}srcEleIdG=a;if(isSSO){document.location.href=partnerSignInUrl}else{signInMode=false;changeWidgetMode(false);if(showAsPopup){showWidgetAsPopup(srcEleIdG,b,c)}else{document.getElementById("signInUpWidget").style.display=""}setTextboxFocus()}}function showSignupMode(a,b,c){if(!checkIfBrowserSupportCookies()){document.location.href="/ht/html/enableCookies.html";return}srcEleIdG=a;if(isSSO){document.location.href=partnerSignUpUrl}else{signInMode=true;changeWidgetMode(false);if(showAsPopup){showWidgetAsPopup(srcEleIdG,b,c)}else{document.getElementById("signInUpWidget").style.display=""}setTextboxFocus()}}function changeWidgetMode(a){clearAllFields();clearAllErrors();showHideSignInUp();if(a){setTextboxFocus()}}function showHideSignInUp(){if(showCancel){document.getElementById("signinup_cancel").style.display=""}else{document.getElementById("signinup_cancel").style.display="none"}if(signInMode){document.getElementById("signUpModeBody").style.display="";document.getElementById("signInModeBody").style.display="none";document.getElementById("signUpModeSwitch").style.display="";document.getElementById("signInModeSwitch").style.display="none";signInMode=false}else{document.getElementById("signUpModeBody").style.display="none";document.getElementById("signInModeBody").style.display="";document.getElementById("signUpModeSwitch").style.display="none";document.getElementById("signInModeSwitch").style.display="";signInMode=true}}function clearAllFields(){document.getElementById("si_username").value="";document.getElementById("si_password").value="";if(document.getElementById("si_rememberLogin")){document.getElementById("si_rememberLogin").checked=true}if(document.getElementById("si_addToContest")){document.getElementById("si_addToContest").checked=true}document.getElementById("su_emailAddress").value="";if(document.getElementById("su_userAnswer")){document.getElementById("su_userAnswer").value=""}document.getElementById("su_screenName").value="";document.getElementById("su_password").value="";if(document.getElementById("su_rememberLogin")){document.getElementById("su_rememberLogin").checked=true}if(document.getElementById("su_addToContest")){document.getElementById("su_addToContest").checked=true}document.getElementById("su_birthMonth").value="-1";document.getElementById("su_birthDay").value="-1";document.getElementById("su_birthYear").value="-1"}function clearAllErrors(){document.getElementById("si_username_error").innerHTML="";document.getElementById("si_password_error").innerHTML="";document.getElementById("su_emailAddress_error").innerHTML="";document.getElementById("su_screenName_error").innerHTML="";document.getElementById("su_password_error").innerHTML="";document.getElementById("su_birthYear_error").innerHTML="";if(document.getElementById("su_captchaAnswerHash_error")){document.getElementById("su_captchaAnswerHash_error").innerHTML=""}if(document.getElementById("su_recaptcha_response_field_error")){document.getElementById("su_recaptcha_response_field_error").innerHTML=""}document.getElementById("si_username_error").style.display="none";document.getElementById("si_password_error").style.display="none";document.getElementById("su_emailAddress_error").style.display="none";if(document.getElementById("su_captchaAnswerHash_error")){document.getElementById("su_captchaAnswerHash_error").style.display="none"}if(document.getElementById("su_recaptcha_response_field_error")){document.getElementById("su_recaptcha_response_field_error").style.display="none"}document.getElementById("su_screenName_error").style.display="none";document.getElementById("su_password_error").style.display="none";document.getElementById("su_birthYear_error").style.display="none";document.getElementById("signupSubmitBtn").disabled=false;document.getElementById("signinSubmitBtn").disabled=false}function showWidgetAsPopup(a,c,d){var b=document.getElementById("signInUpWidget").innerHTML;if(b==""){b=document.getElementById("popUpContent").innerHTML}document.getElementById("signInUpWidget").innerHTML="";showPopupAboveRight(document.getElementById(a),450,650,b,false,c,d)}function clearWidgetPopup(){clearAllFields();clearAllErrors();var a=document.getElementById("popUpContent").innerHTML;document.getElementById("popUpContent").innerHTML="";document.getElementById("signInUpWidget").innerHTML=a;hideElement("popUpDiv")}function setTextboxFocus(){try{if(signInMode){document.getElementById("si_username").focus()}else{document.getElementById("su_emailAddress").focus()}}catch(a){}}function signInUpSubmit(){var c=new Array();var b=new Object();if(signInMode){c=signInCallbacks;document.getElementById("signinSubmitBtn").disabled=true;b.action="signin";b.username=document.getElementById("si_username").value;b.password=document.getElementById("si_password").value;if(document.getElementById("si_rememberLogin")){b.rememberLogin=true}if(document.getElementById("si_addToContest")){b.addToContest=document.getElementById("si_addToContest").checked}}else{c=signUpCallbacks;document.getElementById("signupSubmitBtn").disabled=true;b.action="signup";b.emailAddress=document.getElementById("su_emailAddress").value;b.screenName=document.getElementById("su_screenName").value;b.password=document.getElementById("su_password").value;b.birthMonth=document.getElementById("su_birthMonth").value;b.birthDate=document.getElementById("su_birthDay").value;b.birthYear=document.getElementById("su_birthYear").value;b.rs=document.getElementById("su_rs").value;if(typeof Recaptcha!="undefined"){b.recaptcha_challenge_field=Recaptcha.get_challenge();b.recaptcha_response_field=Recaptcha.get_response()}if(document.getElementById("su_rememberLogin")){b.rememberLogin=true}if(document.getElementById("su_addToContest")){b.addToContest=document.getElementById("su_addToContest").checked}if(referrerUserId!=null){b.referrerUserId=referrerUserId}if(referredThrough!=null){b.referredThrough=referredThrough}if(document.getElementById("existingUserId")!=null){b.existingUserId=document.getElementById("existingUserId").value}}var a=new Object();a.signInMode=signInMode;if(c.length>0){a.callbacks=c}formSubmitAJAX(baseDomainURL+"/za/signInUp",b,"signInUpSubmitCallback",a)}function signInUpSubmitCallback(results,callbackParams){clearAllErrors();var validationError=results.getElementsByTagName("validationError");if(validationError.length==0){signInUpCancel();if(typeof callbackParams.callbacks!="undefined"){for(var i=0;i<callbackParams.callbacks.length;i++){eval(callbackParams.callbacks[i])(results)}}else{document.location.href=baseDomainURL+"/my"}}else{var errorPrefix="";if(callbackParams.signInMode){errorPrefix="si_"}else{errorPrefix="su_"}for(var i=0;i<validationError.length;i++){var errorDiv=document.getElementById(errorPrefix+validationError[i].attributes[0].nodeValue+"_error");errorDiv.style.display="";errorDiv.innerHTML=validationError[i].firstChild.nodeValue}Recaptcha.reload()}}function signInUpCancel(a){if(showAsPopup){clearWidgetPopup()}else{document.getElementById("signInUpWidget").style.display="none"}}function getSignInUpBody(c,a){var b=new Object();if(typeof c!="undefined"){b.holderEleId=c;b.callBackFn=a}formSubmitAJAX(baseDomainURL+"/zd/signInUpBody",new Array(),"getSignInUpBodyCallback",b)}function getSignInUpBodyCallback(results,callbackParams){var resultHTML=results.getElementsByTagName("resultHTML");if(resultHTML[0].firstChild){var innerHtml="";for(var i=0;i<resultHTML[0].childNodes.length;i++){innerHtml+=resultHTML[0].childNodes[i].nodeValue}if(typeof callbackParams.holderEleId!="undefined"){document.getElementById(callbackParams.holderEleId).innerHTML=innerHtml}else{var conDiv=document.createElement("div");conDiv.innerHTML=innerHtml;document.getElementsByTagName("body")[0].appendChild(conDiv)}var evalscriptNode=results.getElementsByTagName("evalscript")[0];var evalscript=evalscriptNode.firstChild.nodeValue;loadRecaptcha(evalscript);if(typeof callbackParams.callBackFn!="undefined"){eval(callbackParams.callBackFn)()}}}function loadRecaptcha(a){Recaptcha.create(a,"recaptcha-widget",{theme:"custom",custom_theme_widget:"recaptcha-widget",lang:"en"})}function signInUpKeyUp(a){if(a.keyCode==13){signInUpSubmit()}}function addSignInCallback(b,a){if(typeof a!="undefined"&&a){signInCallbacks=new Array()}signInCallbacks[signInCallbacks.length]=b}function addSignUpCallback(b,a){if(typeof a!="undefined"&&a){signUpCallbacks=new Array()}signUpCallbacks[signUpCallbacks.length]=b}function showBDayHelpPopup(){var a=document.getElementById("bday_popup").innerHTML;showPopupAboveRight(document.getElementById("bDayHelpLinkId"),350,180,a,false,-250,0,"popUpBDayDiv","popUpBDayContent")};

