 //to open Pictures new window
        function openWindow(url, width, height, attributes) {
        var h,w;
        var x,y;
        h=window.screen.height;
        w=window.screen.width;
        x = (w - width)/2
        y = (h - height)/2
        var mywin=window.open(url,"opener","left=" + x + ",top=" +  y + ",width=" + width + ",height=" + height+ "," + attributes )        
        return mywin;
        }
        //to open Pictures new window
        function openWindow2(pictures,title, width, height, attributes, windowTitle) {
        var h,w;
        var x,y;
        h=window.screen.height;
        w=window.screen.width;
        x = (w - width)/2
        y = (h - height)/2
        var mywin=window.open("","opener","left=" + x + ",top=" +  y + ",width=" + width + ",height=" + height+ "," + attributes )
        //alert(mywin.document.title)
        //mywin.document.write(windowTitle);
        if (windowTitle==null) windowTitle = "&nbsp;" 
            //alert(windowTitle)
            else{
                mywin.document.write ("<HTML><HEAD><TITLE>" + windowTitle + "</TITLE>");
                mywin.document.write ("<link type=\"text/css\" href=\"includes/Style.css\" rel=\"stylesheet\" />");
                mywin.document.write ("</HEAD>");                                
                mywin.document.write ("<BODY><div align=center>");                                
                mywin.document.write ("<table align=\"center\" width=\"90%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" bordercolor=\"lightGrey\">");
                for (var i=0; i< pictures.length; i++)
                {
                    mywin.document.write ("  <Tr>");
                    mywin.document.write ("    <td  align=\"center\" valign=\"top\" >");
                    mywin.document.write ("      <img src=\"" + pictures[i] + "\" alt=\"" + title[i] + "\"></img></td>");
                    mywin.document.write ("    <td></td></tr>");
                    mywin.document.write ("<tr>");
                    mywin.document.write ("<td class=\"blacktext\"  align=\"center\"><BR>" + title[i] + "<BR><BR></td>");
                    mywin.document.write ("<td></td>");
                    mywin.document.write ("</tr>");
                }
                mywin.document.write ("</table>");
                mywin.document.write ("</div></body>");                                
                mywin.document.write ("</HTML>");
            }
        //mywin.document.write = "test";
        
        //mywin.document.title = windowTitle;
        
        //mywin.moveTo(x,y)
        return mywin;
        }
