// -- Generic functions --------------------------------------------------
function $(id) {
	return document.getElementById(id);
}

// used for the markets stock symbol look up form
function checkSymbolForm(){
	//var obj = document.lookitup.symb;
	var obj = $("mt_stock_quote_lookup");
	if (obj.value == ""){
		alert("Please enter a valid stock ticker symbol");
		obj.focus();
		return false;
	} else {
		return true;
	}
}

// generic popup window
function pop_me_up(pURL,name,features){
	new_window = window.open(pURL,name,features);
	new_window.focus();
}

// open form submission in popup window
function form2pop(formID, w, h) {
	var myForm = document.getElementById(formID);
	var attribStr = 'width=' + w + ',height=' + h;
	var popup = window.open(myForm.action, myForm.target, attribStr);
	myForm.submit();
}
