
<!--Begin
        function WRatio(Mixamount) {
		 var Resin=document.forms[0].Resin.value
                 var Hardener=document.forms[0].Hardener.value
                 var Mixamount=document.forms[0].Mixamount.value
		 Ratio=Resin/Hardener
		 Hamount=Mixamount/Ratio
		 function round(Hamount,X) {
	                  x=(!X ? 2:X);
	                  return Math.round(Hamount*Math.pow(10,X))/Math.pow(10,X);
		 }
		 document.write("For    "+Mixamount+"    parts of Resin you will need:                     	  "+(round(Hamount,1)+ "   parts of Hardener.."+'<br>'));
		 document.write(" "+'<br>') 
		 document.write(" "+'<br>')
		 document.write(" "+'<br>')
		 document.write("Click the Back button of your Browser to return..."+'<br>');
		        return Hamount;
	   }
	   
	   function TotMix(TotalMix) {
	            var Resin=document.forms[1].Resin.value
	            var Hardener=document.forms[1].Hardener.value
	            var TotalMix=document.forms[1].TotalMix.value
	            Ratio=Resin/Hardener
	            BaseAmount=Ratio+1
	            Hamount=TotalMix/BaseAmount
	            ResAmount=TotalMix -= Hamount
	            function round(ResAmount,X) {
	                     x=(!X ? 2:X);
	                     return Math.round(ResAmount*Math.pow(10,X))/Math.pow(10,X);
	                     
	            }
		    function round(Hamount,X) {
	                     x=(!X ? 2:X);
	                     return Math.round(Hamount*Math.pow(10,X))/Math.pow(10,X);
            	    }

		    document.write("You will need  "+(round(ResAmount,1)+ " parts of    	Resin and  " +(round(Hamount,1)+ " parts of Hardener for 			     		your mix"+'<br>')));
	            document.write(" "+'<br>')
	            document.write(" "+'<br>')
	            document.write(" "+'<br>')
	            document.write("Click the Back button of your Browser to return..."+'<br>');
	            return Hamount,ResAmount;
	    }
	     
            function VolMix(VolMix) {
	            var Resin=document.forms[2].Resin.value
	            var Hardener=document.forms[2].Hardener.value
	            var SgR=document.forms[2].SgR.value
	            var SgH=document.forms[2].SgH.value

	            Ratio=Resin/Hardener
	            Gravity=SgH/SgR
	            VolA=Ratio*Gravity
	            function round(VolA,X) {
	                     x=(!X ? 2:X);
	                     return Math.round(VolA*Math.pow(10,X))/Math.pow(10,X);
	                     
	            }
		    document.write("The Volumetric Ratio for your product is  			"+(round(VolA,1)+ " : 1                     Resin:Hardener " 			 +'<br>'));
	            document.write(" "+'<br>')
	            document.write(" "+'<br>')
	            document.write(" "+'<br>')
	            document.write("Click the Back button of your Browser to 			return..."+'<br>');
                
       	         }
	         function sqvol(sqvol){
	    		var clength=document.forms[3].Clength.value
	            	var cwidth=document.forms[3].Cwidth.value
	            	var cdepth=document.forms[3].Cdepth.value
	            	var SgMix=document.forms[3].SgMix.value
	            	var measure=document.forms[3].Measure.value;
	            	Volume=clength*cwidth*cdepth
	            	Needed=Volume*SgMix*measure
	            	                
	            	function round(Needed,X) {
	                	 x=(!X ? 2:X);
	                     return Math.round(Needed*Math.pow(10,X))/Math.pow(10,X);
	                     
	           	 }
			document.write("You will need  "+(round(Needed,1)+" grams or  				"+(round(Needed/1000,1))+"  Kgs of Mixed Material to 				completely fill your container"+'<br>')); 
				document.write(" "+'<br>')
			document.write("Don't forget to deduct the volume that may be 				displaced by any embeded components... "+'<br>')
	           	document.write(" "+'<br>')
	            	document.write("Click the Back button of your Browser to 				return..."+'<br>');
	         }
	         function Cyvol(Cyvol){
	    		var diameter=document.forms[4].Diameter.value
	            	var depth=document.forms[4].Depth.value
	            	var SgMix=document.forms[4].SgMix.value
	            	var measure=document.forms[4].Measure.value;
	            	radius=diameter/2
	            	Volume=radius*radius*3.1416*depth
	            	Needed=Volume*SgMix*measure
	                           
	            	function round(Needed,X) {
	                     x=(!X ? 2:X);
	                     return Math.round(Needed*Math.pow(10,X))/Math.pow(10,X);
	                     
	            	}
			document.write("You will need  "+(round(Needed,1)+" grams or  				"+(round(Needed/1000,1))+" Kgs of Mixed Material to 				completely fill your container"+'<br>')); 
			document.write(" "+'<br>')
			document.write("Don't forget to deduct the volume that may be 			displaced by any embeded components... "+'<br>')
	            	document.write(" "+'<br>')
	            	document.write("Click the Back button of your Browser to 				return..."+'<br>');
		}
			
		function MixCost(MixCost){
	    		var parta=document.forms[5].PartA.value
	            	var partb=document.forms[5].PartB.value
	            	var priceA=document.forms[5].PrcA.value
	            	var priceB=document.forms[5].PrcB.value
	            	var mixweight=document.forms[5].MixWeight.value
	            	var mixunit=document.forms[5].MixUnit.value
			var priceunit=document.forms[5].PriceUnit.value
			var MixCost
			var prodcost
			ratio=parta/partb
	            	Acost=(ratio*priceA)
	            	Bcost=(1*priceB) 
	            	Tcost=(Acost+Bcost)
	            	Rweight=ratio+1
	            	unitcost=Tcost/Rweight
			costunit=Tcost/Rweight
			
			if(priceunit==="Lb" && mixunit==="Lb") {
				MixCost=unitcost*mixweight
			}
			if(priceunit==="Lb" && mixunit==="kg") {
				MixCost=(unitcost*2.2)*mixweight
			}
			if(priceunit==="Lb" && mixunit==="grms") {
				MixCost=((unitcost*2.2)/1000)*mixweight
			}
			if(priceunit==="Lb" && mixunit==="oz") {
				MixCost=(unitcost/16)*mixweight
			}
			if(priceunit==="kg" && mixunit==="kg") {
			   	MixCost=unitcost*mixweight
                        } 					
			if(priceunit==="kg" && mixunit==="Lb") {
			   	MixCost=(unitcost/2.2)*mixweight
                        } 		
			
                        if(priceunit==="kg" && mixunit==="grms") {
				MixCost=(unitcost/1000)*mixweight
			} 
			if(priceunit==="kg" && mixunit==="oz") {
                                MixCost=(unitcost/35.27396)*mixweight
			} 
			
	            	                           
	            	function round(MixCost,X) {
	                     x=(!X ? 2:X);
	                     return Math.round(MixCost*Math.pow(10,X))/Math.pow(10,X);
	                     
	            	}
			function round(costunit,X) {
	                     x=(!X ? 2:X);
	                     return Math.round(costunit*Math.pow(10,X))/Math.pow(10,X);
			}
			document.write("The mixed cost is  								"+round(costunit,2)+" "+"  per "+"  "+priceunit+'<br>')
			document.write("The Cost of  "+"  "+mixweight+"  "+mixunit+"  "+" of mixed material is  $  "+round(MixCost,4)+'<br>'); 
			document.write(" "+'<br>')
			document.write(" "+'<br>')
	            	document.write("Click the Back button of your Browser to 				return..."+'<br>');

		}
            

			function Tconvert(Tconvert) {
				var Tnum=document.forms[6].Tnumber.value
				var fscale=document.forms[6].Scale.value
				if(fscale==="C") {
				    newsc="F"
				    ConvTemp = (Tnum*1.8)+32
				}
				if(fscale==="F") {
				   newsc="C"	
				   ConvTemp = (0.556*(Tnum - 32))
				}

				document.write ( Tnum + fscale +" "+"converts to" +" "+ConvTemp+newsc)+'<br>'
				document.write (" "+'<br>')
				document.write (" "+'<br>')
				document.write("Click the Back button of your Browser to 				                                              return..."+'<br>');
		 }

                        	       
		        function rcalc(rcalc) {
                               var shnum=document.forms[7].hardness.value
                               var Mamnt=document.forms[7].weight.value
                               var Wunit=document.forms[7].unitweight.value
                               var parta
                               var partb
                               var partc 
                               if(shnum==10) {
				 //var parta
                                 //var partb
                                 //var partc
                                 var shore10a=0.8330
				 var shore10b=0
				 var shore10c=0.1667
                                 parta=Mamnt*shore10a
                                 partb=Mamnt*shore10b
                                 partc=Mamnt*shore10c
                                 }                                                                                       if(shnum==20) {
                                 var shore20a=0.7865
                                 var shore20b=2.0000
                                 var shore20c=0.1935
                                 var parta=Mamnt*shore20a
                                 var partb=Mamnt*shore20b
                                 var partc=Mamnt*shore20c
                                 }
                               if(shnum==25) {
                                 var shore25a=0.7364
                                 var shore25b=0.0388
                                 var shore25c=0.2248
                                 var parta=Mamnt*shore25a
                                 var partb=Mamnt*shore25b
                                 var partc=Mamnt*shore25c
                                 }
                               if(shnum==30) {
                                 var shore30a=0.6955
                                 var shore30b=0.0564
                                 var shore30c=0.2481
                                 var parta=Mamnt*shore30a
                                 var partb=Mamnt*shore30b
                                 var partc=Mamnt*shore30c
                                 }
                               if(shnum==35) {
                                 var shore35a=0.6541
                                 var shore35b=0.0727
                                 var shore35c=0.2733
                                 var parta=Mamnt*shore35a
                                 var partb=Mamnt*shore35b
                                 var partc=Mamnt*shore35c
                                 }
                               if(shnum==40) {
                                 var shore40a=0.6162
                                 var shore40b=0.0880
                                 var shore40c=0.2958
                                 var parta=Mamnt*shore40a
                                 var partb=Mamnt*shore40b
                                 var partc=Mamnt*shore40c
                                 }
                               if(shnum==45) {
                                 var shore45a=0.5802
                                 var shore45b=0.1024
                                 var shore45c=0.3174
                                 var parta=Mamnt*shore45a
                                 var partb=Mamnt*shore45b
                                 var partc=Mamnt*shore45c
                                 }
                               if(shnum==50) {
                                 var shore50a=0.5161
                                 var shore50b=0.1290
                                 var shore50c=0.3548
                                 var parta=Mamnt*shore50a
                                 var partb=Mamnt*shore50b
                                 var partc=Mamnt*shore50c
                                 }
                               if(shnum==55) {
                                 var shore55a=0.4573
                                 var shore55b=0.1524
                                 var shore55c=0.3902
                                 var parta=Mamnt*shore55a
                                 var partb=Mamnt*shore55b
                                 var partc=Mamnt*shore55c
                                 }
                               if(shnum==60) {
                                 var shore60a=0.4046
                                 var shore60b=0.1734
                                 var shore60c=0.4220
                                 var parta=Mamnt*shore60a
                                 var partb=Mamnt*shore60b
                                 var partc=Mamnt*shore60c
                                 } 
                               if(shnum==65) {
                                 var shore65a=0.3571
                                 var shore65b=0.1923
                                 var shore65c=0.4506
                                 var parta=Mamnt*shore65a
                                 var partb=Mamnt*shore65b
                                 var partc=Mamnt*shore65c
                                 }
                               if(shnum==70) {
                                 var shore70a=0.3158
                                 var shore70b=0.1923
                                 var shore70c=0.4737
                                 var parta=Mamnt*shore70a
                                 var partb=Mamnt*shore70b
                                 var partc=Mamnt*shore70c
                                 }  
                               if(shnum==75) {
                                 var shore75a=0.2750
                                 var shore75b=0.2250
                                 var shore75c=0.5000
                                 var parta=Mamnt*shore75a
                                 var partb=Mamnt*shore75b
                                 var partc=Mamnt*shore75c
                                 }
                               if(shnum==80) {
                                 var shore80a=0.2064
                                 var shore80b=0.2523
                                 var shore80c=0.5413
                                 var parta=Mamnt*shore80a
                                 var partb=Mamnt*shore80b
                                 var partc=Mamnt*shore80c
                                 }
                               if(shnum==85) {
                                 var shore85a=0.1225
                                 var shore85b=0.2857
                                 var shore85c=0.5918
                                 var parta=Mamnt*shore85a
                                 var partb=Mamnt*shore85b
                                 var partc=Mamnt*shore85c
                                 }
                               if(shnum==90) {
                                 var shore90a=0.0000
                                 var shore90b=0.3374
                                 var shore90c=0.6626
                                 var parta=Mamnt*shore90a
                                 var partb=Mamnt*shore90b
                                 var partc=Mamnt*shore90c
                                 }
                                document.write ("Mix Ratio to obtain"+shnum+"A"+"  "+"cured hardness"+'<br>')
                                document.write ("------------------------------------------------------"+'<br>')
                                
                                document.write ("For "+Mamnt+"  "+Wunit+" of mix you will require the following Weights:"+'<br>') 
                                document.write ("---------------------------------------------------------------"+'<br>')
                                document.write ( "Part A" +"  "+(Math.round(parta * Math.pow(10,1)) / Math.pow(10,1)) +"    "+Wunit+'<br>')
                                document.write ( "Part B" +"  "+(Math.round(partb * Math.pow(10,1)) / Math.pow(10,1)) +"    "+Wunit+'<br>')
                                document.write ( "Part C" +"  "+(Math.round(partc * Math.pow(10,1)) / Math.pow(10,1)) +"    "+Wunit+'<br>')
				document.write (" "+'<br>')
				document.write (" "+'<br>')
				document.write("Click the Back button of your Browser to 				                                                return..."+'<br>');
                       }     
                                 
                    
 
	         //End-->                       

