/* This script is for the functions in cowango digital pages*/



function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images ) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
  // End Preload Script
		
  // Begin script for movie controls (in order) - (1)redirect for IE Mac (2) cross browser function (3) play   	 //  function (4) check loading function (5) control functions
  
var myURL = "http://www.cowango.com/cowango_digital/home_noflash.html";

if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.indexOf("Mac") != -1 ) {
/*Redirect the Mac MSIE browser to the desired alternate page when the above is true.*/
location = myURL;}


var movieName = "website";

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  } 
  else {
    return document[movieName]
  }
}

function playmovie() {
  thisMovie(movieName).Play();
}



// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  // First make sure the movie's defined.
  if (typeof(theMovie) != "undefined") {
    // If it is, check how much of it is loaded.
    return theMovie.PercentLoaded() == 100;
  } 
   else {
    // If the movie isn't defined, it's not loaded.
    return false;
  }
}


function playmovie() {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).Play();
  }
}



function gowebsite() {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).TGotoLabel("_level0/","start_website");
  }
}  
function gologo() {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).TGotoLabel("_level0/","start_logo");
  }
}  
function goprint() {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).TGotoLabel("_level0/","start_print");
  }
}


//-->