﻿//This function is use for onmouseover and onmouseout feature on html
function changeImage(id, newImage) {
  document.getElementById(id).style.backgroundImage = newImage;
}

function cheackDocumentURL(id, newImage, link) {
	var path = location.href;
	var file = path.substring(path.lastIndexOf("/")+1,path.length);
	
    var pos = file.indexOf('?');
    
	if(pos == -1){
		pos = file.length;
	}
	
	file = file.substr(0, pos);
	
	
	var bActive = false;
	if((file == link) || ((link == "index.php") && (file == ""))){
		bActive = true;
	}
	return bActive;
}

function cheackDocumentURLSubMenu(link) {
	var path = location.href;
	var file = path.substring(path.lastIndexOf("/")+1,path.length);
		
	var bActive = false;
	if(file == link){
		bActive = true;
	}
	return bActive;
}

