// Remove any frames
if (top.location != self.location) {
  top.location = self.location;
}

var url = self.location.href;
url = url.toLowerCase();

// determine the server
var DOM = '';
var local = 'rwebs2000/psgerry/';
var live = 'psgerry.com/';
((url.lastIndexOf(local) > 1) ? DOM = local : DOM = live)

var endOfDOM = url.lastIndexOf(DOM);
var endOfURL = url.substring((endOfDOM + DOM.length), url.length);

// determine relative path
var path = '';
for (i=0; i<endOfURL.length; i++) {
  if (endOfURL.charAt(i)=='/') {path += '../';}
}
