//declare in head of page//var mode="start"  if button is down when page loads, this var should be set to the name of the down button//load down state buttons using preloadDownBtn function!// declares a new imagefunction newRollImage(xsSrc) {	var voTheImage;	if (document.images) {		voTheImage = new Image();		voTheImage.src = xsSrc;		return voTheImage;	}}// change the image xsImageName to the xsImageSrcfunction changeRollImages(xsImageName, xsImageSrc) {	if (document.images && (gsPreloadFlag == true)) {		document.images[xsImageName].src = xsImageSrc;	}}//preload down state buttonsfunction preloadDownBtn(xsDownBtn) {	var vsDownImage;	vsDownImage = "images/buttons/" + xsDownBtn;	newRollImage(vsDownImage);}//swap button and "movie" frame pagefunction switchMovieBtn(xsMovName) {	if(parent.mode == "start") {		parent.movie.location = xsMovName + ".html";		document.images[xsMovName].src = "images/buttons/" + xsMovName + "dn.gif";		parent.mode = xsMovName;	} else if (parent.mode != xsMovName) {		document.images[parent.mode].src = "images/buttons/" + parent.mode + "up.gif";		parent.movie.location = xsMovName + ".html";		document.images[xsMovName].src = "images/buttons/" + xsMovName + "dn.gif";		parent.mode = xsMovName;	}}//set movie frame to default if reload occursfunction setMovie() {	var currMovieFrame = moviename;	if(parent.mode != currMovieFrame) {		parent.movie.location = parent.mode + ".html";	}}