
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};
function pagiMouseOver(a){a.className="browseNaviLinkselected"}function pagiMouseOut(a){a.className="browseNaviLink"};
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};
function getCatalogItem(f,d,g,a,b){var e=new Object();e.id=f;e.divId=g;e.index=d;e.inSection=b;e.parentChannel=s.channel;var i=new Object();i.index=d;i.divId=g;i.inSection=b;i.parentChannel=s.channel;var c=document.getElementById(g);var h='<div style="background: #fff; height: 350px; width: 560px; border: 1px solid #DEDEDE; padding: 20px;"><img src="http://cn3.kaboodle.com/ht/img/page/spinning.gif?v=r0_56_0_128"/></div>';showAndReturnPopupAboveRight(c,-1,-1,h,false,560,350,"popUpItemDiv","popUpItemContent","true");formSubmitAJAX("/za/catalogItemPopup?p_ret="+a,e,"getCatalogItemCallback",i)}function getCatalogItemCallback(d,b){var e=document.getElementById("itemDiv_"+b.index);if(!e){e=document.getElementById(b.divId)}if(d.firstChild){var a="";for(var c=0;c<d.childNodes.length;c++){a+=d.childNodes[c].nodeValue}}document.getElementById("popUpItemContent").innerHTML=a}function addItem(g,e,h,f,c,a,d,b){if(!isUserLoggedIn){location.href=a}else{addToListPopup(g,e,h,f,c,d,b)}}function signInUpCallback(){window.location.reload()}function addToListPopup(g,e,a,k,h,c,b){var f=new Object();f.id=g;f.index=e;f.divId=h;f.inSection=c;var j=new Object();j.index=e;j.divId=h;j.inSection=c;var i='<img src="http://cn3.kaboodle.com/ht/img/page/spinning.gif?v=r0_56_0_128"/>';if(b!=null&&typeof b!="undefined"){j.srcDivId=b;j.srcHtml=document.getElementById(b).innerHTML;document.getElementById(b).innerHTML=i}var d=document.getElementById(h);formSubmitAJAX("/za/addToListPopup?itemId="+g+"&copyCatalogItem=true&index="+e+"&userHearts="+k+"&divId="+h+"&inSection="+c+"&parentChannel="+s.channel+a,f,"addToListPopupCallback",j,null,null,null,"GET")}function addToListPopupCallback(e,c){var f=document.getElementById("itemDiv_"+c.index);if(!f){f=document.getElementById(c.divId)}if(c.srcDivId!=null&&typeof c.srcDivId!="undefined"){document.getElementById(c.srcDivId).innerHTML=c.srcHtml}if(e.firstChild){var b="";for(var d=0;d<e.childNodes.length-1;d++){b+=e.childNodes[d].nodeValue}}var a=showAndReturnPopupAboveRight(f,-1,-1,b,false,560,350,"popUpItemDiv","popUpItemContent","true")}function addToList(c,d,b,a){var g=new Object();g.index=c;g.divId=b;var f='<img src="http://cn3.kaboodle.com/ht/img/page/spinning.gif?v=r0_56_0_128"/>';if(a!=null&&typeof a!="undefined"){g.srcDivId=a;g.srcHtml=document.getElementById(a).innerHTML;document.getElementById(a).innerHTML=f}var e=document.getElementById(b);htmlFormSubmitAJAX("/za/addToListPopup",d,"addToListCallback",g)}function addToListCallback(e,c){var h=document.getElementById("itemDiv_"+c.index);if(!h){h=document.getElementById(c.divId)}if(c.srcDivId!=null&&typeof c.srcDivId!="undefined"){document.getElementById(c.srcDivId).innerHTML=c.srcHtml}if(e.firstChild){var b="",g="";var f=false;for(var d=0;d<e.childNodes.length;d++){if(e.childNodes[d].nodeName=="error"){f=e.childNodes[d].firstChild.nodeValue}else{if(e.childNodes[d].nodeName=="totalHearts"){g=e.childNodes[d].firstChild.nodeValue}else{b+=e.childNodes[d].nodeValue}}}}if(f){document.getElementById("popUpItemContent").innerHTML=b}else{if(document.getElementById("bts_heart_pr_"+c.index)){document.getElementById("bts_heart_pr_"+c.index).innerHTML=g}var a=showAndReturnPopupAboveRight(h,-1,-1,b,false,-180,-100,"popUpItemDiv","popUpItemContent")}}function showTab(a){for(var b=0;b<2;b++){if(b!=a){hideElement("subtab"+b+"data");var c=document.getElementById("subtab"+b);if(c!=null){c.className=""}}}var c=document.getElementById("subtab"+a);c.className="selected";showElement("subtab"+a+"data")}function hideComments(a){if(a!=null&&a!=""){location.href=a;return}if(document.getElementById("currentCommentsHolder")){hideElement("currentCommentsHolder")}if(document.getElementById("addCommentLink")){showElement("addCommentLink")}}function showComments(){hideElement("addCommentLink");showElement("currentCommentsHolder")};
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}};