//---------------------------------------------------------------------
// Make Window - Car Photo
//---------------------------------------------------------------------
function makeWindow(winName, photo, make, model, year, varHeight)
{

var PhotoHeight   = varHeight;

var newContent ="<html>";

newContent += "<head>";
newContent += "<meta http-equiv=\"Content-Type\" content=\"text/html\; charset=iso-8859-1\">";
newContent += "<title>Car Details : " + make + " - " + model + "</title>";

newContent += "<style>";
newContent += "<\!--";
newContent += "body \{ scrollbar-arrow-color\:#000000\; ";
newContent += "scrollbar-base-color\:white\; ";
newContent += "scrollbar-track-color\:#FFFFFF\; ";
newContent += "scrollbar-face-color\:\#FFFFFF\;\}";
newContent += "-->";
newContent += "</style>";

newContent += "</head>";

newContent += "<body bgcolor=#CCCCCC>"; 

newContent += "<center>";


if (photo != "") {
  newContent += "<img name=\"pic\" ";
  newContent += "src=\"../images/" + photo + "\" align=\"center\" height=" + PhotoHeight + ">";
}
else {
  newContent += "Photo Unavailable";
}

newContent += "<table><tr>";
newContent += "<td style=\"color=#000000; font-family=Verdana, Arial, sans-serif; font-weight=bold; font-size=12;\" align=\"center\">";
newContent += make + " - " + model + " - " + year + "</td></tr></table>";
newContent += "<form>";
newContent += " <input type=\"Button\" value=\"close\" onClick=\"self.close()\">";
newContent += "</form>";
newContent += "</center>";
newContent += "</body></html>";

var newWindow = window.open("",winName,"width=650,height=600,scrollbars,resizable");

windowCenter(newWindow,600,650);

newWindow.document.write(newContent);
newWindow.document.close();

}

//---------------------------------------------------------------------
// windowCenter : centering window on screen
//---------------------------------------------------------------------
function windowCenter(newWindow, varHeight, varWidth)
{
var window_height = varHeight;
var window_width  = varWidth;

var height = window.screen.availHeight;
var width  = window.screen.availWidth;

var left_point = parseInt(width/2)  - parseInt(window_width/2);
var top_point  = parseInt(height/2) - parseInt(window_height/2);

newWindow.moveTo(left_point, top_point);

}


