var ns = (navigator.appName.indexOf('Netscape') != -1) ? 1:0;
var ns4 = (ns && document.layers) ? 1:0;


//ns 4 BUG Fix for css--
if (ns4) {
	widthCheck = window.innerWidth;
	heightCheck = window.innerHeight;
	window.onResize = resizeFix;
}

function resizeFix() {
	if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
	document.location.href = document.location.href;
}



function changeGif(inState,inName)
{	
	switch(inState){
		case 'on_1': inName.src = "/ar/images/gifs/Apply_Now_1.gif"; break;
		case 'on_2': inName.src = "/ar/images/gifs/Quick_Facts_1.gif"; break;
		case 'on_3': inName.src = "/ar/images/gifs/SSU_1.gif"; break;
		case 'on_4': inName.src = "/ar/images/gifs/Contact_Us_1.gif"; break;
		case 'on_5': inName.src = "/ar/images/gifs/A_Z_1.gif"; break;
		case 'on_6': inName.src = "/ar/images/gifs/FAQS_1.gif"; break;
		case 'on_7': inName.src = "/ar/images/gifs/Tours_1.gif"; break;
		
		case 'off_1': inName.src = "/ar/images/gifs/Apply_Now.gif"; break;
		case 'off_2': inName.src = "/ar/images/gifs/Quick_Facts.gif"; break;
		case 'off_3': inName.src = "/ar/images/gifs/SSU.gif"; break;
		case 'off_4': inName.src = "/ar/images/gifs/Contact_Us.gif"; break;
		case 'off_5': inName.src = "/ar/images/gifs/A_Z.gif"; break;
		case 'off_6': inName.src = "/ar/images/gifs/FAQS.gif"; break;
		case 'off_7': inName.src = "/ar/images/gifs/Tours.gif"; break;
		default: break;
	}	
	
}


function changeLink(inIndex)
{	
	if(inIndex != "")
		location.href=inIndex;
	else
		alert("Please Select a Link");
}

// JavaScript banner randomizer

	pictures = new Array(
		new Array("http://www.sonoma.edu/sas/common/images/banners/1.jpg", "Student walks under leaf-canopy in spectacular fall colors.", "Student walks under leaf-canopy in spectacular fall colors.", "randombackground1"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/2.jpg", "Female student studies next to lake.", "Female student studies next to lake.", "randombackground2"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/3.jpg", "Two students walk past ivy on Ives Hall.", "Two students walk past ivy on Ives Hall.", "randombackground3"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/4.jpg", "Sunrise above Sonoma Mountain and nearby hills.", "Sunrise above Sonoma Mountain and nearby hills.", "randombackground4"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/5.jpg", "Pyramids on top of Schulz Information Center.", "Pyramids on top of Schulz Information Center.", "randombackground5"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/6.jpg", "Racehorse Sonoma Slew gets a workout at a nearby ranch.", "Racehorse Sonoma Slew gets a workout at a nearby ranch.", "randombackground6"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/7.jpg", "Students descend stairs into George E. McCabe Plaza.", "Students descend stairs into George E. McCabe Plaza.", "randombackground7"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/8.jpg", "Two students study independently in Alumni Grove.", "Two students study independently in Alumni Grove.", "randombackground8"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/9.jpg", "Top of Nichols Hall sits in foreground with Sonoma hills in background.", "Top of Nichols Hall sits in foreground with Sonoma hills in background.", "randombackground9"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/10.jpg", "Hills northeast of Sonoma State campus turn green after spring rains.", "Hills northeast of Sonoma State campus turn green after spring rains.", "randombackground10"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/11.jpg", "Six female members of student service organization at table on Quad.", "Six female members of student service organization at table on Quad.", "randombackground11"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/12.jpg", "Three male students chat on ramp outside Schulz Information Center.", "Three male students chat on ramp outside Schulz Information Center.", "randombackground12"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/13.jpg", "Students sitting in a row enjoy performance by theater students.", "Students sitting in a row enjoy performance by theater students.", "randombackground13"),
		new Array("http://www.sonoma.edu/sas/common/images/banners/14.jpg", "Students cross bridge over Copeland Creek on way to class.", "Students cross bridge over Copeland Creek on way to class.", "randombackground14")
	) ;
	
	randomIndex = Math.floor((Math.random()*pictures.length)) ; 
	chosen_image = pictures[randomIndex] ;
	
// -->