<!--WEIGHT UNITS CONVERTER--> <!-- This goes in the HEAD of the html file --> <script language="javascript" type="text/javascript"> <!-- Copyright 2001, Sandeep Gangadharan --> <!-- For more free scripts go to http://sivamdesign.com/scripts/ --> <!-- function weighCon() { var w1 = document.conv3.weigh1.selectedIndex; var w2 = document.conv3.weigh2.selectedIndex; var w = document.conv3.weighval1.value; document.conv3.weighval2.value; if (w1 == 1 && w2 == 1) {document.conv3.weighval2.value = w;} if (w1 == 1 && w2 == 2) {document.conv3.weighval2.value = Math.round((((w) * 1000)) * 100000) / 100000;} if (w1 == 1 && w2 == 3) {document.conv3.weighval2.value = Math.round((((w) * 2.204634)) * 100000) / 100000;} if (w1 == 1 && w2 == 4) {document.conv3.weighval2.value = Math.round((((w) * 35.273369)) * 100000) / 100000;} if (w1 == 2 && w2 == 1) {document.conv3.weighval2.value = Math.round((((w) * 0.001)) * 100000) / 100000;} if (w1 == 2 && w2 == 2) {document.conv3.weighval2.value = w;} if (w1 == 2 && w2 == 3) {document.conv3.weighval2.value = Math.round((((w) * 0.002205)) * 100000) / 100000;} if (w1 == 2 && w2 == 4) {document.conv3.weighval2.value = Math.round((((w) * 0.035273)) * 100000) / 100000;} if (w1 == 3 && w2 == 1) {document.conv3.weighval2.value = Math.round((((w) * 0.45359)) * 100000) / 100000;} if (w1 == 3 && w2 == 2) {document.conv3.weighval2.value = Math.round((((w) * 453.59)) * 100000) / 100000;} if (w1 == 3 && w2 == 3) {document.conv3.weighval2.value = w;} if (w1 == 3 && w2 == 4) {document.conv3.weighval2.value = Math.round((((w) * 15.999647)) * 100000) / 100000;} if (w1 == 4 && w2 == 1) {document.conv3.weighval2.value = Math.round((((w) * 0.02835)) * 100000) / 100000;} if (w1 == 4 && w2 == 2) {document.conv3.weighval2.value = Math.round((((w) * 28.35)) * 100000) / 100000;} if (w1 == 4 && w2 == 3) {document.conv3.weighval2.value = Math.round((((w) * 0.062501)) * 100000) / 100000;} if (w1 == 4 && w2 == 4) {document.conv3.weighval2.value = w;} } //--> </script> <table border="0" bgcolor="#c0c0c0" width="340" cellspacing="0"> <tr> <form name="conv3"> <td colspan="3">&nbsp;<font size="1" face="verdana, arial, helvetica, sans-serif"><b>Weight Units Converter</b></font>&nbsp;</td> </tr> <tr> <td align="center"> &nbsp;<select name="weigh1" style="background-color: cccccc; font-size: 9pt"> <option value="x" selected>&lt; Select &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option> <option value="1">Kilograms</option> <option value="2">Grams</option> <option value="3">Pounds</option> <option value="4">Ounces</option> </select>&nbsp; </td> <td align="center">&nbsp; </td> <td align="center"> &nbsp;<select name="weigh2" onChange="document.conv3.weighval2.value='00'" style="background-color: cccccc; font-size: 9pt"> <option value="x" selected>&lt; Select &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option> <option value="1">Kilograms</option> <option value="2">Grams</option> <option value="3">Pounds</option> <option value="4">Ounces</option> </select>&nbsp; </td> </tr> <tr> <td align="center"> &nbsp;<input type="text" size="12" name="weighval1" value="00" onFocus="select();" style="background-color: cccccc; font-size: 9pt" />&nbsp; </td> <td align="center"> <input type="button" onClick="weighCon();" value=">>" style="background-color: cccccc; font-size: 9pt" /> </td> <td align="center"> &nbsp;<input type="text" size="12" name="weighval2" value="00" style="background-color: cccccc; font-size: 9pt" />&nbsp; </td> </form> </tr> </table>