// Version Management System
// Scripts copyright 1999 Rensselaer Polytechnic Institute.

// -------------------------------------------------------------------------------
//  No modifications are to be made to this file without the expressed permission
//  of the Technical Manager.  He alone sets the version numbers.
// -------------------------------------------------------------------------------

// Functions
// getVersionVar(modName)
//   * Parameter 'modName' is a string, each module should have its own name
//   * Function returns version number string
// writeVersionNumber(modName)
//   * Parameter 'modName' is a string, each module should have its own name
//   * Function will insert version number string into document at location it was called from
// writeVersionGraphic(modName)
//   * Parameter 'modName' is a string, each module should have its own name
//   * Function will insert version image into document at location it was called from
//   * must be one level away from root of Links Website

function getVersionVar(modName) {
switch(modName){
  case "AmperesLaw":
	return "0.2";
	break;
  case "Bicycle":
	return "1.0";
	break;
  case "BoundaryValue":
	return "0.2";
	break;
  case "Capacitance":
	return "0.4";
	break;
  case "ChemicalKinetics":
	return "0.2";
	break;
  case "ConditionalProbability":
	return "0.4";
	break;
  case "ConstrainedOptimization":
	return "1.0";
	break;
  case "ContinuousRandomVar":
	return "0.6";
	break;
  case "CSTR":
	return "0.2";
	break;
  case "Crystallography":
	return "0.4";
	break;
  case "CurrentAndResistance":
	return "0.4";
	break;
  case "CurvatureAndCurveDesign":
	return "0.4";
	break;
  case "DragForces":
	return "1.0";
	break;
  case "DynamicSystemsInvestigation":
	return "0.4";
	break;
  case "ElectricField":
	return "0.6";
	break;
  case "ElectromagneticOscillations":
	return "0.4";
	break;
  case "ElectricPotential":
	return "1.0";
	break;
  case "FaradaysLawAndInduction":
	return "0.4";
	break;
  case "FluxAndSurfaceIntegration":
	return "0.0";
	break;
  case "ForcedSpringMass":
	return "1.0";
	break;
  case "FourierSeries":
	return "0.4";
	break;
  case "GaussLaw":
	return "0.6";
	break;
  case "GeometricalOptics":
	return "0.4";
	break;
  case "Gradient":
	return "1.0";
	break;
  case "GraphChemistry":
	return "0.6";
	break;
  case "GraphDrill":
	return "0.8";
	break;
  case "GraphNet":
	return "0.8";
	break;
  case "GraphSperner":
	return "0.8";
	break;
  case "HeatFlow":
	return "0.6";
	break;
case "HeatFlow2":
	return "0.4";
	break;
  case "InductanceAndInductiveCircuits":
	return "0.4";
	break;
  case "InventoryControl":
	return "0.6";
	break;
  case "LakePollution":
	return "0.4";
	break;
  case "MagneticField":
	return "0.4";
	break;
  case "MassTransport":
	return "1.0";
	break;
  case "MatrixFundamentals":
	return "0.2";
	break;
  case "MatrixKit":
	return "0.8";
	break;
  case "MaxwellsEquations":
	return "0.2";
	break;
  case "MeansAndVariances":
	return "0.8";
	break;
  case "MultiSpringMass":
	return "0.6";
	break;
  case "Pendulum":
	return "0.8";
	break;
  case "NonlinearPendulum":
	return "0.8";
	break;
  case "PoissonAndExponentialDistributions":
	return "0.4";
	break;
  case "RandomVariableRelations":
	return "0.0";
	break;
  case "RandomVariables":
	return "0.4";
	break;
  case "MomentOfInertia":
	return "0.2";
	break;
  case "SequentialBatchReactions":
	return "0.4";
	break;
  case "SpringMass":
	return "1.0";
	break;
  case "SpringPendulum":
	return "0.4";
	break;
  case "VectorCalculus":
	return "0.0";
	break;
  case "VibratingStrings":
	return "1.0";
	break;

  default:
	return "-1";
  }
}

function writeVersionNumber(modName) {
  document.write(getVersionVar(modName));
}

function writeVersionGraphic(modName) {
  document.write("<img align=absmiddle src='../webgraphics/");
  switch(getVersionVar(modName)) {
  case "0.0":
	document.write("cERSION0.gif");
	break;
  case "0.2":
	document.write("cERSION2.gif");
	break;
  case "0.4":
	document.write("cERSION4.gif");
	break;
  case "0.6":
	document.write("cERSION6.gif");
	break;
  case "0.8":
	document.write("cERSION8.gif");
	break;
  case "1.0":
	document.write("cERSIONG.gif");
	break;
  }
  document.write("' border=0 >&nbsp;");
}
