// 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 = "http://www.petsonthego.com/blogger/blogger.html"; var archivePath = ""; 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 newName = preLink + (this.StartDate.getMonth()+1)+"."+this.StartDate.getDate()+"."+this.StartDate.getFullYear()+"-"+(this.EndDate.getMonth()+1)+"."+this.EndDate.getDate()+"."+this.EndDate.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_05_18_arch.html" , "05/18/2003 - 05/24/2003" ); BlogInfo[count++] = new ArchivePage( "2003_06_01_arch.html" , "06/01/2003 - 06/07/2003" ); BlogInfo[count++] = new ArchivePage( "2003_06_08_arch.html" , "06/08/2003 - 06/14/2003" ); BlogInfo[count++] = new ArchivePage( "2003_06_15_arch.html" , "06/15/2003 - 06/21/2003" ); BlogInfo[count++] = new ArchivePage( "2003_06_22_arch.html" , "06/22/2003 - 06/28/2003" ); BlogInfo[count++] = new ArchivePage( "2003_06_29_arch.html" , "06/29/2003 - 07/05/2003" ); BlogInfo[count++] = new ArchivePage( "2003_07_13_arch.html" , "07/13/2003 - 07/19/2003" ); BlogInfo[count++] = new ArchivePage( "2003_07_20_arch.html" , "07/20/2003 - 07/26/2003" ); BlogInfo[count++] = new ArchivePage( "2003_07_27_arch.html" , "07/27/2003 - 08/02/2003" ); BlogInfo[count++] = new ArchivePage( "2003_08_03_arch.html" , "08/03/2003 - 08/09/2003" ); BlogInfo[count++] = new ArchivePage( "2003_08_10_arch.html" , "08/10/2003 - 08/16/2003" ); BlogInfo[count++] = new ArchivePage( "2003_08_17_arch.html" , "08/17/2003 - 08/23/2003" ); BlogInfo[count++] = new ArchivePage( "2003_09_07_arch.html" , "09/07/2003 - 09/13/2003" ); BlogInfo[count++] = new ArchivePage( "2003_09_14_arch.html" , "09/14/2003 - 09/20/2003" ); BlogInfo[count++] = new ArchivePage( "2003_09_21_arch.html" , "09/21/2003 - 09/27/2003" ); BlogInfo[count++] = new ArchivePage( "2003_11_02_arch.html" , "11/02/2003 - 11/08/2003" ); BlogInfo[count++] = new ArchivePage( "2003_11_30_arch.html" , "11/30/2003 - 12/06/2003" ); BlogInfo[count++] = new ArchivePage( "2003_12_07_arch.html" , "12/07/2003 - 12/13/2003" ); BlogInfo[count++] = new ArchivePage( "2003_12_14_arch.html" , "12/14/2003 - 12/20/2003" ); BlogInfo[count++] = new ArchivePage( "2004_02_08_arch.html" , "02/08/2004 - 02/14/2004" ); BlogInfo[count++] = new ArchivePage( "2004_03_28_arch.html" , "03/28/2004 - 04/03/2004" ); BlogInfo[count++] = new ArchivePage( "2004_04_04_arch.html" , "04/04/2004 - 04/10/2004" ); BlogInfo[count++] = new ArchivePage( "2004_05_02_arch.html" , "05/02/2004 - 05/08/2004" ); BlogInfo[count++] = new ArchivePage( "2004_05_16_arch.html" , "05/16/2004 - 05/22/2004" ); WriteArchiveSection( BlogInfo );