

<!--
// GENERAL JAVASCRIPT CODE FOR SITE


// PLATFORM - BROWSER DETECT FOR STYLE SHEET INCLUSION
var uAgent=navigator.userAgent.toLowerCase(); 
var version = parseInt(navigator.appVersion); 
var is_nav  = ((uAgent.indexOf('mozilla')!=-1) && (uAgent.indexOf('compatible') == -1) && (uAgent.indexOf('spoofer')==-1));
var is_nav4 = (is_nav && (version >= 4 && version < 5));
var is_win   = ( (uAgent.indexOf("win")!=-1) || (uAgent.indexOf("16bit")!=-1) );

//  Choose correct CSS  
var cssName;
// if browser is netscape and platform is pc then we load styles_pcnav.css
if ((is_nav4 && is_win)){
	cssName = pathPrefix + "js/styles_pcnav.css";
// for all other combos, we load styles_def.css
} else {
	cssName = pathPrefix + "js/styles_def.css";
}
document.write('<link rel="stylesheet" type="text/css" href="' + cssName + '">');


// PAGE FUNCTIONS

// RANDOMIZER FUNCTIONS -------------------------------------------------

// Containers ------------
function mainImage () {
	this.imageName="";
	this.imageMapCoords= new Array();
	this.imageMapLinks= new Array();
	this.imageMapNewWin = new Array();
}
function iwContent () {
	this.imageName="";
	this.title="";
	this.body="";
	this.link="";
}

// Content Info ------------
var mainImageCollection = new Array();
var iwContentCollection = new Array();

mainImageCollection[0]=new mainImage ();
mainImageCollection[0].imageName="main_ghosts.jpg";
mainImageCollection[0].imageMapCoords[0]="539,207,749,229";
mainImageCollection[0].imageMapLinks[0]="ghosts.html";
mainImageCollection[0].imageMapNewWin[0]=false;
mainImageCollection[0].imageMapCoords[1]="539,185,749,206";
mainImageCollection[0].imageMapLinks[1]="http://www.ghostsoftheabyss.com";
mainImageCollection[0].imageMapNewWin[1]=true;

iwContentCollection[0]=new iwContent ();
iwContentCollection[0].imageName="main_holes.jpg";
iwContentCollection[0].title="<em>Holes Official Scrapbook</em>--on sale now!";
iwContentCollection[0].body="Go behind-the-scenes on the film set of <em>Holes</em>.";
iwContentCollection[0].link="inside_pub.html";


mainImageCollection[1]=new mainImage ();
mainImageCollection[1].imageName="main_walden_01.jpg";
mainImageCollection[1].imageMapCoords[0]="0,0,760,250";
mainImageCollection[1].imageMapLinks[0]="aboutwaldenmedia/index.html";
mainImageCollection[1].imageMapNewWin[0]=false;
mainImageCollection[1].imageMapCoords[1]="539,208,748,228";
mainImageCollection[1].imageMapLinks[1]="";
mainImageCollection[1].imageMapNewWin[1]=false;


iwContentCollection[1]=new iwContent ();
iwContentCollection[1].imageName="main_ghosts.jpg";
iwContentCollection[1].title="<em>Ghosts of the Abyss</em>";
iwContentCollection[1].body="Learn more about the amazing story behind <em>Ghosts of the Abyss</em>.";
iwContentCollection[1].link="inside_pub.html";


// Randomizer ---------------
var contentIndex;

function rndnumber(howMany) {
	var randscript = -1;
	while (randscript < 0 || randscript > (howMany - 1) || isNaN(randscript)) {
		randscript = parseInt(Math.random()*(howMany));
	}
	return randscript;
}
// var contentIndex = rndnumber(2); // pass it the upper range of values
var contentIndex = 1;

// Page Drawing Functions ---------------

function drawMainImage () {
	document.write('<img src="images/'+ mainImageCollection[contentIndex].imageName +'" width="760" height="238" border="0" usemap="#MainImageMap">');
}

function drawIWContent () {
	document.write('<td width="60" align="center"><a href="'+ iwContentCollection[contentIndex].link +'">');
	document.write('<img src="images/main_icons/'+ iwContentCollection[contentIndex].imageName +'" width="60" height="90" border="0"></a>');
	document.write('<a href="'+ iwContentCollection[contentIndex].link +'"><img src="images/more_info.gif" width="43" height="10" border="0"></a></td>');
	document.write('<td><span class="tansubtitle">'+ iwContentCollection[contentIndex].title +'</span><br>');
	document.write(iwContentCollection[contentIndex].body +'</td>');
}

function drawMainImageMap () {
	document.write('<map name="MainImageMap">');
	for (i=0;i<mainImageCollection[contentIndex].imageMapCoords.length;i++) {
		document.write('<area shape="rect" coords="'+ mainImageCollection[contentIndex].imageMapCoords[i] + '" ')
		document.write('href="'+ mainImageCollection[contentIndex].imageMapLinks[i] +'"')
		if (mainImageCollection[contentIndex].imageMapNewWin[i]) {
			document.write(' target="_blank"');
		}
  		document.write('>');
  	}
	document.write('</map>');
}


// MARQUEE -------------------------------------------------

//Specify the marquee's width (in pixels)
var marqueewidth=680
//Specify the marquee's height (in pixels, pertains only to NS)
var marqueeheight=18
//Specify the marquee's scroll speed (larger is faster)
var speed=5
//Specify the marquee contents
var marqueecontents='<a href="aboutwaldenmedia/news_articles/walden_03_01_04.html" class="aMarquee">The Walt Disney Studios Enters Into Agreement With Walden Media to Produce "The Chronicles of Narnia: The Lion, the Witch, and the Wardrobe"</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="aboutwaldenmedia/news_articles/financialtimes_03_29_04.html" class="aMarquee">The Book, the Film... and the Teachers</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="aboutwaldenmedia/news_articles/hollywoodreporter_06_19_03.html" class="aMarquee">Walden takes Schneider on <em>80 Days</em> trip</a> &nbsp;&nbsp;|&nbsp;&nbsp; <a href="aboutwaldenmedia/news_articles/walden_02_04_03.html" class="aMarquee"><em>Pulse: a STOMP Odyssey</em> captures film festivals two most prestigous awards...</a>  &nbsp;&nbsp;|&nbsp;&nbsp; <a href="aboutwaldenmedia/news_articles/walden_06_02_03.html" class="aMarquee">National Robotics Competition Based on <em>Ghosts of the Abyss</em></a> &nbsp;&nbsp;|&nbsp;&nbsp;<a href="aboutwaldenmedia/news_articles/rockymtnews_03_26_04.html" class="aMarquee">Good Show, In Its Rookie Year, Walden Playhouse Stages a Success</a>...</span>'

function drawMarquee() {
	if (document.all)
		document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>')
}

function regenerate(){
	window.location.reload()
}

function regenerate2(){
	if (document.layers){
		setTimeout("window.onresize=regenerate",450)
		intializemarquee()
	}
}

function intializemarquee(){
	document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
	document.cmarquee01.document.cmarquee02.document.close()
	thelength=document.cmarquee01.document.cmarquee02.document.width
	scrollit()
}

function scrollit(){
	if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
		document.cmarquee01.document.cmarquee02.left-=speed
		setTimeout("scrollit()",100)
	} else {
		document.cmarquee01.document.cmarquee02.left=marqueewidth
		scrollit()
	}
}

window.onload=regenerate2



// Use some MM code for Nav4 page resize
function MM_reloadPage(init) { 
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

//-->

