// search-text // event handler function addEventToObject(obj,evt,func) { var oldhandler = obj[evt]; obj[evt] = (typeof obj[evt] != 'function') ? func : function(){oldhandler();func();}; } // search box stuff var Searchbox = { init : function() { var sBox = document.getElementById('search-text'); if (sBox) { addEventToObject(sBox,'onclick',Searchbox.click); addEventToObject(sBox,'onblur',Searchbox.blur); } }, click : function() { var sBox = document.getElementById('search-text'); if (sBox.value == 'Search the Blog') { sBox.value = ''; } }, blur : function() { var sBox = document.getElementById('search-text'); if (sBox.value == '' || sBox.value == ' ') {sBox.value = 'Search the Blog';} } }; // add event onload addEventToObject(window,'onload',Searchbox.init); // following function borrowed from ÖììÓ(zx.asd), Z-Blog function ExportUbbFrame() { if(!objActive){objActive="txaArticle"}; // document.write("

") document.write("") document.write("',''),true);\" style=\"padding:2px;cursor:pointer;\">strong, ") document.write("',''),true);\" style=\"padding:2px;cursor:pointer;\">em, ") document.write("',''),true);\" style=\"padding:2px;cursor:pointer;\">code, ") document.write("',''),true);\" style=\"padding:2px;cursor:pointer;\">blockquote, ") document.write("',''),true);\" style=\"padding:2px;cursor:pointer;\">del") document.write("") // document.write(""+str06+" ") } var objActive; function GetActiveText(objHTML) { objActive=objHTML; if(document.selection){ var obj=document.getElementById(objHTML); obj.currPos = document.selection.createRange().duplicate() } } function InsertText(objHTML,strText,bolReplace) { if(strText==""){return("")} var obj=document.getElementById(objHTML); if(document.selection){ if (obj.currPos){ if(bolReplace && (obj.value=="")){ obj.currPos.text=strText } else{ obj.currPos.text+=strText } } else{ obj.value+=strText } } else{ if(bolReplace){ obj.value=obj.value.slice(0,obj.selectionStart) + strText + obj.value.slice(obj.selectionEnd,obj.value.length) } else{ obj.value=obj.value.slice(0,obj.selectionStart) + strText + obj.value.slice(obj.selectionStart,obj.value.length) } } //obj.focus(); } function ReplaceText(objHTML,strPrevious,strNext) { var obj=document.getElementById(objHTML); var strText; if(document.selection && document.selection.type == "Text"){ if (obj.currPos){ var range = document.selection.createRange(); range.text = strPrevious + range.text + strNext; return(""); } else{ strText=strPrevious + strNext; return(strText); } } else{ if(obj.selectionStart || obj.selectionEnd){ strText=strPrevious + obj.value.slice(obj.selectionStart,obj.selectionEnd) + strNext; return(strText); } else{ strText=strPrevious + strNext; return(strText); } } }