//'+ ''+ ''+ ''+ '
'+ '' + '' + obj.name.substr(0,this.li_name_size) + ': '+ obj.description.substr(0,this.li_description_size) + '
'+ ''; alink = document.createElement("a"); alink.href="#"; alink.className="em"; alink.onclick = function(){widgetSilkfairStore827_5865.widgetShowItem(idx);return false;} alink.innerHTML = strOut; return alink; } this.widgetDrawItems = function(){ if(this.Items.length <= this.itemsToShow) { i = 0; to = this.Items.length; } else { i = this.currentItem; if ((this.currentItem + this.itemsToShow) <= this.Items.length){ to = this.currentItem + this.itemsToShow; }else{ to = this.Items.length; } } document.getElementById(this.el_items_list).innerHTML = ""; for (i;i<=to;i++){ obj = this.Items[i]; strOut = this.widgetDrawItem(i); document.getElementById(this.el_items_list).appendChild(strOut); } } this.widgetShowItem = function(idx){ this.thumbHighlight(idx); container = document.getElementById(this.el_image_preview); str_image = ""; container.innerHTML = str_image; document.getElementById(this.el_widget_item_name).innerHTML = this.Items[idx].name.substr(0, this.item_name_size); document.getElementById(this.el_widget_item_description).innerHTML = this.Items[idx].description.substr(0, this.item_description_size); document.getElementById(this.el_item_price).innerHTML = this.Items[idx].price; document.getElementById(this.el_item_link).href = this.storeDomain + "/" + this.Items[idx].id; } this.widgetShowNullItem = function(){ container = document.getElementById(this.el_image_preview); str_image = ""; container.innerHTML = str_image; document.getElementById(this.el_widget_item_name).innerHTML = "All About The Buttons".substr(0, this.store_name_size); document.getElementById(this.el_items_list).innerHTML = "Anything and everything can be made better with the addition of buttons! Clocks, knitted & crocheted items, pins, barrettes, magnets and more are improved when embellished with buttons.".substr(0, this.store_description_size); } this.thumbHighlight = function(idx){ if(this.Items.length <= this.itemsToShow) { i = 0; to = this.Items.length; } else { i = this.currentItem; to = this.currentItem + this.itemsToShow; } for (i;i<=to;i++){ obj = this.Items[i] if ( document.getElementById(this.el_thumb_prefix + i) ){ document.getElementById(this.el_thumb_prefix + i).className = "wg_thumb"; } } document.getElementById(this.el_thumb_prefix + idx).className = "wg_thumb_high"; } // Default html : version = 1 this.widgetDrawHtml = function(){ strOut = '
' + '' + '' + '' + '' + '' + '' + '
avatarAll About The Buttons
' + '
' + '' + '' + '
' + '
' + '
' + '
' + '
' + '' + '' + '' + '
Click for details
' + '
' + '
' + '' + '' + '' + '' + '
'; if ( document.getElementById("widget_preview") ){ document.getElementById("widget_preview").innerHTML = strOut; }else{ document.write(strOut); } } this.drawCssLink = function(){ var objCss=document.createElement('link'); objCss.rel='stylesheet'; objCss.type='text/css'; objCss.href='http://silkfair.com/widget/style.css?827_5865'; objCss.media='all'; document.lastChild.firstChild.appendChild(objCss); } this.widgetDrawWidget = function(){ this.setupElements(); if (document.getElementById(this.el_container)!= undefined){ return false; } this.drawCssLink(); this.widgetDrawHtml(); this.widgetDrawItems(); if(this.Items.length >= 0){ this.widgetShowItem(this.currentItem); }else{ this.widgetShowNullItem(); } } }//widgetSilkfairStore Class widgetSilkfairStore827_5865 = new widgetSilkfairStore(); widgetSilkfairStore827_5865.suffix = "827_5865"; widgetSilkfairStore827_5865.item_name_size = 25; widgetSilkfairStore827_5865.item_description_size = 30; widgetSilkfairStore827_5865.li_name_size = 12; widgetSilkfairStore827_5865.li_description_size = 24; widgetSilkfairStore827_5865.widgetDrawWidget(); // google-analytics var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); gaTracker = function(){ if (typeof(_gat) == "object"){ var pageTracker = _gat._getTracker("UA-3580677-1"); pageTracker._initData(); pageTracker._trackPageview(); } } gaTracker(); //]]>