function MM_openBrWindow(theURL,winName,features) { /*v2.0*/ window.open(theURL,winName,features); }
/*StatCounter*/ var sc_project=399019; var sc_partition=2; var sc_security=""; 

function SearchRedirect()
{
    var term = document.getElementById("searchBox").value;
    if(term != '' && term != 'Enter search keyword')
        window.location.href = 'http://www.automedia.com/search.aspx?terms='+term;
}

function NewsletterRedirect()
{
    var email = document.getElementById("newsletterBox").value;
    if(email != '' && email != 'Enter email address')
        window.location.href= 'http://www.automedia.com/NewsletterSignUp.aspx?Email=' + email;
}

function chgPhoto(url){$("mPhoto").src=url; return false;}//-->
function popUnderWindow(theURL)
{
	TheNewWin = window.open(theURL,'PopUnder','toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1');
	TheNewWin.blur();
	return false;
}

function updateModels()
{
	var selObj = document.forms[0].leftNavMake;
	var selIndex = selObj.selectedIndex;

	jx.load('/leftNavGetModels.aspx?Make=' + selObj.options[selIndex].value,function(data){document.getElementById('leftNavModel').innerHTML = data;},'text','get');
}

function updateRightModels()
{
	var selObj = document.forms[0].RightNavMake;
	var selIndex = selObj.selectedIndex;

	jx.load('/leftNavGetModels.aspx?Make=' + selObj.options[selIndex].value,function(data){document.getElementById('rightNavModel').innerHTML = data;},'text','get');
}


function getNcbgUrl()
{
	var url = 'http://www.automedia.com/2009-New-Car-Buyers-Guide/'+document.forms[0].leftNavMake.options[document.forms[0].leftNavMake.selectedIndex].value + '-' + document.getElementById('models').options[document.getElementById('models').selectedIndex].value+'/car/';

	window.location=url;
}

function getRightNcbgUrl()
{
	var url = 'http://www.automedia.com/2009-New-Car-Buyers-Guide/'+document.forms[0].RightNavMake.options[document.forms[0].RightNavMake.selectedIndex].value + '-' + document.getElementById('models').options[document.getElementById('models').selectedIndex].value+'/car/';

	window.parent.location=url;
}

function getRightGetAQuoteUrl()
{
	var url = '/Get-A-Quote.aspx?Year='+document.forms[0].ddlYear.options[document.forms[0].ddlYear.selectedIndex].value + '&Make=' + document.getElementById('ddlMake').options[document.getElementById('ddlMake').selectedIndex].value +'&Model=' + document.getElementById('ddlModel').options[document.getElementById('ddlModel').selectedIndex].value + '&Zip='+ document.getElementById('txtZip').value;

	window.parent.location=url;
}
