var win = null;
var popuph = 551;
var popupw = 770;
function openpopup(loc) {
if (win != null) {
if (document.layers) {
win.setResizable(true);
win.resizeTo(w,h);
win.setResizable(false); }
else win.resizeTo(popupw,popuph); }
var x = 320; var y = 240;
if ((screen.width != null) && (screen.height != null)) { 
x = (screen.width - popupw)/2; y = (screen.height - popuph)/2; }
var winoptions ="scrollbars=no,toolbar=no,directories=no,menubar=no,resizable=no,status=no,width="+popupw+",height="+popuph+",screenX="+x+",screenY="+y+",top="+y+",left="+x;
win = window.open(loc,"pics",winoptions); 
win.moveTo(x,y);
win = null; }
function right(e) {
var msg = "(c) Troon.ORG";
if ((navigator.appName.indexOf('Netscape')>-1) && (e.which == 3 || e.which == 2)) {
alert(msg); return false; }
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg); return false; } else return true; }
function rightCtxt() { return false;  }
function trap() { //}
document.onmousedown = right; 
if ((!document.all) && (document.getElementById)) { document.oncontextmenu = rightCtxt; }
if (document.layers) { window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right; } }
function grabFocus() { this.window.focus(); }
function closeWindow() { self.close(); }
function closeWindow2() { var i = setTimeout("closeWindow();",1000); }
function stat(txt) { window.status = txt; }
function sstat(txt) { var i = window.setTimeout('window.status="' + txt + '"', 1); return true; }
function getUrlPrefix(url) { url = url.toString(); var i = url.indexOf('?'); var j = url.indexOf('#');
if ((i > -1) && (j > -1)) { if (j < i) i = j; } else { if (i < 0) i = j; } if (i > 0) { url = url.substring(0,i); } return url; }
function checkList() { if (this.window.opener) { if (this.window.opener.opener) { if (getUrlPrefix(this.window.opener.opener.location) == getUrlPrefix(this.window.location)) {
this.window.opener.opener.focus(); this.window.close(); } } } }


