// 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 = "/10links/"; var archivePath = "/10links/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("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"); 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( "2001_11_01_index.html" , "11/01/2001 - 11/30/2001" ); BlogInfo[count++] = new ArchivePage( "2001_12_01_index.html" , "12/01/2001 - 12/31/2001" ); BlogInfo[count++] = new ArchivePage( "2002_01_01_index.html" , "01/01/2002 - 01/31/2002" ); BlogInfo[count++] = new ArchivePage( "2002_03_01_index.html" , "03/01/2002 - 03/31/2002" ); BlogInfo[count++] = new ArchivePage( "2002_06_01_index.html" , "06/01/2002 - 06/30/2002" ); BlogInfo[count++] = new ArchivePage( "2002_07_01_index.html" , "07/01/2002 - 07/31/2002" ); BlogInfo[count++] = new ArchivePage( "2002_08_01_index.html" , "08/01/2002 - 08/31/2002" ); BlogInfo[count++] = new ArchivePage( "2002_09_01_index.html" , "09/01/2002 - 09/30/2002" ); BlogInfo[count++] = new ArchivePage( "2002_10_01_index.html" , "10/01/2002 - 10/31/2002" ); BlogInfo[count++] = new ArchivePage( "2002_11_01_index.html" , "11/01/2002 - 11/30/2002" ); BlogInfo[count++] = new ArchivePage( "2003_01_01_index.html" , "01/01/2003 - 01/31/2003" ); BlogInfo[count++] = new ArchivePage( "2003_02_01_index.html" , "02/01/2003 - 02/28/2003" ); WriteArchiveSection( BlogInfo );