function getStyle(oElm, strCssRule){
	var strValue = "";
	if(document.defaultView && document.defaultView.getComputedStyle){
		strValue = document.defaultView.getComputedStyle(oElm, "").getPropertyValue(strCssRule);
	}
	else if(oElm.currentStyle){
		strCssRule = strCssRule.replace(/-(w)/g, function (strMatch, p1){
			return p1.toUpperCase();
		});
		strValue = oElm.currentStyle[strCssRule];
	}
	return strValue;
}

//returns an array of elements that match full or partial (indexOf) classname
function ElementsByClass(rootElement,ElementClass,ElementType,partialMatch){        
            ElementType=ElementType?ElementType:'*';
			
			var elementsArray=new Array();			
            var theElements=rootElement.getElementsByTagName(ElementType);                  			

            for (var x=0;x<theElements.length;x++){			
				      if(partialMatch){
					       if (theElements[x].className.indexOf(ElementClass)>-1){ 
							    elementsArray[elementsArray.length]=theElements[x];
						    }
					  }else{
	                        if (theElements[x].className==ElementClass){ 
							    elementsArray[elementsArray.length]=theElements[x];
						    }
					  }
				}                          

	            return elementsArray;
	}
