function checkAnchor() {
	var url = document.location.toString();
	var anchor = url.substring((url.lastIndexOf("#")+1));
	for (var i=0;i<document.anchors.length;i++) {
		if (document.anchors[i].name==anchor) {
			//found a matching anchor, now need to find its parent div
			for (var j=0;j<divs.length;j++) {
				if (divs[j]==anchor) {
					toggle(j);
				}
			}
		}
	}
}

function toggle(id) {
	div = document.getElementById("content_"+id);
	if (div.style.display=="none") {
		div.style.display = "block";
	} else {
		div.style.display = "none";
	}
}

function IsNumeric(sText) {
	var ValidChars = "0123456789.";
	var IsNumber=true;
	var Char;


	for (i = 0; i < sText.length && IsNumber == true; i++) {
		Char = sText.charAt(i);
		if (ValidChars.indexOf(Char) == -1) {
 			IsNumber = false;
		}
	}
	return IsNumber;
}

function openCalculator() {
	var calculator = window.open("/en/calculator.php","calculator","scrollbars=0,menubar=0,toolbar=0,location=0,status=0,width=605,height=480");
	calculator.focus();

}
function clearSearch(id) {
	var search = document.getElementById(id);
	if (search.value=="enter keyword") {
		search.value = "";
	}
}
