<!--
var xmlHttp=GetXmlHttpObject();
var objId="";
var curWord="";

function closeDef(rslt, btn){
	document.getElementById(rslt).style.display ='none';
	document.getElementById(btn).value=">>";
	document.getElementById(btn).style.background="gold";
}  //function closeDef(def, rslt, btn)

function getDef(def, rslt, btn){
	var box=document.getElementById(def);
	
	url=base_html+"/functions/getDefition.php?define="+box.value+
				  "&xkey="+Math.random();
//alert("url "+url);
	
	ajaxHttpGet(url, rslt);  //write value to database
	document.getElementById(rslt).style.display = 'block';
	
	if(document.getElementById(btn).value=="X"){
		closeDef(rslt, btn);
    }
	else {
		document.getElementById(btn).value="X";
		document.getElementById(btn).style.background="red";
	}
	document.getElementById(def).focus();
	
	curWord=document.getElementById(def).value;
	
	/*if(document.getElementById)
	    document.getElementById(rslt).style*/
}

function resetDef(def, btn, e){
//alert("what is this "+btn+" and "+curWord);	
	if(document.getElementById(btn).value=="X" && curWord==document.getElementById(def).value){
		//document.getElementById(rslt).style.display ='none';
		document.getElementById(btn).value=">>";
		document.getElementById(btn).style.background="gold";
    }  //if(document.getElementById(btn).value=="X")

//alert("what is this "+e.keyCode);
	//if(event.keyCode==13) getDef('define','dictionary','findWord');
}  //function resetDef(def, rslt, btn)


function EvalSound(soundobj) {
  var thissound= eval("document."+soundobj);
  thissound.Play();
alert("should work soon!");	
}

function writenote(id, line_no, keyword){
	var box=document.getElementById(id);
	url=base_html+"/functions/writeNotes.php?formid="+formid+"&note="+
	              box.value+"&line_no="+line_no+"&keyword="+keyword+
				  "&xkey="+Math.random();

	ajaxHttpGet(url);  //write value to database
}  //function writenote(id)

function ajaxHttpGet(strURL,setRslt) { 
//alert("xmlHttp=GetXmlHttpObject();")
	if (xmlHttp==null) {
		alert ("Browser does not support HTTP Request");
		return;
	}  //if (xmlHttp==null) 
	
	objId=setRslt;
	
	xmlHttp.open("GET",strURL,true);
	xmlHttp.onreadystatechange=stateChanged;

	xmlHttp.send(null);
}  //function showUser(strURL,setRslt)

function stateChanged(setRslt)  { 
//alert("for it "+xmlHttp.readyState);	
    if ((xmlHttp.readyState==4 || xmlHttp.readyState=="complete") && objId.length>1) { 
//alert("["+objId+"] what "+document.getElementById(objId).innerHTML);	
	    document.getElementById(objId).innerHTML=xmlHttp.responseText;
	}  //if ((xmlHttp.readyState==4 || xmlHttp.readyState=="complete") && setRslt.length>0)
}  //function stateChanged()

function GetXmlHttpObject() {
	var xmlHttp=null;
	try { //XMLHttpRequest
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}  //try { //XMLHttpRequest
	catch (e){
		//Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}  //catch (e)
	}  
	return xmlHttp;
}  //function GetXmlHttpObject()

//JavaScript:xmlhttpPost("/cgi-bin/simple-ajax-example.cgi")'

/*General funcitons*/
function clearBox(bxNm, bxTxt){
//alert("if it's "+document.getElementById(bxNm).value);	
    if(document.getElementById(bxNm).value==bxTxt) document.getElementById(bxNm).value=''
	else if(document.getElementById(bxNm).value=='') document.getElementById(bxNm).value=bxTxt
}  //function clearBox(bxNm, bxTxt)

-->