function popImage1(imageURL,imageTitle){
imgWin=window.open('about:blank','','scrollbars=no,resizable=yes,width=500,height=375');

with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var NS = (navigator.appName=="Netscape")?true:false;');
writeln('function FitPic() {');
writeln('iWidth = (NS)?window.innerWidth:document.body.clientWidth;');
writeln('iHeight = (NS)?window.innerHeight:document.body.clientHeight;');
writeln('iWidth = document.images[0].width - iWidth;');
writeln('iHeight = document.images[0].height - iHeight;');
writeln('window.resizeBy(iWidth, iHeight);');
writeln('self.focus();');       

writeln('if (document.all) {');
writeln('w = window.opener.document.body.clientWidth;');
writeln('h = screen.availHeight;');
writeln('scrLeft = window.opener.screenLeft;');
writeln('popW = document.body.clientWidth;');
writeln('popH = document.body.clientHeight;}');
writeln('else {');
writeln('w = window.opener.innerWidth;');
writeln('h = screen.availHeight;');
writeln('scrLeft = window.opener.screenX;');
writeln('popW = window.outerWidth;');
writeln('popH = window.outerHeight;}');

writeln('var leftPos = (w-popW)/2, topPos = (h-popH)/2;');
writeln('window.moveTo(scrLeft + leftPos, topPos);}');

writeln('function doTitle(){document.title="'+imageTitle+'";}');

writeln('</sc'+'ript>');
writeln('</head><body bgcolor="#999999" onload="FitPic();doTitle();self.focus()" onblur="self.close()">');
writeln('<div align="center"><img name="<%= $site_name %>" src='+imageURL+'></div></body></html>');
close();		
}}

function popImage2(imageURL,imageTitle){
imgWin=window.open('about:blank','','scrollbars=yes,resizable=yes,width=500,height=375');

with (imgWin.document){
writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
writeln('var NS = (navigator.appName=="Netscape")?true:false;');
writeln('function FitPic() {');
writeln('iWidth = (NS)?window.innerWidth:document.body.clientWidth+17;');
writeln('iHeight = (NS)?window.innerHeight:document.body.clientHeight;');
writeln('iWidth = document.images[0].width - iWidth+17;');
writeln('iHeight = document.images[0].height - iHeight;');
writeln('if (iHeight > screen.height-576) {window.resizeBy(iWidth, screen.height-575);}');
writeln('else {window.resizeBy(iWidth, iHeight);}');

writeln('self.focus();');       

writeln('if (document.all) {');
writeln('w = window.opener.document.body.clientWidth;');
writeln('h = screen.availHeight;');
writeln('scrLeft = window.opener.screenLeft;');
writeln('popW = document.body.clientWidth;');
writeln('popH = document.body.clientHeight;}');
writeln('else {');
writeln('w = window.opener.innerWidth;');
writeln('h = screen.availHeight;');
writeln('scrLeft = window.opener.screenX;');
writeln('popW = window.outerWidth;');
writeln('popH = window.outerHeight;}');

writeln('var leftPos = (w-popW)/2, topPos = (h-popH)/2;');
writeln('window.moveTo(scrLeft + leftPos, topPos);}');

writeln('function doTitle(){document.title="'+imageTitle+'";}');

writeln('</sc'+'ript>');
writeln('</head><body bgcolor="#999999" onload="FitPic();doTitle();self.focus()" onblur="self.close()">');
writeln('<div align="center"><img name="<%= $site_name %>" src='+imageURL+' ></div></body></html>');
close();		
}}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function updatesFromXML(fragments, xml) {
  for(fragment in fragments) {
    var matches = new RegExp("<" + fragment + 
    "><!\\[CDATA\\[([\\s\\S]*)\\]\\]></" + fragment + 
    ">").exec(xml);
    if(matches) {
      $(fragments[fragment]).innerHTML = matches[1];
    }
  }
}