////////////////////////////
// go 
// open url in new window

function go(loc)
{
	window.open("http://www."+loc)
}

function go_r(loc)
{
	location.href="http://www."+loc
}

////////////////////////////
// Mail2com

// send mail to .com address
function Mail2com(domain,rec)
{
	self.location="mailto:"+rec+"@"+domain+".com"
}

///////////////////////////////////////////
// menu

function DisplayMenuItem(shref,sText,sSel)
{
	if (shref==sSel || (shref=="index.shtml" && sSel=="")) {
		document.write('<b>');
	}							
	document.write('<a href="' + shref + '">' + sText + '</a>');
	if (shref==sSel || (shref=="index.shtml" && sSel=="")) {
		document.write('</b>');
		document.write('<img src="img/sel.gif" hspace="6"/>');
	}							
	document.write('<br/>');
	document.write('<br/>');
}

function DisplayMenu(sPage)
{
  var n=sPage.lastIndexOf("/");
  if (n>=0) {
    sPage=sPage.substr(n+1,sPage.length-n-1);
  }
	document.write('<p><br/>');
	DisplayMenuItem("index.shtml",                    "Motion analysis (home)",     sPage);
	DisplayMenuItem("kinematics_dynamics.shtml",      "Kinematics/dynamics",    sPage);
	DisplayMenuItem("static_kinematics.shtml",        "Static kinematics",      sPage);
	DisplayMenuItem("dynamic_kinematics.shtml",       "Dynamic kinematics",     sPage);
	DisplayMenuItem("analog_digital_converter.shtml", "A/D converters",         sPage);
	DisplayMenuItem("2d_motion_analysis.shtml",       "2D motion analysis",     sPage);
	DisplayMenuItem("3d_motion_analysis.shtml",       "3D motion analysis",     sPage);
	DisplayMenuItem("motion_analysis_web.shtml",      "Motion analysis online", sPage);
	document.write('</p>');
}
