function isEmpty( inputStr ) { if ( null == inputStr || "" == inputStr ) { return true; } return false; }

function sel (id, num) {
	var a = document.getElementsByTagName('a');
	var tmpid = '';
	for (var i=0; i < a.length; i++) {
		tmpid = a[i].id
		if (!isEmpty (tmpid)) {
			if (tmpid.search(id) != -1) {
				if (tmpid == id+'['+num+']') {
					a[i].style.background="#cccccc";
				} else {
					a[i].style.background="#efefef";
				}			
			}
		}
	}
}

