function submitform(theform){
  $("#" + theform).submit();
}
function resetform(theform){
  document.getElementById(theform).reset();
}


function closeAll(){
	document.getElementById('nav_dropdown_about').style.display = "none";
	document.getElementById('nav_dropdown_practices').style.display = "none";
	document.getElementById('nav_item_about').className = "";
	document.getElementById('nav_item_practices').className = "";
}


function openThis(openthis,navItem){
	closeAll();
	document.getElementById(openthis).style.display = "block";
	document.getElementById(navItem).className += " active";
}

function keepOpen(openthis){
	document.getElementById(openthis).style.display = "block";
}


function closeThis(closethis){
	document.getElementById(closethis).style.display = "none";
}




function convertInput(myInput){
	if(myInput.type=='text'){
		/* we have to create a new element because IE8 doesn't let us setAttribute type */
		var theInput = document.createElement('input');
        theInput.id = myInput.id;
        theInput.type = 'text'; 
        $(theInput).addClass('textInput');   
        theInput.value = '';
		
        /* now we replace the old element with the new element */        
        myInput.parentNode.replaceChild(theInput, myInput);
        
        /* call focus twice because of IE bug*/
        $(theInput).focus();
        $(theInput).focus();
		
	}
	return true;
}

