


// JavaScript Document
/////////////////////frame detection///////////////////////////
if (parent.location.href == self.location.href) {
    if (window.location.href.replace)
        window.location.replace('default.htm');
    else
        
// causes problems with back button, but works
        window.location.href = 'default.htm';
}

//////////////////////////////////////////////////////////////


//////////////////////////Slide Declerations//////////////////////////////
function changeImage(direction) {
				which_image_loaded += direction;
				if (which_image_loaded < 0)
					which_image_loaded = NUMBER_OF_IMAGES - 1;
				if (which_image_loaded == NUMBER_OF_IMAGES)
					which_image_loaded = 0;
				if (document.images)
					document.image.src = ImageNames[which_image_loaded];
					document.getElementById("imgText").innerHTML = captionText[which_image_loaded];		
			}
		
function setMyHREF(whichLink) {
			document.links[whichLink].href = thisPath + thisImg + ".jpg";

		}

//////////////////////////////end of slide declerations////////////////////////////////


/////////////////////////////////////////start of nav ///////////////////////////////////////////////
function SwitchMenu(obj, menuId){

	if(document.getElementById){
		var el = document.getElementById(obj);
		var ar = document.getElementById("cont").getElementsByTagName("DIV");

		
		if(el.style.display == "none"){
			
			//THis will hide any other menu that is open when another is clicked.
			//for (var i=0; i<ar.length; i++){
			//	ar[i].style.display = "none";
			//}
			
			el.style.display = "block";
		
		}else{
			el.style.display = "none";
			document.getElementById(menuId).className = 'vMenuOver';

			
		}
	}
}

function ChangeClass(menu, newClass) { 
	 if (document.getElementById(menu).className == 'visited') 
	 { 
		document.getElementById (menu).className = 'vMenuOver';
	 } 
	 else if (document.getElementById(menu).className == 'vMenuOver') 
	 { 
		document.getElementById (menu).className = 'visited';
	 }
	 
	 else
	 {
  	document.getElementById(menu).className = newClass;
}
}

function send(href, menu)
{

	if (window.location.href.match("/shows/"))
	{
		//yes
			
			window.location="../" + href + "?ActiveMenu=" + menu;
	}
	else
	{
		//no
			
			window.location=href + "?ActiveMenu=" + menu;
	}

}




function displayActiveMenu(key){
	if(queryString(key)=='false') 
		{
			//nothing
		}
		else
		{
			document.getElementById(queryString(key)).style.display = "block";
		}
}


//////////////////////////////////end of navigation//////////////////////////////////////////



/////////////////////////////////////no right click///////////////////////////////////////



var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

//document.oncontextmenu=new Function("alert(message);return false")

// --> 
////////////////////////////////////end of no right click//////////////////////////////////
///////////////////////////////////image popup/////////////////////////////////////////

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 700;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows
		
var AutoClose = true;

// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4){
var isNN=(navigator.appName=="Netscape")?1:0;
var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;




function popImage(imageURL,imageTitle){//create popup window with a query string containing 
//the image to be opened and the title of the page

var url
url = "../popwin.html?URL="+imageURL+"&TITLE="+imageTitle;
if (isNN){imgWin=window.open(url,'',optNN);}
if (isIE){imgWin=window.open(url,'',optIE);}
}


function checkPage(){//if ie then hide the banners

if (isIE){

	if(document.body.all[1].tagName == 'TABLE')
	
		document.body.all[1].style.display = "none";
		}

}

function reSizeToImage(){ // resize window to fit image. with ie the banners are hidden 
//but for nn the window is resized to the largest object, the image or the banner.
	
var imgCount
imgCount=0
for (i=0; i<document.images.length; i++) 
{
imgCount=imgCount+1
}

if (imgCount > 1){
	if (isIE){
		
		width=document.images["img"].width+10;
		height=document.images["img"].height+29;
		window.resizeTo(width,height);}
	if (isNN){
					
			var imgWidth, windowHeight, bannerWidth
			imgWidth = document.images["img"].width;
			windowHeight = document.images["img"].height+document.images[1].height+25;
			bannerWidth = document.images[0].width+document.images[1].width+5;
			
			if (imgWidth > bannerWidth) 
			{
			window.innerWidth=imgWidth;
			}
			else
			{
			window.innerWidth=bannerWidth;
			}
			
			window.innerHeight=windowHeight;
			
		}
	}
	else
	{
	if (isIE){
	
		
		width=document.images["img"].width+10;
		height=document.images["img"].height+29;
		window.resizeTo(width,height);
		}
	if (isNN){
	
		
		window.innerWidth=document.images["img"].width;
		window.innerHeight=document.images["img"].height;
		
		}
	}
	
}

function doTitle()	
	{
		document.title=queryString("TITLE");
	}

///////////////////////Query String Functions//////////////////////
function PageQuery(q) {
	if(q.length > 1) this.q = q.substring(1, q.length);
	else this.q = null;
	this.keyValuePairs = new Array();
	if(q) {
		for(var i=0; i < this.q.split("&").length; i++) {
			this.keyValuePairs[i] = this.q.split("&")[i];
		}
	}
	this.getKeyValuePairs = function() { return this.keyValuePairs; }
	this.getValue = function(s) {
		for(var j=0; j < this.keyValuePairs.length; j++) {
			if(this.keyValuePairs[j].split("=")[0] == s)
				return this.keyValuePairs[j].split("=")[1];
		}
		return false;
	}
	this.getParameters = function() {
		var a = new Array(this.getLength());
		for(var j=0; j < this.keyValuePairs.length; j++) {
			a[j] = this.keyValuePairs[j].split("=")[0];
		}
		return a;
	}
	this.getLength = function() { return this.keyValuePairs.length; }	
}

function queryString(key){
var page = new PageQuery(window.location.search); 
return unescape(page.getValue(key)); 
}
/////////////////////////End of Querystring functions///////////////////////////////

///////////////////trim function
function trim(input)
{
  var string = "s.jpg";
  var chop = "../";
  input = input.replace(string, ".jpg");
  input = input.replace(chop, "");
  return input;
}
////////////////////////

			