

/**********************************************************************/
/* A function to clear a text field                                   */
/**********************************************************************/
function clearText(thefield)
 {
 if (thefield.defaultValue==thefield.value)
 thefield.value = ""
 } 

/**********************************************************************/
/* A function to click a specific button when someone hits return     */
/**********************************************************************/
function clickButton(e, buttonid){ 
var bt = document.getElementById(buttonid); 
if (typeof bt == 'object'){ 
		if(navigator.appName.indexOf("Netscape")>(-1)){ 
			if (e.keyCode == 13){ 
					bt.click(); 
					return false; 
			} 
		} 
		if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
			if (event.keyCode == 13){ 
					bt.click(); 
					return false; 
			} 
		} 
} 
}

/**********************************************************************/
/* A function to click a specific link when someone hits return       */
/**********************************************************************/
function clickLink(e, linkid)
{
    var evt = e || window.event;

    var c = document.getElementById(linkid);

    if(!evt) 
        return;

    var key = 0;

    if (evt.keyCode) { key = evt.keyCode; } 
    else if (typeof(evt.which)!= 'undefined') { key = evt.which; } 

    // return 
    if( key == 13 )
    {
        window.location= c.href;
        
        return false;
    }
}

/**********************************************************************/
/* Function to hide our custom msg box class                          */
/**********************************************************************/
function closeBox(toClose) {
	document.getElementById(toClose).style.display = "none";
}

