//SETTINGS.
//The display style of the normal visible state of web page elements
//which are toggled by the toggleVisibility() function.  This can be changed
//anywhere in your page or script by setting it to one of the other options.
// Options: 
//   '' = default
//   'inline' = normal flow layout
//   'block' = forced line break before and after drawing the element.
var tv_NormalState = ''; 

//FUNCTIONS.
//Function to toggle the visibility of an HTML element 
//whose ID is passed as a parameter to this function.
function toggleVisibility(id) {

   var currentState = document.getElementById(id).style.display;
	 if ( currentState == 'none' ) document.getElementById(id).style.display = tv_NormalState;
	 else document.getElementById(id).style.display = 'none';

} //function toggleVisibility().


function loadFeature()

{
	
	//load all iframes with relevant content.
	parent.frame03.location="wrxcntrls.html";
	
}

function loadWorx()

{
	//Swap all link images.
	document.images["newz"].src="images/newz.gif";
	document.images["worx"].src="images/worx_dark.gif";
	document.images["respekt"].src="images/respekt.gif";
	document.images["xperimental"].src="images/xperimental.gif";

	//load all iframes with relevant content.
	parent.frame01.location="wrxftre.html";
	parent.frame03.location="wrxcntrls_main.html";
	
}


function loadNewz()

{
	//Swap all link images.
	
	document.images["newz"].src="images/newz_dark.gif";
	document.images["worx"].src="images/worx.gif";
	document.images["respekt"].src="images/respekt.gif";
	document.images["xperimental"].src="images/xperimental.gif";
	
	//load all iframes with relevant content.
	parent.frame01.location="newz.html";
	parent.frame03.location="nocntrls.html";
	
}

function loadRespekt()

{

	//Swap all link images.
	document.images["newz"].src="images/newz.gif";
	document.images["worx"].src="images/worx.gif";
	document.images["respekt"].src="images/respekt_dark.gif";
	document.images["xperimental"].src="images/xperimental.gif";
	
	//load all iframes with relevant content.
	parent.frame01.location="links.html";
	parent.frame03.location="nocntrls.html";
	
}

function loadXperiment()

{	
	//Swap all link images.
	document.images["newz"].src="images/newz.gif";
	document.images["worx"].src="images/worx.gif";
	document.images["respekt"].src="images/respekt.gif";
	document.images["xperimental"].src="images/xperimental_dark.gif";
	
	//load all iframes with relevant content.
	parent.frame01.location="xperimental.html";
	parent.frame03.location="nocntrls.html";
	
	}

function loadInfo()

{
	//Swap all link images.
	document.images["newz"].src="images/newz.gif";
	document.images["worx"].src="images/worx.gif";
	document.images["respekt"].src="images/respekt.gif";
	document.images["xperimental"].src="images/xperimental.gif";

	//load all iframes with relevant content.
	parent.frame01.location="info.html";
	parent.frame03.location="nocntrls.html";

}

function launchwin(page, width, height, winname)

{
	//This launches a new window.
	OpenWin = this.open(page, winname, "toolbar=no, menubar=no ,location=no, scrollbars=no, resizable=no, width=" + width + ", height=" + height + ", top=" + (screen.height/2 - height/2) + ", left=" + (screen.width/2 - width/2) + "\"");

}

//Function to preload an image into memory for quicker swapout later.  Call
        //this fuction in the <head> of your HTML document. 
        function loadImage(url) {
        	var temp = new Image();
        	temp.src = url;
        }

//Function to change an image named {name} to use the image at {URL}.
        function swapImage(name,url) {
        	document[name].src=url;
        }


loadImage("images/viewicon.gif");
loadImage("images/viewicon2.gif");
loadImage("images/file.gif");
loadImage("images/file2.gif");
loadImage("images/file3.gif");


var movieName = "headerz";

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]
  }
}

// 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 go(theFrame) {
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).GotoFrame(theFrame);
	thisMovie(movieName).Play();
  }
}


