$("c911").onmouseover = function () {this.className = "over";showPopup("c911");clearPopUpTimeout();}
$("c911").onmouseout = function () {this.className = "";hideModelPopup();}
$("c911").onclick = function () {window.location="/searchnewv.aspx?model=911&hpForm=1";}

$("c911_p").onmouseover = function () {showPopup("c911");clearPopUpTimeout();}
$("c911_p").onmouseout = function () {hideModelPopup();}
//_________________
$("boxster").onmouseover = function () {this.className = "over";showPopup("boxster");clearPopUpTimeout();}
$("boxster").onmouseout = function () {this.className = "";hideModelPopup();}
$("boxster").onclick = function () {window.location="/searchnewv.aspx?model=cx-9&hpForm=1";}

$("boxster_p").onmouseover = function () {showPopup("boxster");clearPopUpTimeout();}
$("boxster_p").onmouseout = function () {hideModelPopup();}

//_________________
$("cayenne").onmouseover = function () {this.className = "over";showPopup("cayenne");clearPopUpTimeout();}
$("cayenne").onmouseout = function () {this.className = "";hideModelPopup();}
$("cayenne").onclick = function () {window.location="/searchnewv.aspx?model=cayenne&hpForm=1";}

$("cayenne_p").onmouseover = function () {showPopup("cayenne");clearPopUpTimeout();}
$("cayenne_p").onmouseout = function () {hideModelPopup();}
//_________________
$("cayman").onmouseover = function () {this.className = "over";showPopup("cayman");clearPopUpTimeout();}
$("cayman").onmouseout = function () {this.className = "";hideModelPopup();}
$("cayman").onclick = function () {window.location="/searchnewv.aspx?model=cayman&hpForm=1";}

$("cayman_p").onmouseover = function () {showPopup("cayman");clearPopUpTimeout();}
$("cayman_p").onmouseout = function () {hideModelPopup();}
//_________________
$("panamera").onmouseover = function () {this.className = "over";showPopup("panamera");clearPopUpTimeout();}
$("panamera").onmouseout = function () {this.className = "";hideModelPopup();}
$("panamera").onclick = function () {window.location="/searchnewv.aspx?model=panamera&hpForm=1";}

$("panamera_p").onmouseover = function () {showPopup("panamera");clearPopUpTimeout();}
$("panamera_p").onmouseout = function () {hideModelPopup();}
//_________________

var vehicleModels = new Array();
vehicleModels[0] = "c911";
vehicleModels[1] = "boxster";
vehicleModels[2] = "cayenne";
vehicleModels[3] = "cayman";
vehicleModels[4] = "panamera";

function showPopup(currentModel){
if($("modelsPopUp").style.display == "none"){
 $("modelsPopUp").style.display = "block";
 }
 for(var i = 0; i < vehicleModels.length; i++){
  if(vehicleModels[i] == currentModel){
 	 	$(vehicleModels[i]+'_p').style.display = "block";
			$(vehicleModels[i]+'_p').style.zIndex = 999;
  }
 	else{
 	 $(vehicleModels[i]+'_p').style.display = "none";
	 $(vehicleModels[i]+'_p').style.zIndex = 1;
  }

 }

}

 var popupTimeout;
function hideModelPopup(){ popupTimeout = setTimeout('new Effect.Fade("modelsPopUp");', 200); }
function clearPopUpTimeout(){  clearTimeout(popupTimeout); }

 