/* $Id: script.js,v 1.15 2004/04/20 18:11:02 kris Exp $ */

//launch new windows from index
function NewWindow1(PageName, WindowName){
    var high = window.screen.height;
    if (high > 700){ // larger desktops (825x615, no scrollbar, placed down from corner)
        window.open(PageName, WindowName, 'status=no, menubar=no,  scrollbars=, resizable=no, width=825, height=615, top=15, left=35');
    }else{           // small desktops (770x570, with scrollbar, in corner)
        window.open(PageName, WindowName, 'status=no, menubar=no,  scrollbars=yes, resizable=yes, width=785, height=540, top=0, left=0');
    }
}


//launch new window from research
function NewWindow2(FileName, WindowName, width, height, title, link){
    text = "'status=no, menubar=no,  scrollbars=no, resizable=yes, width=" + width + ", height=" + height + ", top=10, left=0'";
    if (title != 'blank'){ 
        ImgName = FileName;
        FileName = 'yeh_generated.html';
    }
    new1 = window.open(FileName, WindowName, text);
    if (title != 'blank'){
        new1.document.writeln("<html><head><title>" + title + "</title><link rel='stylesheet' type='text/css' href='ERTpix.css' title='default'></head><body>");
        new1.document.writeln("<table><tr><td colspan='2'><img src=" + ImgName + " border=0 alt='" + title + "'></td></tr>");
        new1.document.writeln("<tr><td><a id='cl' href='javascript: self.close()'><b>Close Window</b></a></td>");
        if (link){
            new1.document.writeln("<td id='smbd'>Work done with <a href='http://www.watermc.com' target='_blank'>Water Management</a></td></tr></table></body></html>");
        }else{
            new1.document.writeln("<td></td></tr></table></body></html>");
        }
    }
}


