// Dynamic (Absolute) Viscosity Converter 

function DynamicViscosityConverter(unit, value){
	this.uv = new Array(); 
	this.uv = {
		"Pas" : 1, // ref unit
		"Poise" : 10,
		"centiPoise" : 1000,
		"kg/mh" : 3600,
		"kgfs/m2" : 0.102,
		"lbfs/inch2" : 0.000145,
		"lbfs/ft2" : 0.0209,
		"lbfh/ft2" : 0.0000058,
		"lb/fts" : 0.672,
		"lb/fth" : 2420
	}
	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
DynamicViscosityConverter.prototype.cV = function(unitTo){
	return this.ref * this.uv[unitTo];
}
// returns values for all units
DynamicViscosityConverter.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