// Copyright Acro Media Inc. 1998-2003, www.acromediainc.com

var newWin;
var imageNames;
var imageOver;
preloaded = 0;
graphicsDir = dirDepth+"graphics/toolbar/";

function openUp(windowURL, windowWidth, windowHeight){
	var topPos = "";
	var leftPos = "";

	if(!windowWidth){
		windowWidth = 0;
	}

	if(!windowHeight){
		windowHeight = 0;
	}

	if(windowWidth == 0){
		if(screen){
			windowWidth = screen.availWidth -10;
		}
		else{
			windowWidth = 790;
		}
		
		leftPos = ",left=0";
	}

	if(windowHeight == 0){
		if(screen){
			windowHeight = screen.availHeight -30;
		}
		else{
			windowHeight = 790;
		}
		
		topPos = ",top=0";
	}

	newWin = window.open(windowURL,"acromedia","toolbar=no,menubar=0,width="+windowWidth+",height="+windowHeight+topPos+leftPos+",scrollbars=no,resizable=no");

	if(javascript_version > 1.0){
		setTimeout('newWin.focus();',100);
	}
}

if(document.images){
	imageNames = new initArray("home", "schedule", "tv_media", "store", "newsletter", "community", "contact", "home2", "schedule2", "tv_media2", "store2", "newsletter2", "community2", "contact2");
	imageOver = new initArray("b_home_02.gif", "b_schedule_02.gif", "b_tv_media_02.gif", "b_store_02.gif", "b_newsletter_02.gif", "b_community_02.gif", "b_contact_02.gif", "b_home_02.gif", "b_schedule_02.gif", "b_tv_media_02.gif", "b_store_02.gif", "b_newsletter_02.gif", "b_community_02.gif", "b_contact_02.gif");
}

function preloadImages(){
//function commneted out, causing browser errors and preloading the image menus not really needed
//	if(document.images){
//		var i, temp;
//
//	for(i=0; i<imageNames.length; i++){
//			document.images[imageNames[i]].offsrc = document.images[imageNames[i]].src;
//		}

//		for(i=0; i<imageNames.length; i++){
//			temp = new Image();
//			temp.src = graphicsDir + imageOver[i];
//			document.images[imageNames[i]].oversrc = temp.src;
//		}
//		
		preloaded = 1;
//	}
}

function initArray(){
	if(document.images){
		this.length = initArray.arguments.length;
		for (var i=0;i<= this.length; i++){
			this[i] = initArray.arguments[i];
		}
	}
}

function mouseOver(imageID){
	if(document.images && preloaded){
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].oversrc;
	}
}

function mouseOut(imageID){
	if(document.images && preloaded){
		document.images[imageNames[imageID]].src = document.images[imageNames[imageID]].offsrc;
	}
}