if (document.images) {	
	img1on = new Image();
	img1on.src = "../images/newarrivals-l.png";
	img2on = new Image();
	img2on.src = "../images/currentinventory-l.png";
	img3on = new Image();
	img3on.src = "../images/comingsoon-l.png";
	img4on = new Image();
	img4on.src = "../images/recentsales-l.png";
	img5on = new Image();
	img5on.src = "../images/carfinder-l.png";
	img6on = new Image();
	img6on.src = "../images/sellus-l.png";
	img7on = new Image();
	img7on.src = "../images/contactus-l.png";
	img8on = new Image();
	img8on.src = "../images/map-l.png";
	img9on = new Image();
	img9on.src = "../images/financing-l.png";
	img10on = new Image();
	img10on.src = "../images/resources-l.png";
	
	
	img1off = new Image();
	img1off.src = "../images/newarrivals.png";
	img2off = new Image();
	img2off.src = "../images/currentinventory.png";
	img3off = new Image();
	img3off.src = "../images/comingsoon.png";
	img4off = new Image();
	img4off.src = "../images/recentsales.png";
	img5off = new Image();
	img5off.src = "../images/carfinder.png";
	img6off = new Image();
	img6off.src = "../images/sellus.png";
	img7off = new Image();
	img7off.src = "../images/contactus.png";
	img8off = new Image();
	img8off.src = "../images/map.png";
	img9off = new Image();
	img9off.src = "../images/financing.png";
	img10off = new Image();
	img10off.src = "../images/resources.png";
}

function imgOn(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}

function imgOff(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "off.src");
	}
}

function newWindow(itemcode){
	infoWindow=window.open(itemcode,'moreinfo','width=500,height=600,left=0,top=0,menubar=0,status=0,toolbar=0,resizable=yes,scrollbars=yes')
	infoWindow.focus()
}


function toggleDiv(divname)
{
  if (divname == "adminPWD")
  {
    if(document.getElementById('adminPWD').style.display == 'none')
    {
      document.getElementById('adminPWD').style.display = 'block';
    }
    else
    {
      document.getElementById('adminPWD').style.display = 'none';
    }    
  }
}

function displayAdminPWD(selected_item)
{
//  if (selected_item == "admin")
//  {
    toggleDiv("adminPWD");
//  }
}

function  _CF_checkCFForm_1(_CF_this)

{

	return true;

}



function  _CF_checkCFForm_2(_CF_this)

{

	if  (!_CF_hasValue(_CF_this.name, "TEXT" ))

	{

		if  (!_CF_onError(_CF_this, _CF_this.name, _CF_this.name.value, "Please type in your name."))

		{

			return false;

		}

	}



	if  (!_CF_checkregex(_CF_this.email.value, /[A-Za-z0-9_-]+@[A-Za-z0-9--]+\.[A-Za-z]+/))

	{

		if  (!_CF_onError(_CF_this, _CF_this.email, _CF_this.email.value, "Please type in a valid email address."))

		{

			return false;

		}

	}



	if  (!_CF_hasValue(_CF_this.make, "TEXT" ))

	{

		if  (!_CF_onError(_CF_this, _CF_this.make, _CF_this.make.value, "Please type in the make of the vehicle."))

		{

			return false;

		}

	}



	if  (!_CF_hasValue(_CF_this.model, "TEXT" ))

	{

		if  (!_CF_onError(_CF_this, _CF_this.model, _CF_this.model.value, "Please type in the model of the vehicle."))

		{

			return false;

		}

	}



	return true;

}





function HideContent(d) {

  if(d.length < 1) { return; }

  document.getElementById(d).style.display = "none";

}

function ShowContent(d) {

  if(d.length < 1) { return; }

  document.getElementById(d).style.display = "block";

}

function ReverseContentDisplay(d1, d2) {

  if(document.getElementById(d1).style.display == "none") { 

    document.getElementById(d1).style.display = "block";

    document.getElementById(d2).style.display = "none";

  }

  else { 

    document.getElementById(d2).style.display = "block";

    document.getElementById(d1).style.display = "none";

  }

}


