//---------------------------------------------------------------------------------------
//
//         New Win Lightbox by Marek Bakalarczuk
//
//         version: 1.0.12
//
//---------------------------------------------------------------------------------------
function openwin(url,title,width,height)
      { 
var isNav = (navigator.appName == "Netscape")?1:0; 
var isIE = (navigator.appName.indexOf("Microsoft")!= -1)?1:0; 
if (width < screen.width){
leftV = (screen.width - width) / 2;
}
else 
{
leftV=0;
}
if (height < screen.height) {
topV = (screen.height - height) / 2;
}
else
{
topV=0;
}
if (isIE){
OpenWindow=window.open("", "newwin", "height="+height+",width="+width+",toolbar=no,scrollbars=no, titlebar=no,menubar=no,fullscreen=yes");
OpenWindow.document.write("<TITLE>"+title+"</TITLE>");
OpenWindow.document.write("<BODY style='margin: 0 0 0 0;overflow:hidden;background:url(images/backgrnd.jpg);'>");
OpenWindow.document.write("<div style='padding: 10px; position:relative;left:"+(leftV-10)+"px;top:"+(topV-40)+"px;height:"+(height+20)+"px;width:"+(width+20)+"px;background:#ffffff;'>");
OpenWindow.document.write("<a href='javascript:window.close();'><img style='border: 0px; width:"+width+"px;height:"+height+"px;' src='"+url+"'/></a>");
OpenWindow.document.write("</div>");
OpenWindow.document.write("<div style='font-family: tahoma; font-weight:bold;font-size:8pt;color:darkgray;padding:5px;background: #ffffff;width:"+(width+20)+"px;position:relative;left:"+(leftV-10)+"px;top:"+(topV-40)+"px;'>");
OpenWindow.document.write("<div style='width:"+((width+10)/2)+"px;text-align:left;float:left;'>"+title+" </div><div style='width:"+((width+10)/2)+"px;text-align:right;float:left;'><a href='javascript:window.close();'><img style='border: 0px;vertical-align:middle;' src='images/closelabel.gif'/></a></div>");
OpenWindow.document.write("</div>");
OpenWindow.document.write("</BODY>");
OpenWindow.document.write("</HTML>");
  
  // Just in case left and top are ignored
  OpenWindow.focus();
}
  else if (isNav){
  OpenWindow=window.open("", "newwin", "height="+screen.height+",width="+screen.width+",statusbar");
OpenWindow.document.write("<TITLE>"+title+"</TITLE>");
OpenWindow.document.write("<BODY style='margin: 0 0 0 0;overflow:hidden;background:url(images/backgrnd.jpg);'>");
OpenWindow.document.write("<div style='background:#ffffff;padding:10px;position:relative;left:"+(leftV-10)+"px;top:"+(topV-80)+"px;height:"+(height+20)+"px;width:"+(width+10)+"px;'>");
OpenWindow.document.write("<a href='javascript:window.close();'><img style='border: 0px;' src='"+url+"'/></a>");
OpenWindow.document.write("</div>");
OpenWindow.document.write("<div style='font-family: tahoma; font-weight:bold;font-size:8pt;color:darkgray;padding:5px;background: #ffffff;width:"+(width+20)+"px;height:30px;position:relative;left:"+(leftV-10)+"px;top:"+(topV-80)+"px;'>");
OpenWindow.document.write("<div style='width:"+((width+10)/2)+"px;text-align:left;float:left;'>"+title+" </div><div style='width:"+((width+10)/2)+"px;text-align:right;float:left;'><a href='javascript:window.close();'><img style='border: 0px;vertical-align:middle;' src='images/closelabel.gif'/></a></div>");
OpenWindow.document.write("</div>");
OpenWindow.document.write("</BODY>");
OpenWindow.document.write("</HTML>");
  // Just in case left and top are ignored
  //OpenWindow.moveTo(leftV, topV);
  OpenWindow.focus();
}
}