function init(){
myimg=new Array("img/TG_1.jpg","img/TG_2.jpg","img/TG_3.jpg",
"img/Accent_1.JPG","img/Accent_2.JPG","img/Accent_3.JPG",
"img/Elantra_1.JPG","img/Elantra_2.JPG","img/Elantra_3.JPG")
newImg=new Array() // create a new array

for(i=0;i<myimg.length;i++){
newImg[i] = new Image() // create a new image object for each image
newImg[i].src =myimg[i] // assign src to new image object
}

Width=screen.availWidth  // for centering window
Height=screen.availHeight // for centering window
}

picWin=null
close_win=""
function showme(n){
if(picWin){picWin.close()} // if window exists close it
clearTimeout(close_win)

posx= (Width-newImg[n].width)/2 // for centering window
posy= (Height-newImg[n].height)/2 // for centering window


var winProps = "left= "+posx+", top = "+posy+", width="+(newImg[n].width+2)+", height="+(newImg[n].height+2)+", scrollbars=no, toolbar=no, directories=no, menu bar=no, resizable=no, status=yes";
picWin=window.open("","picWin",winProps);
picWin.document.open();
picWin.document.write("<body style='margin:1px;'><img src='"+newImg[n].src+"' width='"+(newImg[n].width)+"' height='"+(newImg[n].height)+"' ></body> ");
picWin.document.close();
close_win=setTimeout("picWin.close()",5000) // close window in 3 seconds


/*
var winProps = "left= "+posx+", top = "+posy+", width="+(newImg[n].width)+", height="+(newImg[n].height)+", scrollbars=no, toolbar=no, directories=no, menu bar=no, resizable=no, status=yes"
picWin=window.open("","picWin",winProps)
picWin.document.write("<HTML><HEAD><TITLE></TITLE></HEAD>")
picWin.document.write("<BODY bgcolor='black' topmargin=0 leftmargin=0 style='overflow:hidden'>")
picWin.document.write("<img src='"+newImg[n].src+"'>")
picWin.document.write("</BODY></HTML>")
close_win=setTimeout("picWin.close()",5000) // close window in 3 seconds
*/

/*
FULLSCREEN WINDOW
var winProps = "left= "+posx+", top = "+posy+", width="+(newImg[n].width)+", height="+(newImg[n].height)+", scrollbars=no, toolbar=no, directories=no, menu bar=no, resizable=yes, status=no";
picWin=window.open("",'','fullscreen');
picWin.document.write("<HTML><HEAD><TITLE></TITLE></HEAD>");
picWin.document.write("<BODY bgcolor='black' topmargin=0 leftmargin=0 style='overflow-y:hidden'>");
picWin.document.write("<center><img src='"+newImg[n].src+"'></center>");
picWin.document.write("</BODY></HTML>")
picWin.resizeTo(newImg[n].width,newImg[n].height)
picWin.moveTo(posx,posy)
close_win=setTimeout("picWin.close()",3000) // close window in 3 seconds
*/

document.getElementById("h2").innerHTML=newImg[n].height
document.getElementById("w2").innerHTML=newImg[n].width
}

// -->