var NS = (document.layers) ? 1 : 0;
var IE = (document.all) ? 1: 0;

function openpage (url,width,height)
{ var w = width + 22;
  var h = height + 45;
  if ( IE ) { h = h + 10; }
  zoomwin=open(url,"op","width="+w+",height="+h+",status=0,menubar=0,resizable");
}

function openwin (url,width,height)
{ var w = width + 22;
  var h = height + 45;
  if ( IE ) { h = h + 10; }
  zoomwin=open("","zi","width="+w+",height="+h+",status=0,menubar=0,resizable");
  zoomwin.document.write('<html><head><title>Xtreme Tattoos</title>');

  zoomwin.document.write('<script language="javascript">');
  zoomwin.document.write('if (document.layers) { document.captureEvents(Event.MOUSEDOWN); }');
  zoomwin.document.write('document.onmousedown=trapClick;');
  zoomwin.document.write('function trapClick(ev)');
  zoomwin.document.write('{ if (document.all)');
  zoomwin.document.write('  { if (event.button == 2) { alert ( "naugthy, naughty, naughty..." ); return false; } }');
  zoomwin.document.write('    if (document.layers) { if (ev.which == 3) { alert ( "naugthy, naughty, naughty..." ); return false; } } }');
  zoomwin.document.write('</script>');

  zoomwin.document.write('</head>');
  zoomwin.document.write('<body bgcolor=white text=white background="../images/greytop.gif">');
  zoomwin.document.write('<table border="0" cellpadding="2" cellspacing="0" width="100%">');
  zoomwin.document.write('<tr><td width="100%" align="center"><table border="1" cellpadding="0" cellspacing="0"><tr><td><img src="../%27+url+%27" BORDER="0" WIDTH="'+width+'" HEIGHT="'+height+'"></td></tr></table></td>');
  zoomwin.document.write('</tr><tr><td width="100%" align="center"><form><div align="center"><center><p><a href="#" onclick="self.close()"><img src="../images/close_button.gif" border="0"></a></p>');
  zoomwin.document.write('</center></div></form></td></tr></table></body></html>');
  zoomwin.focus();
}

if (document.layers) { document.captureEvents(Event.MOUSEDOWN); }
document.onmousedown=trapClick;
function trapClick(ev)
{ if (document.all)
  { if (event.button == 2) { alert ( 'naugthy, naughty, naughty...' ); return false; } }
    if (document.layers) { if (ev.which == 3) { alert ( 'naugthy, naughty, naughty...' ); return false; } } }

