function setStyle(objectId, newStyleName) 
{
   

 var style = null;
   found = false;
   if( navigator.userAgent.indexOf("MSIE")==-1 ){
      for( var i=0; i < document.styleSheets[0].cssRules.length & found==false; i++ ){
         cssText = document.styleSheets[0].cssRules[i].cssText.toString();
         if( cssText.indexOf(newStyleName) != -1 ){
               style = document.styleSheets[0].cssRules[i].style;
                 found=true;
         }    
      }
   }
   else{
   for( var i=0; i < document.styleSheets[0].rules.length & found==false; i++ ){
         cssText = document.styleSheets[0].rules[i].selectorText;
         if( cssText.indexOf(newStyleName) != -1 ){
               style = document.styleSheets[0].rules[i].style;
               found=true;
         }
      }
   }
   var object = document.getElementById(objectId)
   object.style.background = style.background;
   object.style.color = style.color;
}




