<!--// <![CDATA[
// Ad Muncher helper script: do not remove without removing all references to this in the below page (eg: everything containing "Yzy" or "Yzb")
// Original URL:   http://www.dynamicdrive.com/dynamicindex17/tabcontent/tabcontent.js
// Retrieved from: 64.71.154.130:80
function YzyWdn(){return false;};
function YzybHelp(a,b){YzyWgp(a);YzyWbn();return;};
function Yzyb(a,b,c,d){YzyWgp(a);YzyWbn();return YzyWfw(b);};
function YzyWpp(a){YzyWppa=a;if(a)YzyWorgsti("YzyWppa=0;",500);};
function YzybtePopup(a,b,c,d,e,f){YzyWgp();YzyWbn();return YzyWfw();};
function YzybModalDialog(a,b,c){YzyWgp(a);YzyWbn();return YzyWfw();};
function YzyWj(){if(YzyWolp){YzyWqn=YzyWqnbu;YzyWolp=0;};return true;};
function YzybModelessDialog(a,b,c){YzyWgp(a);YzyWbn();return YzyWfw();};
function YzyWpl(a,b,c){while(a.indexOf(b)!=-1)a=a.replace(b,c);return a;};
function YzyWtry(a,z){if(YzyWtryk())eval("try{"+a+"}catch(e){};");else eval(a);};
function Yzyc(){YzyWqn=YzyWqnbu=10;YzyWorgsti("YzyWqn=YzyWqnbu=0;",500);return;};
function YzyWfcs(z){YzyWfcsr=0;if(z){YzyWfcsrz=z;YzyWtry("YzyWfcsr=YzyWfcsd();");};return YzyWfcsr;};
function YzyWfc(a,z){for(var i=0;i<a.length;i++)if(a[i].name==z||YzyWfc(a[i].frames,z))return 1;return 0;};
function Yzb(z){if(typeof(z.location)!="undefined"||typeof(z.blur)=="undefined")return false;return z.blur();};
function Yzyf(z){if(typeof(z.location)!="undefined"||typeof(z.focus)=="undefined")return false;return z.focus();};
function YzyWHelp(a,b){if(YzyWck(a))return;if(YzyWqn)YzyWqn-=1;if(b)return showHelp(a,b);else return showHelp(a);};
function YzyTimeout(a,b){if(((!YzyWqn&&!YzyWa)||YzyWppa||YzyWul)&&typeof(a)=="string")return YzyWorgsti("YzyWpp(1);"+a+";YzyWpp(0);",b);return YzyWorgsti(a,b);};
function YzyInterval(a,b){if(((!YzyWqn&&!YzyWa)||YzyWppa||YzyWul)&&typeof(a)=="string")return YzyWorgsin("YzyWpp(1);"+a+";YzyWpp(0);",b);return YzyWorgsin(a,b);};
function YzyWbn(){if(YzyWd&&YzyWm){if(YzyWb){YzyWc="s";YzyWb+=", "+YzyWm;}else{YzyWc="";YzyWb=YzyWm;};YzyWi="Popup"+YzyWc+" on page blocked by Ad Muncher: "+YzyWb;YzyWu();};};
function YzyWox(){var x;if(typeof(YzyWffad)!="undefined"&&!YzyWffadd){if(YzyWkou)YzyWul=1;YzyWffadd=1;if(typeof(YzyWffad)=="function")x=YzyWffad();else eval(YzyWffad);YzyWul=0;};return x;};
function YzyWModalDialog(a,b,c){if(YzyWck(a,b))return YzyWfw();if(YzyWqn)YzyWqn-=1;if(c)return showModalDialog(a,b,c);else if(b)return showModalDialog(a,b);else return showModalDialog(a);};
function YzyWs(a){if((typeof(a.target)!="undefined"&&typeof(a.action)!="undefined"&&a.target&&YzyWnw(a.target)&&YzyWck(a.action))||typeof(a.submit)=="undefined")return false;return a.submit();};
function YzyWt(a){if((YzyWqn||YzyWa)&&!YzyWppa&&!YzyWul){if(YzyWqn)YzyWqn-=1;return alert(a);};if(a&&YzyWd){YzyWi="Alert message blocked by Ad Muncher: "+YzyWpl(a,"\n"," ");YzyWu();};return false;};
function YzyWModelessDialog(a,b,c){if(YzyWck(a,b))return YzyWfw();if(YzyWqn)YzyWqn-=1;if(c)return showModelessDialog(a,b,c);else if(b)return showModelessDialog(a,b);else return showModelessDialog(a);};
function YzyWsp(a,z){if(a.split)return a.split(z);var j,c,s,n,b,e;j=b=0;c=on.length;s=new Array();a+=z;n=a.length;while(b<n){e=z?a.indexOf(z,b):b+1;s[j++]=a.substring(b,e);b=e+c;};return s.length=j,s;};
function YzyWu(a){YzyWi=YzyWpl(YzyWpl(YzyWi.substring(0,1024),'"',"<~am~`"),"<~am~`",'\\"');YzyWir='defaultStatus="'+YzyWi+'";';if(!YzyWss){YzyWss=1;YzyWorgsin("eval(YzyWir);",3000);};YzyWorgsti("eval(YzyWir);",1000);};
function YzyWe(){YzyWa=0;YzyWqnbu=YzyWqn;YzyWqn=0;YzyWolp=1;YzyWorgsti("YzyWa=1;",1000);if(typeof(YzyWff)!="undefined"&&!YzyWffd){YzyWffd=1;if(typeof(YzyWff)=="function")YzyWff();else eval(YzyWff);};YzyWqn=YzyWqnbu;YzyWolp=0;YzyWx();};
function YzyWnw(a){YzyWagt=navigator.userAgent.toLowerCase();if(a!="_self"&&a!="_top"&&a!="_main"&&a!="_parent"&&!YzyWfcs(a)&&((YzyWagt.indexOf("msie")==-1||YzyWagt.indexOf("opera")!=-1)||(a!="_search"&&a!="_media")))return 1;return 0;};
function YzyWobx(){var x;if(typeof(YzyWffreunload)!="undefined"&&!YzyWffreunloadd){if(YzyWkou)YzyWul=1;YzyWffreunloadd=1;if(typeof(YzyWffreunload)=="function")x=YzyWffreunload();else eval(YzyWffreunload);YzyWffreunloadd=0;YzyWul=0;};return x;};
function YzyWtryk(){var b=navigator.userAgent.toLowerCase();var c=parseInt(navigator.appVersion);if((b.indexOf("mozilla")!=-1&&b.indexOf("compatible")== -1&&c>=5)||(b.indexOf("opera")!=-1&&c>=6)||(b.indexOf("msie")!=-1&&c>=4))return 1;return 0;};
function YzyWfcsd(){var v=self;if(YzyWfc(v.frames,YzyWfcsrz)||(typeof(v.name)!="undefined"&&v.name==YzyWfcsrz))return 1;while(v!=v.parent){v=v.parent;if(YzyWfc(v.frames,YzyWfcsrz)||(typeof(v.name)!="undefined"&&v.name==YzyWfcsrz))return 1;};return 0;};
function YzyWtePopup(a,b,c,d,e,f){if(YzyWck())return YzyWfw();if(YzyWqn)YzyWqn-=1;if(f)return createPopup(a,b,c,d,e,f);else if(e)return createPopup(a,b,c,d,e);else if(d)return createPopup(a,b,c,d);else if(c)return createPopup(a,b,c);else if(b)return createPopup(a,b);else return createPopup(a);};
function YzyWmc(){if(typeof(document.layers)!="undefined")document.captureEvents(Event.KeyDown|Event.MouseUp|Event.Blur|Event.KeyPress|Event.Move|Event.Click|Event.KeyUp|Event.Reset|Event.Change|Event.Load|Event.Resize|Event.DblClick|Event.MouseDown|Event.Select|Event.DragDrop|Event.MouseMove|Event.Submit|Event.Error|Event.MouseOut|Event.Unload|Event.Focus|Event.MouseOver);document.onmousedown=YzyWr;return 0;};
function YzyWck(a,b){if(!YzyWul&&!YzyWppa&&(YzyWro||YzyWqn||YzyWa||(b&&!YzyWnw(b)))){return 0;};YzyWgp(a);var l,s,c;for(i in YzyWpmx){l=0;s=YzyWsp(YzyWpmx[i],"*");for(z in s){c=YzyWn.indexOf(s[z],l);if(c==-1){l=0;break;};l=c;};if(l)return 0;};YzyWbn();if(YzyWrp){YzyWrpi5=YzyWrpi4;YzyWrpi4=YzyWrpi3;YzyWrpi3=YzyWrpi2;YzyWrpi2=YzyWrpi1;YzyWrpi1=new Image();var YzyWzn;YzyWtry("YzyWzn=document.referrer");YzyWrpi1.src="http://www.admuncher.com/cgi-bin/pr.pl?p="+escape(YzyWm)+"&s="+escape(document.location.href)+"&r="+escape(YzyWzn)+"&v=4.6.10270";};return 1;};
function YzyWr(e){if((e&&e.which==1)||(typeof(window.event)!="undefined"&&window.event.button==1)){YzyWqn=YzyWqnbu=10;YzyWorgsti("YzyWqn=YzyWqnbu=0;",500);if(typeof(document.YzyWusedown)!="undefined"){if(typeof(document.YzyWusedown)=="function")return document.YzyWusedown(e);else return eval(document.YzyWusedown);};};if(typeof(document.YzyWusedown)!="undefined"){if(e||typeof(window.event)!="undefined"){if(typeof(document.YzyWusedown)=="function"){YzyWpp(0);var YzyWtn=document.YzyWusedown(e);YzyWpp(1);return YzyWtn;}else return eval("YzyWpp(1);"+document.YzyWusedown+";YzyWpp(0);");};if(typeof(document.YzyWusedown)=="function")return document.YzyWusedown(e);else return eval(document.YzyWusedown);};return true;};
function YzyWx(){YzyWtry('if(typeof(window.onload)=="undefined")window.onload=YzyWe;else{YzyWq=""+window.onload;if(!window.onload||!YzyWq||YzyWq.indexOf("YzyWe")!=-1)window.onload=YzyWe;};if(typeof(window.onunload)=="undefined")window.onunload=YzyWox;else{YzyWq=""+window.onunload;if(!window.onunload||!YzyWq||YzyWq.indexOf("YzyWox")!=-1)window.onunload=YzyWox;};if(typeof(window.onbeforeunload)=="undefined")window.onbeforeunload=YzyWobx;else{YzyWq=""+window.onbeforeunload;if(!window.onbeforeunload||!YzyWq||YzyWq.indexOf("YzyWobx")!=-1)window.onbeforeunload=YzyWobx;};if(typeof(window.onmousedown)=="undefined")YzyWmc();else{YzyWq=""+document.onmousedown;if(!window.onmousedown||!YzyWq||YzyWq.indexOf("YzyWr")!=-1){YzyWmc();};};');};
function YzyWgp(a){if(a){var YzyWckjs=/[A-Za-z]+:/;if(a.search(YzyWckjs)!=-1){if(a.substring(0,5).toLowerCase()!="http:"){YzyWm="(No URL)";YzyWn=a.toLowerCase()+" "+document.URL.toLowerCase();return;};};YzyWp="/admuncherpopcheck&"+Math.random()+"&"+document.URL;YzyWmi3=YzyWmi2;YzyWmi2=YzyWmi1;YzyWmi1=new Image();YzyWn=a;YzyWnn=YzyWn.indexOf("#");if(YzyWnn!=-1)YzyWn=YzyWn.substring(0,YzyWnn);YzyWmi1.src=YzyWn+YzyWp;YzyWnn=YzyWmi1.src.indexOf(YzyWp);if(YzyWnn!=-1)YzyWm=YzyWmi1.src.substring(0,YzyWnn);YzyWn=YzyWm.toLowerCase()+" "+document.URL.toLowerCase();}else{YzyWm="(No URL)";YzyWn=document.URL.toLowerCase();YzyWp="/admuncherpopchecknourl&"+Math.random();YzyWmi3=YzyWmi2;YzyWmi2=YzyWmi1;YzyWmi1=new Image();YzyWmi1.src=document.URL+YzyWp;};};
function YzyW(a,b,c,d){if(YzyWck(a,b))return YzyWfw(b);if(YzyWqn)YzyWqn-=1;if(!a)a="";if(c){c=YzyWpl(c.toLowerCase()," ","");if(YzyWw){c=YzyWpl(c,"height=","xxx=");c=YzyWpl(c,"width=","xxx=");c=YzyWpl(c,"top=","xxx=");c=YzyWpl(c,"left=","xxx=");c=YzyWpl(c,"screenx=","xxx=");c=YzyWpl(c,"screeny=","xxx=");};if(YzyWy){c=YzyWpl(c,"location=","xxx=");c=YzyWpl(c,"toolbar=","xxx=");c=YzyWpl(c,"menubar=","xxx=");c=YzyWpl(c,"resizable=","xxx=");c=YzyWpl(c,"scrollbars=","xxx=");c=YzyWpl(c,"status=","xxx=");c=YzyWpl(c,"titlebar=","xxx=");c=YzyWpl(c,"fullscreen=","xxx=");c=YzyWpl(c,"directories=","xxx=");};};if(YzyWy){if(c)c+=",";else c="";c+="location,toolbar,menubar,resizable,scrollbars,status,titlebar,directories";};if(d)return YzyWorgo(a,b,c,d);else if(c)return YzyWorgo(a,b,c);else if(b)return YzyWorgo(a,b);else return YzyWorgo(a);};
function YzyWso(c,a){if(typeof(YzyWsod[c])=="undefined"||!YzyWsod[c]){YzyWsod[c]=1;var x=new Array('quot22','amp26','lt3C','gt3E','nbspA0','iexclA1','centA2','poundA3','yenA5','brvbarA6','sectA7','umlA8','copyA9','ordfAA','laquoAB','notAC','shyAD','regAE','macrAF','degB0','plusmnB1','sup2B2','sup3B3','acuteB4','microB5','paraB6','middotB7','cedilB8','sup1B9','ordmBA','raquoBB','frac14BC','frac12BD','frac34BE','iquestBF','AgraveC0','AacuteC1','AcircC2','AtildeC3','AumlC4','AringC5','AEligC6','CcedilC7','EgraveC8','EacuteC9','EcircCA','EumlCB','IgraveCC','IacuteCD','IcircCE','IumlCF','ETHD0','NtildeD1','OgraveD2','OacuteD3','OcircD4','OtildeD5','OumlD6','timesD7','OslashD8','UgraveD9','UacuteDA','UcircDB','UumlDC','YacuteDD','THORNDE','szligDF','agraveE0','aacuteE1','acircE2','atildeE3','aumlE4','aringE5','aeligE6','ccedilE7','egraveE8','eacuteE9','ecircEA','eumlEB','igraveEC','iacuteED','icircEE','iumlEF','ethF0','ntildeF1','ograveF2','oacuteF3','ocircF4','otildeF5','oumlF6','divideF7','oslashF8','ugraveF9','uacuteFA','ucircFB','uumlFC','yacuteFD','thornFE','yumlFF');var l,m;for(i in x){l=x[i].length;m="&"+x[i].substring(0,(l-2))+";";a=YzyWpl(a,m,unescape("%"+x[i].substring((l-2),l)));};if(c==1)YzyWff=new Function(a);if(c==2)YzyWffad=new Function(a);if(c==3)YzyWffreunload=new Function(a);};};
function YzyWfw(b){var r=new Object();for(i in window)r[i]=window[i];var v=new Array("scrollBy","getSelection","scrollByLines","scrollByPages","sizeToContent","dump","setTimeout","setInterval","clearTimeout","clearInterval","setResizable","captureEvents","releaseEvents","routeEvent","enableExternalCapture","disableExternalCapture","prompt","open","openDialog","find","alert","confirm","focus","blur","back","forward","home","stop","print","moveTo","moveBy","resizeTo","resizeBy","scroll","close","show","updateCommands","escape","unescape","atob","btoa","addEventListener","removeEventListener","dispatchEvent","getComputedStyle");for(i in v)r[v[i]]=YzyWdn;v=new Array("captureEvents","close","open","releaseEvents","clear","writeln","getElementById","getElementsByName","elementFromPoint","createEvent","getSelection","write","createElement","createElementNS","createDocumentFragment","createTextNode","createComment","createAttribute","getElementsByTagName","importNode","attachEvent","detachEvent","hasAttributes","addEventListener","removeEventListener","dispatchEvent","contains","insertBefore","replaceChild","removeChild","appendChild","hasChildNodes","isSupported","normalize","cloneNode");r.document=new Object();for(i in v)r.document[v[i]]=YzyWdn;r.document.body=new Object();r.document.body.style=new Object();r.name=b;r.amwin="a";r.location=new Object(YzyWm);r.location.href=YzyWm;r.location.hash=window.location.hash;r.location.host=window.location.host;r.location.hostname=window.location.hostname;r.location.pathname=window.location.pathname;r.location.port=window.location.port;r.location.protocol=window.location.protocol;r.location.search=window.location.search;YzyWclct+=1;eval("YzyWpc["+YzyWclct+"]=r;YzyWorgsti(\"YzyWpc["+YzyWclct+"].closed=true;\",1500);");return r;};
var YzyWa,YzyWb,YzyWc,YzyWd,YzyWi,YzyWir,YzyWk,YzyWm,YzyWmi1,YzyWmi2,YzyWmi3,YzyWn,YzyWnn,YzyWp,YzyWq,YzyWss,YzyWv,YzyWw,YzyWy,YzyWro,YzyWolp,YzyWqn,YzyWqnbu,YzyWplt,YzyWagt,YzyWtz,YzyWti,YzyWsa,YzyWeb,YzyWrp,YzyWrpi1,YzyWrpi2,YzyWrpi3,YzyWrpi4,YzyWrpi5,YzyWppa,YzyWffd,YzyWorg,YzyWorgo,YzyWorgsin,YzyWorgsti,YzyWul,YzyWkou,YzyWffreunloadd,YzyWffadd,YzyWfcsr,YzyWfcsrz;var YzyWsod=new Array();for(var YzyWvin="";YzyWvin!="aaaaaaaaaaaaaaaaaaaa";YzyWvin+="a")eval("var AdMch"+YzyWvin+";");var YzyWclct=0;var YzyWpc=new Array();YzyWk=1;YzyWd=1;YzyWw=0;YzyWy=0;YzyWro=0;YzyWi="";YzyWtz=0;YzyWti=0;YzyWrp=0;YzyWkou=1;var YzyWpmx=new Array('&root=playsite.','-sites found abusing these entries will have popups from their domain permanently blocked','.aol.com/aimexpress','.bcn-hj.com','.cnn.com/pr/video/','.com/gp/*.asp*packageid=','.download.com','.feedroom.com','.ferrari.it/','.hotmail.*/error_','.humanclick.com','.liveperson.com','.liveperson.net','.mail.com/templates/common/','.miniusa.co*/load_','.passport.net/panehelp.','.sonnylandreth.com/*frames','.vs3.com','.yahoo.com/webmsgr/','//bricks.coupons.com/bricks.','//briefcase.yahoo.com/','//clinic.mcafee.com','//colapt.','//download.com','//download.microsoft.com/download','//download.wildtangent.com/','//elearning.*/serve','//faq.*/faqwin.*id=','//go.icq.com','//groups.msn.com/*openpopup=1','//im.match.com/index','//launch*/player/','//mediaframe.*/launch','//mymail.','//notes.*/mymessages/','//popper.callwave.','//profiles.yahoo.com/','//radio.launch.yahoo.','//telecharger.*htm','//vod.','/board/im.php?action=','/detail_newtrades.','/dlstandard.html?filename=','/download_filehell.pl?hellid=','/errpasswd.*?login','/esel*/systemupdate.','/exchange/*command=','/game_module.*gpid=','/getswf.php?swfurl=','/helppane.asp?','/im_info_console.','/im_launch.','/imconsole.','/immediate/alertmsg.asp?id=','/index.tbapp?error=','/installflashprompt.','/instant_message_view.','/launcher.cgi?channel=','/mail/popup.php?display=','/mailpop.','/messanger.asp?action=','/msg/*name=','/openforum.','/openmsg.','/pc-vod/*streamid=','/pge_login.*=','/phpmyadmin/','/picview.asp?','/prelogin.','/private.php?s=','/privmsg.php?','/profile*name=','/qdmrun.shtml','/quiz.php?quizname=','/realone_detect.','/register/register.jsp?','/sis_initial.html','/site/olspage.jsp?id=','/thumbnail.php?src=','/torrent/download.','/tv_popup.htm','/viewer.cfm?*pid=','330.ca/index.','3dluvr.co*/wip/','?msgid=','aami.com*/entry.jsp?','abcnews.go.com/*game','activision.*/bumper/*goto=','aroskins.com*/default','artrev_gallery.php?','azet.sk/fpost','b-one.nu/price.do?','bank.co.uk/coop','bbs/messanger?action=','bbs/messenger?action=','benchbee.co.kr/speedtest/','blackcode.com/scan/','blogger.com/*login','bmwgroup.com/*action=','board*?act=msg','bolt.com/*profile=','bouncesheets.com/flash_detect.','brinkster.com/eahlunatik/index','cbibs.co.uk/coop','cnn.com/*/change.pop/','coorslight.com/flash.','crackinfo.net/up/files/','ddcomputerz.com/auctions/','dpreview.com*/engine.','ekwador.*/ekwador.','error.*&error','extra-koblenz.d*/index.','ezsweeps.com/updatesweeps.','fiv.sp.co.gg','flipviewer.com/download/','formido.nl/formido.','forum*/private','forum*?act=msg','game/flashtest.','georgiasatellites.co*/homeframe.','gravenbooks.co*/home.','greatest-posters.com/*ebay','heavy.com*/intro.','helicon.co.il/main.','hellfest.com/hellfest','hitweb.info/download.asp','icq.com/icqgo/','instantservice.com/servlet/customer','jb.od.ua/fff/','liquidgeneration.com/fullscreen.','load.*clip_id=','lycos.*/havemsg.','machadocicala.com.ar*/inicio.html','mail.*/control/','mansonusa.com/chat','match.com/mims/','microsoft.com/*frame.asp','mixthepix.com/index','mybboard.com/emailchk','myfamily.com/exec?','myway.com/compose_','nachtwerk.de/frameset.','nikon-coolpix.com/index','nonags.com/files/redirect/','novapal.com/*.pdf','ntileech*/popup*=*=','oldgames-fr.com/redirect.php?url=','otnemem.com/','paysafecard.com/psccustomer','planet3dnow.de/cgi-bin/file/get.pl','pogo.com/*frameset.jsp?','programmierzentrum-luftwaffe.de/index','quikorder.com/scripts','recipeland.com/login.','rowohlt.de/start/','sidestep.com*/dynamicload/','skinbase.org/files/','snogard.*/cart.','sonyericsson.com/spg.jsp?','sonypictures.com/*main.','sourceforge.*?download','stb.org.b*/fset-eng.','stemro.co*/main.','tantrabar.com.au/tantra','telugudvd.com/shopexd.','terminator3.com/main.','turnto10.com/video/','vic.edu/academics','vollversion.de/download*id=','wapsilon.com/*.cgi','weather.com/weather/alerts/','windowsupdate.microsoft','worldwinner.co*/play.','worthplaying.com/thumbnail.php?','xbox.*/opendoa','yahoo.com/*/pagebuilder/','zdnet.com');if(!YzyWorg){YzyWorg=1;YzyWorgo=open;YzyWorgsti=setTimeout;YzyWorgsin=setInterval;};YzyWx();if(YzyWk)YzyWtry("window.onerror=YzyWj;");var YzyWz;YzyWtry("YzyWz=document.referrer");if(!YzyWz){if(YzyWti){if(YzyWtz)YzyWz=location.protocol+"//"+location.host+"/";else YzyWz="http://www.admuncher.com/";};}else if(YzyWz.substring(0,7)=="http://"){YzyWsa=YzyWz;YzyWsa=YzyWsa.substring(7,1024);if(YzyWsa.indexOf("/")!=-1)YzyWsa=YzyWsa.substring(0,YzyWsa.indexOf("/"));if(YzyWsa!=location.host){if(YzyWtz)YzyWz=location.protocol+"//"+location.host+"/";else YzyWz="http://www.admuncher.com/";};};
// ]]>> --></script>



//** Tab Content script- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
//** Last updated: Nov 8th, 06

var enabletabpersistence=1 //enable tab persistence via session only cookies, so selected tab is remembered?

////NO NEED TO EDIT BELOW////////////////////////
var tabcontentIDs=new Object()

function expandcontent(linkobj){
var ulid=linkobj.parentNode.parentNode.id //id of UL element
var ullist=document.getElementById(ulid).getElementsByTagName("li") //get list of LIs corresponding to the tab contents
for (var i=0; i<ullist.length; i++){
ullist[i].className=""  //deselect all tabs
if (typeof tabcontentIDs[ulid][i]!="undefined") //if tab content within this array index exists (exception: More tabs than there are tab contents)
document.getElementById(tabcontentIDs[ulid][i]).style.display="none" //hide all tab contents
}
linkobj.parentNode.className="selected"  //highlight currently clicked on tab
document.getElementById(linkobj.getAttribute("rel")).style.display="block" //expand corresponding tab content
saveselectedtabcontentid(ulid, linkobj.getAttribute("rel"))
}

function expandtab(tabcontentid, tabnumber){ //interface for selecting a tab (plus expand corresponding content)
var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
if (thetab.getAttribute("rel"))
expandcontent(thetab)
}

function savetabcontentids(ulid, relattribute){// save ids of tab content divs
if (typeof tabcontentIDs[ulid]=="undefined") //if this array doesn't exist yet
tabcontentIDs[ulid]=new Array()
tabcontentIDs[ulid][tabcontentIDs[ulid].length]=relattribute
}

function saveselectedtabcontentid(ulid, selectedtabid){ //set id of clicked on tab as selected tab id & enter into cookie
if (enabletabpersistence==1) //if persistence feature turned on
setCookie(ulid, selectedtabid)
}

function getullistlinkbyId(ulid, tabcontentid){ //returns a tab link based on the ID of the associated tab content
var ullist=document.getElementById(ulid).getElementsByTagName("li")
for (var i=0; i<ullist.length; i++){
if (ullist[i].getElementsByTagName("a")[0].getAttribute("rel")==tabcontentid){
return ullist[i].getElementsByTagName("a")[0]
break
}
}
}

function initializetabcontent(){
for (var i=0; i<arguments.length; i++){ //loop through passed UL ids
if (enabletabpersistence==0 && getCookie(arguments[i])!="") //clean up cookie if persist=off
setCookie(arguments[i], "")
var clickedontab=getCookie(arguments[i]) //retrieve ID of last clicked on tab from cookie, if any
var ulobj=document.getElementById(arguments[i])
var ulist=ulobj.getElementsByTagName("li") //array containing the LI elements within UL
for (var x=0; x<ulist.length; x++){ //loop through each LI element
var ulistlink=ulist[x].getElementsByTagName("a")[0]
if (ulistlink.getAttribute("rel")){
savetabcontentids(arguments[i], ulistlink.getAttribute("rel")) //save id of each tab content as loop runs
ulistlink.onclick=function(){
expandcontent(this)
return false
}
if (ulist[x].className=="selected" && clickedontab=="") //if a tab is set to be selected by default
expandcontent(ulistlink) //auto load currenly selected tab content
}
} //end inner for loop
if (clickedontab!=""){ //if a tab has been previously clicked on per the cookie value
var culistlink=getullistlinkbyId(arguments[i], clickedontab)
if (typeof culistlink!="undefined") //if match found between tabcontent id and rel attribute value
expandcontent(culistlink) //auto load currenly selected tab content
else //else if no match found between tabcontent id and rel attribute value (cookie mis-association)
expandcontent(ulist[0].getElementsByTagName("a")[0]) //just auto load first tab instead
}
} //end outer for loop
}


function getCookie(Name){ 
var re=new RegExp(Name+"=[^;]+", "i"); //construct RE to search for target name/value pair
if (document.cookie.match(re)) //if cookie found
return document.cookie.match(re)[0].split("=")[1] //return its value
return ""
}

function setCookie(name, value){
document.cookie = name+"="+value //cookie value is domain wide (path=/)
}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        