/*
Component   : Imagepopup
Date        : 07/05/2001
Description : Pops up an image. 
*/

// Browser Detection
var isIE  = (document.all) ? 1 : 0;
var isNS4 = (document.layers) ? 1 : 0;        
var isNS6 = (document.getElementById && navigator.appName == "Netscape") ? 1 : 0;        

// Window Object
var imagepopupWindow = null;

// Set default status of parent window
window.defaultStatus = "";


// --------------------------------------------------------------------------------------------------------------------
//function popupWindow(largeimage, texttitle, imgwidth, imgheight, pageheading, print)

function popupWindow(largeimage, texttitle, imgwidth, imgheight)
{
    //print = (print != null) ? print : "printoff";
    
    var print = "printoff";
    
    
    // Declarations
    var largeimage = "images/portfolio/" + largeimage;        
    
    var imgpopupString = "";            
    
    // Open window object
    if (print == "printoff") {
        var windowimgheight = imgheight + 60;
        var resizeimgheight = windowimgheight;
        imagepopupWindow = window.open("", "imagepopupWindow", "width="+imgwidth+",height="+resizeimgheight);                        
    }
    else {
        var windowimgheight = (isIE) ? imgheight + 40 : imgheight + 60;        
        var resizeimgheight = windowimgheight + 80;
        imagepopupWindow = window.open("", "imagepopupWindow", "menubar,width="+imgwidth+",height="+resizeimgheight);                        
    }        
                        
    // Write contents to window object    
    imgpopupString += "<html><head><title>Zoom &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</title><link rel=stylesheet type=text/css href=sitestyle.css></head>\n";
    imgpopupString += "<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0";
    imgpopupString += " onResize=this.resizeTo("    
    imgpopupString += imgwidth;
    imgpopupString += ","+(resizeimgheight)+") class=imgpopup>\n";    
    
    imgpopupString += "<div class=imgpopup align=center>"
    //imgpopupString += "<br>";
    imgpopupString += texttitle;
    imgpopupString += "</div>\n"
    
    imgpopupString += "<br>";
    
    imgpopupString += "<img src=" +largeimage+" width="+imgwidth+" height="+imgheight+" border=0>\n";
    
    imgpopupString += "<div class=imgpopup align=center valgin=middle>\n"
    imgpopupString += "<table width=100 border=0 cellpadding=5 cellspacing=0 align=center>\n";
    imgpopupString += "<tr>\n";
    imgpopupString += "<td align=right><a class=imgpopupclosebutton title=close href=\"javascript:close()\"><img src=images/iconclose.gif border=0 alt=close></a></td>\n";
    imgpopupString += "<td><a class=imgpopupclosebutton title=close href=\"javascript:close()\">Close</a></td>\n"
    imgpopupString += "</tr>\n";
    imgpopupString += "</table>\n";    
    imgpopupString += "</div>\n"
    
    imgpopupString += "</body></html>"                                                                                
    
    // Create the contents of the window    
    imagepopupWindow.document.write(imgpopupString);
    imagepopupWindow.document.close();  
    imagepopupWindow.focus();    
}    
