var myObjColl = new Array();
var isBlink = 0
function getElementsByAttribute(attribute, attributeValue)
{
/* Script Smarter: Quality JavaScript from Scratch
   http://www.sitepoint.com/subcat/javascript
   **********************************************/
 var elementArray = new Array();
 var matchedArray = new Array();
 if (document.all) { elementArray = document.all; }
 else { elementArray = document.getElementsByTagName("*"); }
 var i=0;
 for (i=0; i < elementArray.length; i++){
  if (attribute == "class"){
     var pattern = new RegExp("(^| )" + attributeValue + "( |$)");
     if (pattern.test(elementArray[i].className))
     {matchedArray[matchedArray.length] = elementArray[i];}
   }
   else if (attribute == "for")
   {
     if (elementArray[i].getAttribute("htmlFor") || elementArray[i].getAttribute("for"))
     {
       if (elementArray[i].htmlFor == attributeValue)
       {matchedArray[matchedArray.length] = elementArray[i];}
     }
   }
   else if (elementArray[i].getAttribute(attribute) ==
       attributeValue)
   {matchedArray[matchedArray.length] = elementArray[i];}
 }
 return matchedArray;
}
function blink() {
 for (var i = 0, j = myObjColl.length; i < j; i++) {
  if (isBlink==0) {myObjColl[i].style.color = "white";isBlink=1;}
  else {myObjColl[i].style.color = "red";isBlink=0;}
  }
  setTimeout ("blink()",800)
}
function initblink(){
 myObjColl = getElementsByAttribute('class','newgal');
 setTimeout ("blink()",800)
}
