function getElementsByClass(searchClass,tagName) {
 var classElements = new Array();
 if ( tagName == null )
  tagName = '*';
 var els = document.getElementsByTagName(tagName);
 var elsLen = els.length;
 var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)");
 for (i = 0, j = 0; i < elsLen; i++) {
  if ( pattern.test(els[i].className) ) {
   classElements[j] = els[i];
   j++;
  }
 } 
 return classElements;
}
 
function ccMarquee(className){
 var a=getElementsByClass(className);
 for (i = 0; i < a.length; i++) {
  a[i].innerHTML="<marquee scrollamount='2' scrolldelay='10' behavior='alternate' direction='left' onMouseOver=this.stop() onMouseOut=this.start()>"+ a[i].innerHTML+"</marquee>";
 }
}window.onload = function () {
 ccMarquee("ccMarquee");
}
