function DImageButton(buttonId, switchOnURL, onImagePath, offImagePath, overImagePath){	
	var btnObj = document.getElementById(buttonId);
	var isOn = false;
	
	if(switchOnURL==getCurrentFileName()){
		isOn = true;
		btnObj.src = onImagePath;
	}else{
		btnObj.src = offImagePath;
	}
	
	btnObj.onmouseover  = function(){
		btnObj.src = overImagePath;
	}	
	btnObj.onmouseout  = function(){
		if(isOn)
			btnObj.src = onImagePath;
		else
			btnObj.src = offImagePath;		
	}		
	

}

//extra function call
function getCurrentFileName(){
	var pathName = location.pathname;
	return pathName.substr(pathName.lastIndexOf("/")+1);
}

