var home_dir = "/";

function changeProductPicture(imgsrc, alt, height, width){
    document.getElementById("prod_pic").src = imgsrc;
    document.getElementById("prod_pic").alt = alt;
    document.getElementById("prod_pic").height = height;
    document.getElementById("prod_pic").width = width;
}

function changeProductPictureLarge(imgsrc, caption, height, width){
    document.getElementById("prod_pic_large").src = imgsrc;
    document.getElementById("prod_pic_large").alt = caption;
    document.getElementById("prod_pic_large").height = height;
    document.getElementById("prod_pic_large").width = width;
    document.getElementById("image_caption").innerHTML = caption;
}

function popup(url, id){
    new_window = window.open(url+'?id='+id, 'name', 'height=725, width=590');
    if(window.focus)
        new_window.focus();
    return false;
}

function finish_info(type){
    var details = "";
    if(type == "oak"){
        details += "<center><h2>Natural Oak</h2>";
        details += "<img src="+home_dir+"images/finishes/oak_bar.gif></center>";
        details += "<ul>";
        details += "<li>Bear in mind this is real American wood. All edges are rounded and hand polished. Gorgeous.</li>";
        details += "<li>This is NOT flimsy 5/8 particle board with plastic veneer and sharp edges that belong in a closet.</li>";
        details += "<li>These samples were scanned into digital format with tungsten light.</li>";
        details += "<li>The top sample on the left is natural Oak with a clear handrubbed lacquer.</li>";
        details += "<li>Light colored furniture appears to have less of a space impact on room size.</li>";
        details += "<li>Natural Oak has a very light tan cast. About 1/2 shade darker than Natural Maple.</li>";
        details += "<li><a href=# onclick=\"return popup('"+home_dir+"viewfinishes.php', 'oak')\">Click here for more details.</a></li>";
    }else if(type == "lbo"){
        details += "<center><h2>Light Brown Oak</h2>";
        details += "<img src="+home_dir+"images/finishes/lbo_bar.gif></center>";
        details += "<ul>";
        details += "<li>Light Brown Oak with lacquer. Our best seller</li>";
        details += "<li>We blend this color to complement the \"Light Brown Oak Finish\" that other manufacturers";
        details += " are putting on their furniture.</li>";
        details += "<li>This finish color is a very light brown stain wash with handrubbed lacquer topcoats. Our darkest finish.</li>";
        details += "<li><a href=# onclick=\"return popup('"+home_dir+"viewfinishes.php', 'lbo')\">Click here for more details.</a></li>";
    }else if(type == "mpl"){
        details += "<center><h2>Natural Maple</h2>";
        details += "<img src="+home_dir+"images/finishes/mpl_bar.gif></center>";
        details += "<ul>";
        details += "<li>Natural Maple with a clear handrubbed lacquer.</li>";
        details += "<li>Natural Maple is creamy white with some random tan. Our lightest finished wood.</li>";
        details += "<li>Maple shows the design of the piece with subtle graining.</li>";
        details += "<li><a href=# onclick=\"return popup('"+home_dir+"viewfinishes.php', 'mpl')\">Click here for more details.</a></li>";
    }else{
        details += "<center><h2>Black</h2>";
        details += "<img src="+home_dir+"images/finishes/blk_bar.gif></center>";
        details += "<ul>";
        details += "<li>Black with a clear handrubbed lacquer.</li>";
        details += "<li>A deep complete black with a clear lacquer finish. Very difficult to do right,";
        details += " hence the upcharge for all the handwork involved.</li>";
        details += "<li>This wood finish looks great with our gray tinted glass doors. Very 'high tech'!";
        details += " A lemon oil wiping will make this finish sparkle.</li>";
        details += "<li><a href=# onclick=\"return popup('"+home_dir+"viewfinishes.php', 'blk')\">Click here for more details.</a></li>";
    }
    
    details += "</ul>";
	document.getElementById("prod_pic").src = home_dir+"images/finishes/"+type+".gif";
    document.getElementById("details").innerHTML = details;
}
