My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Project Information
Members

//<![CDATA[

var bcLoadingImage = ""; var bcLoadingMessage = " Carregando...."; var bcArchiveNavText = "Ver Posts em Arquivos "; var bcArchiveNavPrev = '◄'; var bcArchiveNavNext = '►'; var headDays = ["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]; var headInitial = ["Dom","Seg","Ter","Qua","Qui","Sex","Sab"];

// Nothing to configure past this point ---------------------------------- var timeOffset; var bcBlogID; var calMonth; var calDay = 1; var calYear; var startIndex; var callmth; var bcNav = new Array (); var bcList = new Array ();

//Initialize Fill Array var fill = ["","31","28","31","30","31","30","31","31","30","31","30","31"]; function openStatus(){ document.getElementById('calLoadingStatus').style.display = 'block'; document.getElementById('calendarDisplay').innerHTML = ''; } function closeStatus(){ document.getElementById('calLoadingStatus').style.display = 'none'; } function bcLoadStatus(){ cls = document.getElementById('calLoadingStatus'); img = document.createElement('img'); img.src = bcLoadingImage; img.style.verticalAlign = 'middle'; cls.appendChild(img); txt = document.createTextNode(bcLoadingMessage); cls.appendChild(txt); } function callArchive(mth,yr,nav){ // Check for Leap Years if (((yr % 4 == 0) && (yr % 100 != 0)) || (yr % 400 == 0)) { fill2 = '29'; } else { fill2 = '28'; } calMonth = mth; calYear = yr; if(mth.charAt(0) == 0){ calMonth = mth.substring(1); } callmth = mth; bcNavAll = document.getElementById('bcFootAll'); bcNavPrev = document.getElementById('bcFootPrev'); bcNavNext = document.getElementById('bcFootNext'); bcSelect = document.getElementById('bcSelection'); a = document.createElement('a'); at = document.createTextNode(bcArchiveNavText); a.href = bcNavnav; a.appendChild(at); bcNavAll.innerHTML = ''; bcNavAll.appendChild(a); bcNavPrev.innerHTML = ''; bcNavNext.innerHTML = ''; if(nav < bcNav.length -1){ a = document.createElement('a'); a.innerHTML = bcArchiveNavPrev; bcp = parseInt(nav,10) + 1; a.href = bcNavbcp; a.title = 'Previous Archive'; prevSplit = bcListbcp.split(','); a.onclick = function(){bcSelect.optionsbcp.selected = true;openStatus();callArchive(prevSplit0,prevSplit1,prevSplit2);return false;}; bcNavPrev.appendChild(a); } if(nav > 0){ a = document.createElement('a'); a.innerHTML = bcArchiveNavNext; bcn = parseInt(nav,10) - 1; a.href = bcNavbcn; a.title = 'Next Archive'; nextSplit = bcListbcn.split(','); a.onclick = function(){bcSelect.optionsbcn.selected = true;openStatus();callArchive(nextSplit0,nextSplit1,nextSplit2);return false;}; bcNavNext.appendChild(a); } script = document.createElement('script'); script.src = 'http://www.blogger.com/feeds/'+bcBlogId+'/posts/summary?published-max='+calYear+'-'+callmth+'-'+fillcalMonth+'T23%3A59%3A59'+timeOffset+'&published-min='+calYear+'-'+callmth+'-01T00%3A00%3A00'+timeOffset+'&max-results=100&orderby=published&alt=json-in-script&callback=cReadArchive'; document.getElementsByTagName('head')0.appendChild(script); }

function cReadArchive(root){ // Check for Leap Years if (((calYear % 4 == 0) && (calYear % 100 != 0)) || (calYear % 400 == 0)) { fill2 = '29'; } else { fill2 = '28'; } closeStatus(); document.getElementById('lastRow').style.display = 'none'; calDis = document.getElementById('calendarDisplay'); var feed = root.feed; var total = feed.openSearch$totalResults.$t; var entries = feed.entry || ; var fillDate = new Array(); var fillTitles = new Array(); fillTitles.length = 32; var ul = document.createElement('ul'); ul.id = 'calendarUl'; for (var i = 0; i < feed.entry.length; ++i) { var entry = feed.entryi; for (var j = 0; j < entry.link.length; ++j) { if (entry.linkj.rel == "alternate") { var link = entry.linkj.href; } } var title = entry.title.$t; var author = entry.author0.name.$t; var date = entry.published.$t; var summary = entry.summary.$t; isPublished = date.split('T')0.split('-')2; if(isPublished.charAt(0) == '0'){ isPublished = isPublished.substring(1); } fillDate.push(isPublished); if (fillTitlesisPublished){ fillTitlesisPublished = fillTitlesisPublished + ' | ' + title; } else { fillTitlesisPublished = title; } li = document.createElement('li'); li.style.listType = 'none'; li.innerHTML = ''+title+''; ul.appendChild(li);

} calDis.appendChild(ul); var val1 = parseInt(calDay, 10) var valxx = parseInt(calMonth, 10); var val2 = valxx - 1; var val3 = parseInt(calYear, 10); var firstCalDay = new Date(val3,val2,1); var val0 = firstCalDay.getDay(); startIndex = val0 + 1; var dayCount = 1; for (x =1; x < 38; x++){ var cell = document.getElementById('cell'+x); if( x < startIndex){ cell.innerHTML = ' '; cell.className = 'firstCell'; } if( x >= startIndex){ cell.innerHTML = dayCount; cell.className = 'filledCell'; for(p = 0; p < fillDate.length; p++){ if(dayCount == fillDatep){ if(fillDatep.length == 1){ fillURL = '0'+fillDatep; } else { fillURL = fillDatep; } cell.className = 'highlightCell'; cell.innerHTML = ''; } } if( dayCount > fillvalxx){ cell.innerHTML = ' '; cell.className = 'emptyCell'; } dayCount++; } } visTotal = parseInt(startIndex) + parseInt(fillvalxx) -1; if(visTotal >35){ document.getElementById('lastRow').style.display = ''; } }

function initCal(){ document.getElementById('blogger_calendar').style.display = 'block'; var bcInit = document.getElementById('bloggerCalendarList').getElementsByTagName('a'); var bcCount = document.getElementById('bloggerCalendarList').getElementsByTagName('li'); document.getElementById('bloggerCalendarList').style.display = 'none'; calHead = document.getElementById('bcHead'); tr = document.createElement('tr'); for(t = 0; t < 7; t++){ th = document.createElement('th'); th.abbr = headDayst; scope = 'col'; th.title = headDayst; th.innerHTML = headInitialt; tr.appendChild(th); } calHead.appendChild(tr); for (x = 0; x <bcInit.length;x++){ var stripYear= bcInitx.href.split('')0.split('/')3; var stripMonth = bcInitx.href.split('')1; bcList.push(stripMonth + ','+ stripYear + ',' + x); bcNav.push(bcInitx.href); } var sel = document.createElement('select'); sel.id = 'bcSelection'; sel.onchange = function(){var cSend = this.options[this.selectedIndex].value.split(',');openStatus();callArchive(cSend0,cSend1,cSend2);}; q = 0; for (r = 0; r <bcList.length; r++){ var selText = bcInitr.innerHTML; var selCount = bcCountr.innerHTML.split('> (')1; var selValue = bcListr; sel.optionsq = new Option(selText + ' ('+selCount,selValue); q++ } document.getElementById('bcaption').appendChild(sel); var m = bcList0.split(',')0; var y = bcList0.split(',')1; callArchive(m,y,'0'); }

function timezoneSet(root){ var feed = root.feed; var updated = feed.updated.$t; var id = feed.id.$t; bcBlogId = id.split('blog-')1; upLength = updated.length; if(updated.charAt(upLength-1) == "Z"){timeOffset = "+00:00";} else {timeOffset = updated.substring(upLength-6,upLength);} timeOffset = encodeURIComponent(timeOffset); } //]]>

Powered by Google Project Hosting