function sendToFriend($lang) {
	var dir;
	if ($lang == 1) {
		dir = '/fr';
	}
	else {
		dir = '/en';
	}
	
	window.open(dir + '/extras/sendFriend.cgi', 'SendToFriend', 'location=no,menubar=no,status=no,toolbar=no,width=440,height=450,scrollbars,resizeable', 1);
}

function playMediaLink(fileName, linkPos) {
	linkPos++;

	if ((navigator.userAgent.indexOf("IE") > -1) && (navigator.platform == "Win32")) {
		//Windows Internet Explorere
		// Make sure we are using the same media file.
		if (fileName != document.MPlayer.FileName) {
			document.MPlayer.FileName = fileName;
			document.MPlayer.Play();
		}
		if (document.MPlayer.MarkerCount > 0) {
			if (linkPos > document.MPlayer.MarkerCount) {
				// Out of bounds.
				alert("This market position does not exist. Please contact the webmaster of this site");
			}
			else {
				document.MPlayer.CurrentMarker = linkPos;
				document.MPlayer.Play();
			}
		}
	}
	else {
		// Everything else.
		// Make sure we are using the same media file.
		if (fileName != document.MPlayer.src) {
			document.MPlayer.src = fileName;
		}
		if (document.MPlayer.GetMarkerCount() > 0) {
			if (linkPos > document.MPlayer.GetMarkerCount()) {
				// Out of bounds.
				alert("This market position does not exist. Please contact the webmaster of this site");
			} 
			else {
				document.MPlayer.SetCurrentMarker(linkPos);
			}
		}
	}
}
