var t;
var isSub = false;
function selectPage(which){
var subMenuItems = new Array("aptLoanLink","comLoanLink","conduitLoanLink","moneyLink","SBALoanLink","BridgeLoanLink");
	if (document.getElementById(which)) {
		document.getElementById(which).className = "topnavSelected bold";
	}
	for (var i = 0; i < subMenuItems.length; i++) {
		if (which == subMenuItems[i]) {
			isSub = true;
			break;
		}
	}
	if (isSub) {
		document.getElementById("loanDropdownWrap").style.height = "24px";
		document.getElementById("loanDropdown").style.display = "";
		document.getElementById("loanLink").className = "topnavSelected bold";
	}
	if (which != "homeLink") {
		document.getElementById("phoneWrap").style.display = "";
	}
}
function showSubmenu() {
	clearTimeout(t);
	document.getElementById("loanDropdown").style.display = "";
}
function hideSubMenu() {
	if (!isSub) {
		t = setTimeout("hideSubExecute();",500);
	}
}
function hideSubExecute() {
	if (!isSub) {
		document.getElementById("loanDropdown").style.display = "none";
	}
}
function domailinglist() {
var email = document.getElementById("email").value;
location.href='mailto:info@citycapitalfinance.com?subject=Request%20from%20CityCapitalFinance.com%20to%20be%20added%20to%20the%20mailing%20list.&body=Please%20add%20' + email + '%20to%20your%20mailing%20list.'
}