function sb_getNextPage(b){var c=new Object();c.action="nextSbPage";var a=new Object();formSubmitAJAX(b,c,"getResultsCallback",a,true)}function getResultsCallback(b,a){var c=b.getElementsByTagName("styleboards");document.getElementById("navContainer").innerHTML=generateAJAXResponseHTML(c[0].childNodes)}function loadNavigator(b){var c=new Object();c.action="loadNavigator";var a=new Object();formSubmitAJAX(b,c,"loadNavigatorCallback",a,true)}function loadNavigatorCallback(b,a){var c=b.getElementsByTagName("styleboards");document.getElementById("navContainer").innerHTML=generateAJAXResponseHTML(c[0].childNodes);if(typeof b.getElementsByTagName("nextSbUrl")!="undefined"){nextSbUrl=b.getElementsByTagName("nextSbUrl")[0].firstChild.nodeValue}if(typeof b.getElementsByTagName("prevSbUrl")!="undefined"){prevSbUrl=b.getElementsByTagName("prevSbUrl")[0].firstChild.nodeValue}}var nextSbUrl=null;var prevSbUrl=null;var iNextReadyCount=0;var nextTimeDelay=200;function navigateNextStyleboard(a){if(nextSbUrl!=null||iNextReadyCount*nextTimeDelay>8000){if(nextSbUrl=="''"||nextSbUrl==null){if(a=="teen"){nextSbUrl="/za/styleboard-gallery"}else{if(a=="spring"){nextSbUrl="/spring-styleboard-gallery"}else{if(a=="summer"){nextSbUrl="/summer-styleboard-gallery"}else{if(a=="backtoschool"){nextSbUrl="/backtoschool-styleboard-gallery"}else{if(a=="backtoclassics"){nextSbUrl="/fabulousbasics-styleboard-gallery"}else{if(a=="howidwearit"){nextSbUrl="/howidwearit-styleboard-gallery"}else{nextSbUrl="/styleboards"}}}}}}}window.location.href=nextSbUrl;return}if(iNextReadyCount==0){document.getElementById("nextSbId").parentNode.innerHTML='<img src="http://cn3.kaboodle.com/ht/img/page/spinning.gif?v=r0_56_0_128"/>'}iNextReadyCount++;setTimeout("navigateNextStyleboard('"+a+"')",200)}function navigatePrevStyleboard(a){if(prevSbUrl!=null||iNextReadyCount*nextTimeDelay>8000){if(prevSbUrl=="''"||prevSbUrl==null){if(a=="teen"){prevSbUrl="/za/styleboard-gallery"}else{if(a=="spring"){prevSbUrl="/spring-styleboard-gallery"}else{if(a=="summer"){prevSbUrl="/summer-styleboard-gallery"}else{if(a=="backtoschool"){prevSbUrl="/backtoschool-styleboard-gallery"}else{if(a=="backtoclassics"){prevSbUrl="/fabulousbasics-styleboard-gallery"}else{if(a=="howidwearit"){nextSbUrl="/howidwearit-styleboard-gallery"}else{prevSbUrl="/styleboards"}}}}}}}window.location.href=prevSbUrl;return}if(iNextReadyCount==0){document.getElementById("prevSbId").parentNode.innerHTML='<img src="http://cn3.kaboodle.com/ht/img/page/spinning.gif?v=r0_56_0_128"/>'}iNextReadyCount++;setTimeout("navigatePrevStyleboard('"+a+"')",200)}function getCatalogItemDetails(a,c,b){var f=new Object();f.id=c;f.divId="collageImage";f.index=b;f.parentChannel=s.channel;var g=new Object();g.index=b;g.divId="collageImage";var e=document.getElementById("collageImage");var d='<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>';showPopupAboveRight(e,600,550,d,false,-400,20,"popUpItemDiv","popUpItemContent");formSubmitAJAX("/za/catalogItemPopup?p_ret="+a,f,"getCatalogItemDetailsCallback",g)}function getCatalogItemDetailsCallback(e,c){var f=document.getElementById(c.divId);if(e.firstChild){var b="";for(var d=0;d<e.childNodes.length;d++){b+=e.childNodes[d].nodeValue}}var a=showAndReturnPopupAboveRight(f,600,550,b,false,-400,20,"popUpItemDiv","popUpItemContent")}function getStyleboardWidget(){var b=document.getElementById("grabWidgetCode");var a=document.getElementById("getWidgetCodeCon").innerHTML;showAndReturnPopupAboveRight(b,350,150,a,false,-290,140)}function categoryChanged(a){if(a!=""){window.location.href=a}}function raterCallBack(){document.getElementById("commentTextPopup").value="";var c=document.getElementById("addCommentPopupCon").innerHTML;if(c!=""){var b=document.getElementById("sbRater");var a=document.getElementById("addCommentPopupCon").innerHTML;document.getElementById("addCommentPopupCon").innerHTML="";showAndReturnPopupAboveRight(b,450,220,a,false,-450,20)}}function sb_commentAddedCallbackFromPopup(a){resetPopupDiv();if(trim(a)!=""){sb_commentAddedCallback(a)}}function resetPopupDiv(){hideElement("popUpDiv");document.getElementById("addCommentPopupCon").innerHTML=document.getElementById("popUpContent").innerHTML;document.getElementById("popUpContent").innerHTML=""}function highlight(b,a){b.className="sb-item-border"}function hideSelection(a){a.className=""}function repositionRects(b){var d=document.getElementById("collageImage");if(d==null){return}var e=findPosY(d);var a=findPosX(d);var c=document.getElementById("img_ele_"+b);if(c){c.style.left=(a+parseInt(c.style.left))+"px";c.style.top=(e+parseInt(c.style.top))+"px";repositionRects(b+1)}}function fbs_click(a){window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(a),"sharer","toolbar=0,status=0,width=626,height=436")}function msp_click(c,d,b,a){var e="http://www.myspace.com/index.cfm?fuseaction=postto&t="+encodeURIComponent(c)+"&c="+encodeURIComponent(d)+"&u="+encodeURIComponent(b)+"&l="+a;window.open(e)}function deleteSb(){var a=confirm("Are you sure you want to delete this Styleboard?");if(a){formSubmit("sbform_id",{sb_frm_action:"deleteSb"})}};