// JavaScript Document

// other functions for Mintys Whoniverse
// Copyright mintys whoniverse 2008  && Webs For Everyone



//function open window to show BIG picture in build diary pages


function enlargeImage(elem, buildSection) {

MyWindow = window.open ('','myAdWin', 'status=1, toolbar=0, location=0,menubar=0,directories=0, resizeable=0,height=700, width=810');//there is no vaiable in the first set of speech marks, where the file name or image name would usually be stated

var newPic = elem.getAttribute('href');
var newCaption = elem.firstChild.getAttribute('alt');


//MyWindow.document.write('<img src="' + newPic + '" alt="' + newCaption +'" />\n');



MyWindow.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n');
MyWindow.document.write('<html xmlns="http://www.w3.org/1999/xhtml">\n');
MyWindow.document.write('<head>\n');
MyWindow.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />\n');
MyWindow.document.write('<title>Build Diary Image Viewer</title>\n');
MyWindow.document.write('<style type="text/css">\n');
MyWindow.document.write('<!--\n');
MyWindow.document.write('@import url("../styles/buildDPages.css");\n');
MyWindow.document.write('@import url("../styles/style.css");\n');
MyWindow.document.write('-->\n');
MyWindow.document.write('</style>\n');
MyWindow.document.write('</head>\n');						
MyWindow.document.write('<body>\n');						
MyWindow.document.write('<div class="BDPageContainerIMG">\n');						
MyWindow.document.write('<div class="BDPageTopIMG"></div>\n');						
MyWindow.document.write('<div class="BDPageRow2">\n');
MyWindow.document.write('<div class="BDPageRow21IMG"></div>	\n');					
MyWindow.document.write('<div class="BDPageRow22IMG" align="left"><span class="styleDetailsBBred">' + buildSection + '</span></div>\n');						
MyWindow.document.write('<div class="BDPageRow23IMG"></div>	\n');					
MyWindow.document.write('<div class="BDPageRow24IMG" align="left"><span class="styleDetailsBBred">' + newCaption + '</span></div>\n');						
MyWindow.document.write('<div class="BDPageRow25IMG"></div>\n');
MyWindow.document.write('</div> <!-- end BDPageRow2 -->\n');
MyWindow.document.write('<div class="BDPageRow3IMG"></div><!-- this is text and top of box" -->\n');
MyWindow.document.write('<div class="BDPageMainTextBoxIMG">\n');
MyWindow.document.write('<div class="BDPageContentGapLL"></div>\n');
MyWindow.document.write('<div class="BDPageContentTextIMG">	\n');					
MyWindow.document.write('<img src="' + newPic + '" alt="' + newCaption + '"/>\n');						
MyWindow.document.write('</div> <!-- end BDPageContentText -->\n');						
MyWindow.document.write('</div><!-- BDPageMainTextBox -->	\n');					
MyWindow.document.write('<div class="BDPageBottom"></div>\n');
MyWindow.document.write('</div><!-- end class .BDPageContainerIMG -->\n');						
MyWindow.document.write('</body>\n');
MyWindow.document.write('</html>\n');

//MyWindow.blur();//this ensure the "main wondow" is in 'focus' i.e. ontop
 MyWindow.focus();// this ensures taht the pop up window is in 'focus' i.e. ontop

}
// #################################   end function  ##########################




