// function to handily open a new window...
function newWindow(url) {
  window.open(url);
} 

       
// function to open a new window and display a specified image...
function displayImage(img) {
  var win = window.open('');
  win.document.write('<html><head><title>s2 Audio Technology :: Media</title><link rel="stylesheet" type="text/css" href="explorer.css"></head><body><table border="0" width="100%" height="100%" id="table1"><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><p align="center"><img name="photo" border="1" src="' + img + '"></td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td><p align="center"><a href="javascript:window.close()">Close</a></p></td><td>&nbsp;</td></tr></table><p align="center">&nbsp;</p></body></html>');
}


// load the banner image links...
function getBanners() {	
  // create an array to hold image src locations without preloading
  var bannerImages = new Array(2);
  for (var i = 0; i < 2; i++) {
    bannerImages[i] = 'http://www.relicamps.com/media/header' + i + '.jpg';
  }

  return bannerImages;
}


// find a random number to choose which banner image to use for this impression...
function getNumbers() {
  return random = Math.round(Math.random() * 1) + 0;
}


// write the code to the document to show the chosen random banner...
function showBanner() {
  document.write('<img id="entry" src="' + bannerImages[random] + '" title="top banner thingy" width="768" height="52" border="0" alt="top banner thingy"><br>');
}

	
// disable right click functions...
function disableRightClick(e) {
	if(!document.rightClickDisabled) {
		if(document.layers) {
			document.captureEvents(Event.MOUSEDOWN);
			document.onmousedown = disableRightClick;
		}
		else {
			document.oncontextmenu = disableRightClick;
		}
		return document.rightClickDisabled = true;
	}
	if(document.layers || (document.getElementById && !document.all)) {
		if (e.which==2||e.which==3) {
			return false;
		}
	}
	else {
		return false;
	}
}


// handle links in iframe navigation...
function iframeGo(url) {
	parent.window.location.href = url;
}