function changemake(id) {
 $.post('/auto/getmodel/', {'id': id},  function(data){
  //alert("Data Loaded: " + data);
  document.getElementById('modelselect').innerHTML = data;
  
  });

}
function LoadMainSearchModels(part) {
	 $.get('/ajax.php?mode=getmodel&part='+part,  function(data){
  document.getElementById('mainsearchmodel').style.display="block";
  document.getElementById('mainsearchmodel').innerHTML = data;
  });
}
function UpdateYears() {
	document.getElementById('year1').disabled=false;
	document.getElementById('year2').disabled=false;
	
}

//
function Expand(id)
{
var $state = document.getElementById('splitter'+id).style.display;
if ($state =='none') document.getElementById('splitter'+id).style.display = 'inline';
else document.getElementById('splitter'+id).style.display = 'none';
}
function genVinReport() {
	var vin=$('#vin').val();
	if (vin.length!=17) {
		alert("Check vin first!");
	} else {
		window.open('http://autoauctionhelp.com/app/autocheck_report_generator.php?vin='+vin);
	}
	
}
function addBookmark(title,url) {

  var msg_netscape = "NetScape message";
  var msg_opera    = "This function does not work with this version of Opera.  Please bookmark us manually.";
  var msg_other    = "Your browser does not support automatic bookmarks.  Please bookmark us manually.";
  var agt          = navigator.userAgent.toLowerCase();


  if (agt.indexOf("opera") != -1) 
  {
    if (window.opera && window.print)
    {
      return true;
    } else 
    {
      alert(msg_other);
    }
  }    
  else if (agt.indexOf("firefox") != -1) window.sidebar.addPanel(title,url,"");
  else if ((agt.indexOf("msie") != -1) && (parseInt(navigator.appVersion) >=4)) window.external.AddFavorite(url,title); 
  else if (agt.indexOf("netscape") != -1) window.sidebar.addPanel(title,url,"")         
  else if (window.sidebar && window.sidebar.addPanel) window.sidebar.addPanel(title,url,""); 
  else alert(msg_other);
  
}


