
//name frmcheck.js

var tviewer = 0;
//attempted loading of pages without the frameset
//results in frameset load with home page

var myName = new String(self.location);
myName = myName.substring(myName.lastIndexOf("/")+1);
var newLocation = "indx.php?";
newLocation += myName;
if(top == self)
  top.location.replace(newLocation);

//used by half-life.html to display chapel pics
function picOpen(url, w, h)
{
  var width=640;
  var height=480;
  var nameW='viewer';
  if(w && w > 0 )width = w;
  if(h && h > 0)height = h;
    xTop = screen.width/2 - (width/2);
    yTop = screen.height/2 - (height/2);
    if(tviewer && !tviewer.closed)tviewer.close();
	tviewer = window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,dependent=1,left=' + xTop + ',top=' + yTop + '');
	tviewer.focus();
}

function picOpenEx(url, w, h, x, y)
{
  var width=640;
  var height=480;
	var sx = 0;
	var sy = 0;
  var nameW='viewer';
  if(w && w > 0 )width = w;
  if(h && h > 0)height = h;
  if(x && x > 0 )sx = x;
  if(y && y > 0 )sy = y;
    xTop = screen.width/2 - (width/2);
    yTop = screen.height/2 - (height/2);
    if(tviewer && !tviewer.closed)tviewer.close();
	tviewer = window.open(url, nameW, 'height='+height+',width='+width+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,dependent=1,screenX='+sx+', screenY='+sy+'');
	tviewer.document.title = 'House Of Craig';
	tviewer.focus();
}
