function c2conv1(){

    if(!(document.textor2.val1.value))

    {

        document.textor2.val2.value = "Amount?";

    }

    else if ((document.textor2.cur1.options[document.textor2.cur1.selectedIndex].value == -1) || (document.textor2.cur2.options[document.textor2.cur2.selectedIndex].value == -1))

    {

        document.textor2.val2.value = "Rate N/A";

    }

    else 

    {

        document.textor2.val2.value=document.textor2.val1.value*(document.textor2.cur1.options[document.textor2.cur1.selectedIndex].value/document.textor2.cur2.options[document.textor2.cur2.selectedIndex].value);

        document.textor2.val2.value=Math.round(document.textor2.val2.value*100)/100;

    }

}

{ 

	document.write("<table width='85%' border='0' align='center' cellpadding='0' cellspacing='2' bgcolor='#669933'>");
	document.write("<tr><td align='center' bgcolor='#FFFFFF'><img src='images/flags/top_graphic.gif' width='450' height='44'></td></tr>");
	document.write("<tr><td><table width='100%' border='0' cellpadding='4' cellspacing='0' bgcolor='#FFFFFF' class='mainbodyB'>");
	document.write("<tr bgcolor='#eeeeee'><td width='10%' align='center' valign='middle' class='mainHead'><font color='#000000'>1</font></td>");
	document.write("<td width='50%' align='right' valign='middle'><font color='#000000'>Enter amount here : </font></td>");
	document.write("<td width='40%'><INPUT TYPE=TEXT size=15 NAME=val1 class='searchField' ONBLUR='c2conv1();'></td></tr>");
	document.write("<tr align='center'><td colspan='3' valign='middle'>&nbsp;</td></tr>");
	document.write("<tr><td align='center' valign='middle' class='mainHead'><font color='#000000'>2</font></td>");
	document.write("<td align='right' valign='middle'><font color='#000000'>Choose currency to convert from : </font></td>");
	document.write("<td><SELECT NAME=cur1 class='searchField' ONCHANGE='c2conv1();'>");
				  
				document.write("<OPTION VALUE='1.5872'>Britain Pound [GBP]</OPTION>");
				document.write("<OPTION VALUE='0.661199482245856'>Australia Dollar [AUD]</OPTION>");
				document.write("<OPTION VALUE='0.713775874375446'>Canada Dollar [CAD]</OPTION>");
				document.write("<OPTION VALUE='1.11879935363883'>Europe Euro [EUR]</OPTION>");
				document.write("<OPTION VALUE='1'>US Dollar [USD]</OPTION>");
				  
				document.write("</select></td></tr>");
                		document.write("<tr><td align='center' valign='middle' class='mainHead'><font color='#000000'>3</font></td>");
                  		document.write("<td align='right' valign='middle'><font color='#000000'>Choose currency to convert to : </font></td>");
                  		document.write("<td><SELECT NAME='cur2' class='searchField' ONCHANGE='c2conv1();'>");
						
							document.write("<OPTION VALUE='1'>US Dollar [USD]</OPTION>");
							document.write("<OPTION VALUE='0.661199482245856'>Australia Dollar [AUD]</OPTION>");
							document.write("<OPTION VALUE='1.5872'>Britain Pound [GBP]</OPTION>");
							document.write("<OPTION VALUE='0.713775874375446'>Canada Dollar [CAD]</OPTION>");
							document.write("<OPTION VALUE='0.120819648049137'>China Yuan [CNY]</OPTION>");;
							document.write("<OPTION VALUE='1.11879935363883'>Europe Euro [EUR]</OPTION>");
							document.write("<OPTION VALUE='0.128223210965649'>Hong Kong Dollar [HKD]</OPTION>");
							document.write("<OPTION VALUE='0.0218102508178844'>India Rupee [INR]</OPTION>");
							document.write("<OPTION VALUE='0.00837801318776349'>Japan Yen [JPY]</OPTION>");
							document.write("<OPTION VALUE='0.589200335930419'>New Zealand Dollar [NZD]</OPTION>");
							document.write("<OPTION VALUE='0.133591610446864'>Norway Kroner [NOK]</OPTION>");
							document.write("<OPTION VALUE='0.135670987751844'>South Africa Rand [ZAR]</OPTION>");
							document.write("<OPTION VALUE='0.718287602355983'>Switzerland Franc [CHF]</OPTION>");

						
							document.write("</select></td></tr>");
							
                		document.write("<tr><td colspan='3' align='center' valign='top'><hr width='75%' noshade></td></tr>");
                		document.write("<tr bgcolor='#eeeeee'><td align='right' valign='middle'>&nbsp;</td>");
                  		document.write("<td align='right' valign='middle'><font color='#000000'>Estimated Conversion : </font></td>");
                  		document.write("<td><INPUT TYPE='TEXT' size=15 NAME='val2' class='searchField' ONCHANGE='c2conv1();'></td></tr></table></td></tr>");
          				document.write("<tr><td align='center' bgcolor='#FFFFFF'><img src='images/flags/bottom_graphic.gif' width='450' height='45'></td></tr></table>");

}

// else

// {

 //  document.write("<H1>Unauthorised use</H1>");

 //  alert ("Textor Currency Converter \nhttp://cconv.textor.com\nProblem at: "+window.location);

//}

