var BcStyle = ''; var BcPopUp = '
'; var clicky_str = " "; var BcWidget = '
'; document.write(clicky_str); document.write(BcStyle); document.write(BcWidget); function BClear(i){ if(i.value == 'Search This Blog'){ i.value = ''; i.style.color = '#000'} } function BCshowSearch(){ BCcloseSearch(); var blog_id = document.BcSearchWidget.blog_id.value; var q = document.BcSearchWidget.q.value; var arrayPageSize = getPageSize(); var posLeft = ((arrayPageSize[0]-738)/2); posLeft = posLeft < 0 ? 0 : posLeft; var posTop = ((arrayPageSize[3] - 500)/2)+getPageScroll()[1]; posTop = posTop < 0 ? 0 : posTop; var BcOverlay = document.createElement("div"); BcOverlay.setAttribute('id','BCoverlay'); BcOverlay.style.height = arrayPageSize[1]+'px'; document.body.appendChild(BcOverlay); var BcContainer = document.createElement('div'); BcContainer.setAttribute('id','bcW'); document.body.appendChild(BcContainer); BcContainer.innerHTML = BcPopUp; BcContainer.style.left = posLeft+'px'; BcContainer.style.top = posTop+'px'; var BcI = document.getElementById('bcI'); BcI.src = 'http://www.blogcatalog.com/widget/doSearch/?blog_id='+blog_id+'&type=blog&q='+q; } function BCcloseSearch(){ var BcW = document.getElementById('bcW'); if(BcW) { var overlay = document.getElementById('BCoverlay'); overlay.parentNode.removeChild(overlay); BcW.parentNode.removeChild(BcW); } } // --------------------------------------------------- function getPageSize(){ var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { // all except Explorer windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = windowWidth; } else { pageWidth = xScroll; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight); return arrayPageSize; } function getPageScroll(){ var yScroll; if (self.pageYOffset) { yScroll = self.pageYOffset; } else if (document.documentElement && document.documentElement.scrollTop){ yScroll = document.documentElement.scrollTop; } else if (document.body) { yScroll = document.body.scrollTop; } arrayPageScroll = new Array('',yScroll); return arrayPageScroll; }