﻿//This function is use for onmouseover and onmouseout feature on html
function changeImage(id, newImage) {
  document.getElementById(id).style.backgroundImage = newImage;
}

function cheackDocumentURL(link) {
	var path = location.href;
	var file = path.substring(path.lastIndexOf("/")+1,path.length);
    var pos = new Array(file.indexOf('?'), file.indexOf('#'));
    
	for (i=0;i<=pos.length;i++){
	
		if(pos[i] == -1){
			pos[i] = file.length;
		}
		
		
		file = file.substr(0, pos[i]);
	}
		
	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;
}

