/*
Disable right click script III- By Renigade (renigade@mediaone.net)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
/*
var message="";

function clickIE() {
	if(document.all) {
		(message);
		return false;
	}
}

function clickNS(e) {
	if(document.layers||(document.getElementById&&!document.all)) {
		if(e.which==2||e.which==3) {
			(message);
			return false;
		}
	}
}

if(document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS;
} else {
	document.onmouseup=clickNS;
	document.oncontextmenu=clickIE;
}

document.oncontextmenu=new Function("return false")
*/

////////////////////////////////////////////////////////////////////////////////////////////////////

/*
Submit Once form validation- 
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/
function submitonce(theform){
	if(document.all||document.getElementById) {		//if IE 4+ or NS 6+
		for(i=0;i<theform.length;i++) {				//screen thru every element in the form, and hunt down "submit" and "reset"
			var tempobj=theform.elements[i]
			if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")	//disable em
				tempobj.disabled=true
		}
	}
}

////////////////////////////////////////////////////////////////////////////////////////////////////

/*
Popup window
*/
function popup(url,h,w) {
	window.open(url,'null','height=' + h + ', width=' + w + ', resizable=1, scrollbars=1, location=0, menubar=0, toolbar=0, status=0, hotkeys=0');
}

////////////////////////////////////////////////////////////////////////////////////////////////////

function  doMath() {
var one = eval(document.excalc.number.value)
var two = eval(document.excalc.exchange.value)
var prod = one  *   two
document.excalc.amount.value=custRound(prod,2);
}
function custRound(x,places) {
return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)
}