// Generated by the Blogger Archive Script Generator // at http://philringnalda.com/scriptgen/ // Based on code by Andy Buchanan from // http://weblog.cheesephone.co.uk/mytemplate.html // User data var defaultlimit = 5; var halflimit = Math.floor( defaultlimit / 2 ); var moreLinksPhrase = "[Show all]"; var fewerLinksPhrase = "[Show fewer]"; var currentPageName = "current"; var currentPageLink = "/"; var archivePath = "/archive/"; var preLink = ""; var postLink = ""; function ArchiveCookie_GetCookie(){ var i = document.cookie.indexOf( this.CookieName + "=" ); if ( -1 != i ){ var e = document.cookie.slice( i ).indexOf( ";" ); this.cookieVal = document.cookie.slice( i+this.CookieName.length+1, (-1 != e)?e:document.cookie.length ); return this.cookieVal; } return null; } function ArchiveCookie_SetCookie( Value ){ var expireDate = new Date(); expireDate.setTime( expireDate.getTime() + this.expireTimeInMs ); var cookietext = this.CookieName + "=" + Value + "; expires=" + expireDate.toGMTString()+"; path=/"; document.cookie = cookietext; this.cookieVal = Value; } function ArchiveCookie_KillCookie(){ var expireDate = new Date(); document.cookie = this.CookieName + "=0" + "; expires=" + expireDate.toGMTString(); this.cookieVal = null; } function ArchiveCookie_GetValue(){ return this.cookieVal; } function ArchiveCookie( theCookieName, theExpireTimeInDays ){ this.CookieName = theCookieName; this.cookieVal = null; this.expireTimeInMs = theExpireTimeInDays * 100 * 60 * 60 * 24; // methods ArchiveCookie.prototype.GetCookie = ArchiveCookie_GetCookie; ArchiveCookie.prototype.SetCookie = ArchiveCookie_SetCookie; ArchiveCookie.prototype.KillCookie = ArchiveCookie_KillCookie; ArchiveCookie.prototype.GetValue = ArchiveCookie_GetValue; } function ArchivePage_MakeLink(){ var month_name = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var newName = preLink + month_name[this.StartDate.getMonth()]+" "+this.StartDate.getFullYear() + postLink; var outString = ""; if ( -1 != location.href.indexOf( this.Link ) ){ outString = "" + newName + "
"; } else{ outString = "" + newName + "
"; } return outString; } function ArchivePage_Compare( rhs ){ if ( this.StartDate == rhs.StartDate ) return 0; else if ( this.StartDate > rhs.StartDate ) return 1; else return -1; } function ArchivePage( theLink, theName ){ this.Link = theLink; this.Name = theName; this.StartDate = new Date( this.Name.slice(6,10), this.Name.slice(0,2)-1, this.Name.slice(3,5) ); this.EndDate = new Date( this.Name.slice(13+6,13+10), this.Name.slice(13+0,13+2)-1, this.Name.slice(13+3,13+5) ); ArchivePage.prototype.MakeLink = ArchivePage_MakeLink; ArchivePage.prototype.Compare = ArchivePage_Compare; } function bi_comp( a, b ){ return -a.Compare( b ); } function ShowAll(){ var cookie = new ArchiveCookie( "LimitArchive", 365 ); cookie.SetCookie( 0 ); location.href = location.href; } function ShowRecent( HowMany ){ var cookie = new ArchiveCookie( "LimitArchive", 365 ); cookie.SetCookie( HowMany ); location.href = location.href; } function FindIdx( myURL ){ for ( var n=0; n BlogInfo.length ) || ( 0 == limit )){ limit = BlogInfo.length; } var start = 0; var end = limit; currentPage = FindIdx(location.href); if ( limit < BlogInfo.length ){ if ( null == currentPage ){ start = 0; end = limit - 1; } else { if ( currentPage < halflimit ){ start = 0; end = limit; } else { if (( currentPage + halflimit ) > ( BlogInfo.length - 1 )){ end = BlogInfo.length; start = currentPage - ( limit - ( BlogInfo.length - 1 - currentPage ) - 1 ); } else { start = currentPage - halflimit; end = currentPage + halflimit + 1; } } } } if ( null != currentPage ){ document.write( "" + currentPageName + "
"); } for ( var n=start; n" + fewerLinksPhrase + "
" ); } else { document.write( "" + moreLinksPhrase + "
" ); } } var count=0; var BlogInfo = new Array(); BlogInfo[count++] = new ArchivePage( "2003_06_01_archindex.shtml" , "June 2003" ); BlogInfo[count++] = new ArchivePage( "2003_07_01_archindex.shtml" , "July 2003" ); BlogInfo[count++] = new ArchivePage( "2003_08_01_archindex.shtml" , "August 2003" ); BlogInfo[count++] = new ArchivePage( "2003_09_01_archindex.shtml" , "September 2003" ); BlogInfo[count++] = new ArchivePage( "2003_10_01_archindex.shtml" , "October 2003" ); BlogInfo[count++] = new ArchivePage( "2003_11_01_archindex.shtml" , "November 2003" ); BlogInfo[count++] = new ArchivePage( "2003_12_01_archindex.shtml" , "December 2003" ); BlogInfo[count++] = new ArchivePage( "2004_01_01_archindex.shtml" , "January 2004" ); BlogInfo[count++] = new ArchivePage( "2004_02_01_archindex.shtml" , "February 2004" ); BlogInfo[count++] = new ArchivePage( "2004_03_01_archindex.shtml" , "March 2004" ); BlogInfo[count++] = new ArchivePage( "2004_04_01_archindex.shtml" , "April 2004" ); BlogInfo[count++] = new ArchivePage( "2004_05_01_archindex.shtml" , "May 2004" ); BlogInfo[count++] = new ArchivePage( "2004_06_01_archindex.shtml" , "June 2004" ); BlogInfo[count++] = new ArchivePage( "2004_07_01_archindex.shtml" , "July 2004" ); BlogInfo[count++] = new ArchivePage( "2004_08_01_archindex.shtml" , "August 2004" ); BlogInfo[count++] = new ArchivePage( "2004_09_01_archindex.shtml" , "September 2004" ); BlogInfo[count++] = new ArchivePage( "2004_10_01_archindex.shtml" , "October 2004" ); BlogInfo[count++] = new ArchivePage( "2004_11_01_archindex.shtml" , "November 2004" ); BlogInfo[count++] = new ArchivePage( "2004_12_01_archindex.shtml" , "December 2004" ); BlogInfo[count++] = new ArchivePage( "2005_01_01_archindex.shtml" , "January 2005" ); BlogInfo[count++] = new ArchivePage( "2005_02_01_archindex.shtml" , "February 2005" ); BlogInfo[count++] = new ArchivePage( "2005_03_01_archindex.shtml" , "March 2005" ); WriteArchiveSection( BlogInfo );