function overColor(id, color) {
    document.getElementById(id).style.backgroundColor = color;
}
function TopBarReg() {
    TopBarColor("black");
}
function TopBarColor(color) {
    document.getElementById("topbar1").style.backgroundColor = color;
}

function changeImage(imgName, num) {
    var img = document.getElementById(imgName);
    img.src = im[num].src;
}
var o1;
var imag;
imag = new Array();
imag[0] = "images/tv_staticshielding.jpg";
imag[1] = "images/tv_standuppackaging.jpg";
imag[2] = "images/tv_foils.jpg";
imag[3] = "images/tv_clearpackaging.jpg";
imag[4] = "images/tv_rollssheetsandtubing.jpg";
imag[5] = "images/tv_corrosionprevention.jpg";
imag[6] = "images/tv_desiccants.jpg";
var im = new Array();
for (var i = 0; i < imag.length; i++) {
    im[i] = new Image();
    im[i].src = imag[i];
}

function tableOverLight(id) {
    var backId = "background" + id;
    var bottomId = "bottomtext" + id;
    document.getElementById(backId).style.backgroundColor = "#ddd";
    document.getElementById(bottomId).style.color = "black";
}
function tableOverReg(id) {
    var backId = "background" + id;
    var bottomId = "bottomtext" + id;
    document.getElementById(backId).style.backgroundColor = "#fff";
    document.getElementById(bottomId).style.color = "gray";
}

function createNewWindow(theImage) {
	var newWindow = window.open("",null,"height=335,width=435");
    if (newWindow != null) {
        newWindow.document.write(
        "<html>" +
            "<head>" +
                "<title>TECHFLEX PICTURE VIEWER</title>" +
                "<style>" +
                    "body  {margin: 0 auto; padding: 0;background-color:Gray;text-align:center;}" +
                    "#fimg1 {text-align:center;background-color: gray;margin: 10px;border-style: none;}" +
                    "#pic_body {background-color:Gray;}" +
                    ".title {background-color:Gray;margin:0;padding:0;text-align:center;}" +
                    ".gray_title {width:100%;background-color:black;text-align:center;color:White;padding-left:20px;float:left;padding-top:5px;padding-bottom:5px;}" +
                "</style>" +
            "</head>" +
            "<body>" +
                "<div id='pic_body'>" +                   
                        "<span class='gray_title'>" +
                             "<b>TECHFLEX PICTURE VIEWER</b></span>" +
                    "<a href='javascript:self.close();'><img class='fimg1' border='0' src='" + theImage + "'  alt=''/></a>" +
                "</div>" +
            "</body>" +
        "</html>"
        
        );
    }
}

