function setCheckboxGroup( $_groupName , $_value )
{
	$elems = document.getElementsByTagName( 'label' );

	if( !$elems )
		return;

	for( $i = 0 ; $i < $elems.length; $i++ )
	{
		$elem = $elems[ $i ];

		if( $_groupName != $elem.getAttribute( 'name' ) )
			continue;

		$elem = $elem.childNodes[ 0 ];

		$elem.setAttribute( 'checked' , ( $_value ? 'checked' : '' ) );

		if( !$_value )
			$elem.removeAttribute( 'checked' );
	}
}

function initRolloversCSS() {
	if (!document.getElementById) return
	
	var aPreLoad = new Array();
	var sTempSrc;
	var aImages = document.getElementsByTagName('input');

	for (var i = 0; i < aImages.length; i++) {		
		if (aImages[i].className == 'imgoverCSS') {
			var src = aImages[i].style.backgroundImage;
			var ftype = src.substring(src.lastIndexOf('.'), src.length);
			var hsrc = src.replace(ftype, '_o'+ftype);

			aImages[i].setAttribute('hsrc', hsrc);

			var loadSrc = hsrc;
			loadSrc = loadSrc.replace( 'url(' , '' );
			loadSrc = loadSrc.replace( ')' , '' );
			loadSrc = loadSrc.replace( "'" , '' );
			loadSrc = loadSrc.replace( "'" , '' );
			loadSrc = loadSrc.replace( '"' , '' );
			loadSrc = loadSrc.replace( '"' , '' );
			
			aPreLoad[i] = new Image();
			aPreLoad[i].src = loadSrc;
			
			aImages[i].onmouseover = function() {
				sTempSrc = this.style.backgroundImage;
				this.style.backgroundImage = this.getAttribute('hsrc');
			}	
			
			aImages[i].onmouseout = function() {
				if (!sTempSrc) sTempSrc = this.style.backgroundImage.replace('_o'+ftype, ftype);
				this.style.backgroundImage = sTempSrc;
			}
		}
	}

	initRollovers();
}

window.onload = initRolloversCSS;

