All pastes #202483 Raw Edit

Untitled

public text v1 · immutable
#202483 ·published 2006-10-14 15:17 UTC
rendered paste body
;I first have this body onload to call this function ->
<body>
; this is the script.
<script>
  var onloads = new Array();
  function bodyOnLoad() {
      new Rico.Effect.Round( null, 'roundNormal' );
      new Rico.Effect.Round( null, 'roundCompact', {compact:true} );
      for ( var i = 0 ; i < onloads.length ; i++ )
        onloads[i]();
  }
  showMenuContext()
;Then I have to include a JS file which contains an onload function as well, here is is

var browser = navigator.appName;
window.onload = function () {
  bodyOnLoad();
  var edits = document.getElementsByTagName("INPUT")
  for (i=0;i<edits.length;i++) {
      if (edits[i].type == 'text') {
        if (edits[i].value) edits[i].className = 'editunselectedwithtext'
        else edits[i].className = 'editunselected'
        if(browser == "Microsoft Internet Explorer") edits[i].attachEvent("onblur", editblur)
        else edits[i].addEventListener("blur", editblur, false)
        if(browser == "Microsoft Internet Explorer") edits[i].attachEvent("onfocus", editfocus)
        else edits[i].addEventListener("focus", editfocus, false)
      }
  }
  var edits = document.getElementsByTagName("TEXTAREA")
  for (i=0;i<edits.length;i++) {
      edits[i].className = 'editunselected'
      if(browser == "Microsoft Internet Explorer") edits[i].attachEvent("onblur", editblur)
      else edits[i].addEventListener("blur", editblur, false)
      if(browser == "Microsoft Internet Explorer") edits[i].attachEvent("onfocus", editfocus)
      else edits[i].addEventListener("focus", editfocus, false)
  }
}
</script>