function showSubnav(sectionName) {
	var sectionDiv = 'sub_nav_lnks_inc_' + sectionName;
	if (document.getElementById(sectionDiv)) { 
		document.getElementById(sectionDiv).style.display = 'block'; 
		if(document.getElementById('subnav_content')) {
			document.getElementById('subnav_content').style.display = 'none';
		}
		document.getElementById('subnav').style.backgroundImage = "url('http://www.triadsecurities.com/images/subnav.jpg')";
		document.getElementById('subnav').style.backgroundRepeat = "no-repeat";
	}
}

function hideSubnav(sectionName) {
	var sectionDiv = 'sub_nav_lnks_inc_' + sectionName;
	if(document.getElementById(sectionDiv)) { 
		document.getElementById(sectionDiv).style.display = "none"; 
		document.getElementById('subnav').style.backgroundImage = "";
		if(document.getElementById('subnav_content')) {
			document.getElementById('subnav_content').style.display = "block";
		}
	}
}

function getFiveDeals(type, more, url, container) {
	var xmlHttp;
	if (!more) {
		var more = '';
	} else {
		setBox(0, false);
	}
    
	if (url == null || url == '')
		var url = "/widgets/five_" + type + ".php" + more;
	
	if (container == null || container == '')
		var container = "priced_deals_" + type;
	
    try {    // Firefox, Opera 8.0+, Safari
        xmlHttp = new XMLHttpRequest();

    } catch (e) {    // Internet Explorer
        try {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {
            try {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e) {
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }

    xmlHttp.onreadystatechange = function() {
        if (xmlHttp.readyState == 4) {    // The request is complete
            // Get the data from the server's response
			document.getElementById(container).innerHTML = xmlHttp.responseText;
		}
    }

    xmlHttp.open("GET", url, true);
    xmlHttp.send(null);
}

