$(document).ready(function() {
    $("a[href^='http://']").click(function(){
        if(this.href.match('www2.compu-quote.com')){
          	window.open(pageTracker._getLinkerUrl(this.href));
            return false;
        } else if (this.rel != 'internal') {
          	window.open(this.href);           
            return false;
        }
    }); 
    
    $("a[href^='https://']").click(function(){
        if(this.href.match('www2.compu-quote.com')){
          	window.open(pageTracker._getLinkerUrl(this.href));
            return false;
        } else if (this.rel != 'internal') {
          	window.open(this.href);           
            return false;
        }
    });
});



var hideDelayTimer;

function showSocial(theDiv) {
	document.getElementById(theDiv).style.display = 'block';
}
function hideSocial(theDiv) {
	hideDelayTimer = setTimeout ("hideIt('socialBox')", 1000 );
}
function hideIt(theDiv) {
	document.getElementById(theDiv).style.display = 'none';
}

function expandSection(nodeId, theLink) {
	if(document.getElementById(nodeId).style.display == "block") {
	    document.getElementById(nodeId).style.display = "none";	    
		theLink.style.backgroundImage = "url(/images/menu-plus.gif)";
    } else {	
	    document.getElementById(nodeId).style.display = "block";
		theLink.style.backgroundImage = "url(/images/menu-minus.gif)";
    }
}

function collapseSection(nodeId, theLink) {
    document.getElementById(nodeId).style.display = "none";
	theLink.style.backgroundImage = "url(/images/menu-minus.gif)";
}

function switchToNext(el) {
    if (el.value.length < el.getAttribute('maxlength')) return;

    var nextEl = el.form.elements[el.tabIndex+2];        
    if (nextEl && nextEl.focus) nextEl.focus();
}
