// Kinematic Viscosity Converter 

function KinematicViscosityConverter(unit, value){
	this.uv = new Array(); 
	this.uv = {
		"m2/s" : 1, // ref unit
		"m2/min" : 60,
		"m2/h" : 3600,
		"stokes" : 10000,
		"cm2/h" : 36000000,
		"cm2/min" : 600000,
		"in2/s" : 1550,
		"in2/min" : 93000,
		"in2/h" : 5580000,
		"ft2/s" : 10.8,
		"ft2/min" : 646,
		"ft2/h" : 38800
	}
	this.unit = unit; // unit to convert from
	this.value = value; // value to convert
	this.ref = 1 / this.uv[this.unit] * this.value;
}

// returns value for singel unit
KinematicViscosityConverter.prototype.cV = function(unitTo){
	return this.ref * this.uv[unitTo];
}
// returns values for all units
KinematicViscosityConverter.prototype.cVs = function(){
	var msg = this.value + " " + this.unit + " => \n";
	for (var i in this.uv) {
		msg += this.ref * this.uv[i] + "  " + i + "\n";
	}  
	return msg;
}

// Copyright engineeringtoolbox.com