// 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('', '', 'resizable, width=800, height=560')
  win.document.write('<html><head><title>Category 5 Amplification :: Media</title><link rel="stylesheet" type="text/css" href="explorer.css"></head><body bgcolor="#f1efed"><table id="content" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr height="36" valign="middle"><td colspan="5" align="center">&nbsp;</td></tr><tr valign="top"><td width="24">&nbsp;</td><td align="center" valign="top"><table id="left" width="480" border="0" cellspacing="0" cellpadding="24" bgcolor="#FFFFFF"><tr><td align="left" valign="middle"><img src="' + img + '" /></p></td></tr></table></td><td width="24">&nbsp;</td></tr><tr><td colspan="5" align="center" height="24">&nbsp;<br /><p class="copyright">&copy; 2006 Category 5 Amplification LLC</p>&nbsp;<br /></td></tr><tr><td>&nbsp;</td><td><p align="center"><a href="javascript:window.close()">Close</a></p></td><td>&nbsp;</td></tr></table></body></html>');
}


// function to open a new window and display a specified sound clip player...
function displaySound(sound) {
  var win = window.open('', '', 'resizable, width=800, height=560')
  win.document.write('<html><head><title>Category 5 Amplification :: Media</title><link rel="stylesheet" type="text/css" href="explorer.css"></head><body bgcolor="#f1efed"><table id="content" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr height="36" valign="middle"><td colspan="5" align="center">&nbsp;</td></tr><tr valign="top"><td width="24">&nbsp;</td><td align="center" valign="top"><table id="left" width="480" border="0" cellspacing="0" cellpadding="24" bgcolor="#FFFFFF"><tr><td align="center" valign="middle"><EMBED SRC="' + sound + '" volume="50" width="400" height="300" autostart="true"></p></td></tr></table></td><td width="24">&nbsp;</td></tr><tr><td colspan="5" align="center" height="24">&nbsp;<br /><p class="copyright">&copy; 2006 Category 5 Amplification LLC</p>&nbsp;<br /></td></tr><tr><td>&nbsp;</td><td><p align="center"><a href="javascript:window.close()">Close</a></p></td><td>&nbsp;</td></tr></table></body></html>');
}


// function to open a new window and display specified text...
function displayText(title, text) {
  var win = window.open('', '', 'resizable, width=620, height=500');
  win.document.write('<html><head><title>Category 5 Amplification :: Media</title><link href="explorer.css" rel="stylesheet" type="text/css" /></head><body bgcolor="#f1efed"><table id="content" width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr height="36" valign="middle"><td colspan="5" align="center">&nbsp;</td></tr><tr valign="top"><td width="24">&nbsp;</td><td align="center" valign="top"><table id="left" width="480" border="0" cellspacing="0" cellpadding="24" bgcolor="#FFFFFF"><tr><td align="left" valign="middle"><h2>' + title +'</h2><p class="initial">' + text + '</p></td></tr></table></td><td width="24">&nbsp;</td></tr><tr><td colspan="5" align="center" height="24">&nbsp;<br /><p class="copyright">&copy; 2006 Category 5 Amplification LLC</p>&nbsp;<br /></td></tr><tr><td>&nbsp;</td><td><p align="center"><a href="javascript:window.close()">Close</a></p></td><td>&nbsp;</td></tr></table></body></html>');
}


// load the background image links...
function getBackgrounds(i) {	
  // create an array to hold image src locations without preloading...
  var images = new Array(i);
  for (var j = 0; j < i; j++) {
    images[j] = 'http://www.category5amps.com/media/background' + j + '.jpg';
  }
  return images;
}


// load the splash blurb links...
function getSplashBlurbs(i) {	
  // create an array to hold image src locations without preloading...
  var images = new Array(i);
  for (var j = 0; j < i; j++) {
    images[j] = 'http://www.category5amps.com/media/splash_blurb' + j + '.gif';
  }
  return images;
}


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

	
// 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 frames navigation...
function iframeGo(url) {
	parent.frames[0].location.href = url;
}

// change the status bar text...
function setStatus(message) {
	window.status = message;
}

// redirect to another page...
function redirect(url) {
	window.location.href = url;
}

