var carousel={current:0,structures:new Array(),init:function(){if($$("div.img_content_box").length>1){$$("div.img_content_box").each(function(a){if(!a.hasClassName("current")){a.hide()}});$$("#thumbs a").each(function(a){carousel.structures[carousel.current]=a.id;a.number=carousel.current++;Element.observe(a,"click",function(b){b.stop(b);carousel.hideAll();carousel.current=a.number;$("carousel_img_"+this.id.substr(14,this.id.length-14)).show();$("top_home_1").innerHTML=$("category_carousel_img_"+this.id.substr(14,this.id.length-14)).innerHTML})});carousel.current=0;new PeriodicalExecuter(carousel.next,5)}},next:function(){if(++carousel.current>carousel.structures.length-1){carousel.current=0}carousel.hideAll();$("carousel_img_"+carousel.structures[carousel.current].substr(14,carousel.structures[carousel.current].length-14)).show();$("top_home_1").innerHTML=$("category_carousel_img_"+carousel.structures[carousel.current].substr(14,carousel.structures[carousel.current].length-14)).innerHTML},hideAll:function(){$$("div.img_content_box").each(function(a){a.hide()})}};var tabs={init:function(){$$("a.tab_link").each(function(a){Element.observe(a,"click",function(b){$$("a.tab_link").each(function(c){if(c.rel==a.rel){c.ancestors()[0].removeClassName("current")}});a.ancestors()[0].addClassName("current")})})}};document.observe("dom:loaded",function(){$$("a").each(function(a){if(a.rel.split(" ").indexOf("external")>-1){a.target="_blank"}});tabs.init();carousel.init()});function countText(d,a,c){if(d.value.length>c){d.value=d.value.substring(0,c)}var b=document.getElementById(a);b.innerHTML=c-d.value.length+" karakters resterend."};