var enabletabpersistence=1;var tabcontentIDs=new Object();function expandcontent(a){var d=a.parentNode.parentNode.id;var b=document.getElementById(d).getElementsByTagName("li");for(var c=0;c<b.length;c++){b[c].className="";if(typeof tabcontentIDs[d][c]!="undefined"){document.getElementById(tabcontentIDs[d][c]).style.display="none"}}a.parentNode.className="selected";document.getElementById(a.getAttribute("rel")).style.display="block";saveselectedtabcontentid(d,a.getAttribute("rel"))}function expandtab(c,b){var a=document.getElementById(c).getElementsByTagName("a")[b];if(a.getAttribute("rel")){expandcontent(a)}}function savetabcontentids(b,a){if(typeof tabcontentIDs[b]=="undefined"){tabcontentIDs[b]=new Array()}tabcontentIDs[b][tabcontentIDs[b].length]=a}function saveselectedtabcontentid(b,a){if(enabletabpersistence==1){setCookie(b,a)}}function getullistlinkbyId(c,d){var a=document.getElementById(c).getElementsByTagName("li");for(var b=0;b<a.length;b++){if(a[b].getElementsByTagName("a")[0].getAttribute("rel")==d){return a[b].getElementsByTagName("a")[0];break}}}function initializetabcontent(){for(var d=0;d<arguments.length;d++){if(enabletabpersistence==0&&getCookie(arguments[d])!=""){setCookie(arguments[d],"")}var g=getCookie(arguments[d]);var c=document.getElementById(arguments[d]);var e=c.getElementsByTagName("li");for(var b=0;b<e.length;b++){var f=e[b].getElementsByTagName("a")[0];if(f.getAttribute("rel")){savetabcontentids(arguments[d],f.getAttribute("rel"));f.onclick=function(){expandcontent(this);return false};if(e[b].className=="selected"&&g==""){expandcontent(f)}}}if(g!=""){var a=getullistlinkbyId(arguments[d],g);if(typeof a!="undefined"){expandcontent(a)}else{expandcontent(e[0].getElementsByTagName("a")[0])}}}}function getCookie(a){var b=new RegExp(a+"=[^;]+","i");if(document.cookie.match(b)){return document.cookie.match(b)[0].split("=")[1]}return""}function setCookie(a,b){document.cookie=a+"="+b};