function point_it(event){
    pos_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("picHolder").offsetLeft;
    pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("picHolder").offsetTop;
    //document.getElementById("teamPic").style.visibility = "visible" ;
    
	//document.getElementById("name").innerHTML = pos_x;
	
	if (pos_x >= 0 && pos_x < 171) {
		changeText("David McIntyre", "Sales Representative")
		profile_changeOnClick(3);
	}
	
	else if (pos_x >= 171 && pos_x < 265) {
		changeText("Marion Simmons", "Sales Representative")
		profile_changeOnClick(4);
	}
	
	else if (pos_x >= 265 && pos_x < 345) {
		changeText("Shannon Treadwell", "Sales Representative")
		profile_changeOnClick(5);
	}
	
	else if (pos_x >= 345 && pos_x < 435) {
		changeText("Carol McIntyre", "Sales Representative")
		profile_changeOnClick(6);
	}
	
	else if (pos_x >= 435 && pos_x < 520) {
		changeText("Jim Mcintyre", "Sales Representative")
		profile_changeOnClick(7);
	}
	
	else if (pos_x >= 520 && pos_x < 620) {
		changeText("Sue Jones", "Team Co-ordinator")
		profile_changeOnClick(8);
	}
	
}

function changeText(s1, s2) {
	document.getElementById("name").innerHTML = s1;
	document.getElementById("subtext").innerHTML = s2;

}
var profile_destinationDiv = "";
var profile_urlBase = "javascript:getData('http://"+location.host+"/cog.php?page=profile&op=view&profile_id=%d', '%s')";
var profile_urlBase = "index.php/profile/view/%d";

function profile_changeOnClick(profileID) {
	var url = "";
/*	
	if ( profile_destinationDiv != ""  ) {
		url = sprintf(profile_urlBase, profileID, profile_destinationDiv);
	} else {
		url = sprintf(profile_urlBase, profileID);
	}
*/
url = sprintf(profile_urlBase, profileID);
//	alert(url);
	
	document.getElementById("teamPicA").href = url;
}
