

function vavNavigate(brand, model, linkType) {
// we support 5 values for linkType
// @model is tricky because it is case-sensitive.

	//alert(brand + " " + model + " " + linkType);

	if (linkType == "colors") {
		var url = "/" + brand + "/" + model +"/colors.jsp";
		
		if (window.opener) {
			window.opener.location.href = url;
			window.opener.focus();
			window.close();
		} else {
			window.location.href = url;
		}
	
		
	}else if (linkType == "model_home") {
		var url = "/" + brand + "/" + model +"/index.jsp";
		
		if (window.opener) {
			window.opener.location.href = url;
			window.opener.focus();
			window.close();
		} else {
			window.location.href = url;
		}
	
		
	} else if (linkType == "byo") {
		var url = "/" + brand + "/" + model +"/index.jsp";
		
		if (window.opener) {
			window.opener.location.href = url;
			window.opener.focus();
			window.close();
		} else {
			window.location.href = url;
		}
	
	} else if (linkType == "photo_gallery") {
		var url = "/" + brand + "/" + model +"/gallery.jsp";
		
		if (window.opener) {
			window.opener.location.href = url;
			window.opener.focus();
			window.close();
		} else {
			window.location.href = url;
		}
	
	} else if (linkType == "raq") {
		var url = "/messaging/gmc/senddealer.jsp?msgTypeCD=BP&brand=" + brand + "&originatingBrand="+ brand +"&year=2007";

		popUpWindow(url,'raq_win','width=625,height=600,resizable=1');
		
	
	} else if (linkType == "estimate") {
		//var url = "/divisional/gmactools/gmactools.jsp?pageSection=estPayment&brand="+ brand;
		var url = "http://www.gmc.com/divisional/gmactools/gmactools.jsp?pageSection=estPayment&brand="+ brand
		
		popUpWindow(url,'est_window','width=840,height=640,resizable=1');
	
	} else if (linkType == "current_offers") {
		//var url = "/" + brand + "/" + model +"/current_offers.jsp";
		var url = "/currentoffers/index.jsp?brand=" + brand + "&site=retail";
		
		if (window.opener) {
			window.opener.location.href = url;
			window.opener.focus();
			window.close();
		} else {
			window.location.href = url;
		}
	
	}



}