	// some variables to save
	var currentPosition;
	var currentVolume;
	var currentItem;

	// these functions are caught by the JavascriptView object of the player.
	function sendEvent(typ,prm) { parent.thisMovie("playlist1").sendEvent(typ,prm); };
	function getUpdate(typ,pr1,pr2,pid) {
		if(typ == "time") { currentPosition = pr1; }
		else if(typ == "volume") { currentVolume = pr1; }
		else if(typ == "item") { currentItem = pr1; setTimeout("getItemData(currentItem)",100); }
		var id = parent.document.getElementById(typ);
		id.innerHTML = typ+ ": "+Math.round(pr1);
		pr2 == undefined ? null: id.innerHTML += ", "+Math.round(pr2);
		if(pid != "null") {
			parent.document.getElementById("pid").innerHTML = "(received from the player with id <i>"+pid+"</i>)";
		}
	};

	// These functions are caught by the feeder object of the player.
	function loadFile(obj) { parent.thisMovie("playlist1").loadFile(obj); };
	function addItem(obj,idx) { parent.thisMovie("playlist1").addItem(obj,idx); }
	function removeItem(idx) { parent.thisMovie("playlist1").removeItem(idx); }
	function getItemData(idx) {
		var obj = parent.thisMovie("playlist1").itemData(idx);
		var nodes = "";
		for(var i in obj) { 
			nodes += "<li>"+i+": "+obj[i]+"</li>"; 
		}
		parent.document.getElementById("data").innerHTML = nodes;
	};

	// This is a javascript handler for the player and is always needed.
	function thisMovie(movieName) {
	    if(parent.navigator.appName.indexOf("Microsoft") != -1) {
			return parent.window[movieName];
		} else {
			return parent.document[movieName];
		}
	};

var newwindow;
function player(url)
{
	newwindow=window.open(url,'player','height=275,width=400, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}

function cpaw(url)
{
	newwindow=window.open(url,'cpaw','height=250,width=400, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}

function slide(url)
{
	newwindow=window.open(url,'slide','height=350,width=450, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}

function mini(url)
{
	newwindow=window.open(url,'slide','height=300,width=300, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}

function sander(url)
{
	newwindow=window.open(url,'sander','height=480,width=764, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}

function CRCtour(url)
{
	newwindow=window.open(url,'CRCtour','height=480,width=764, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}

function VVtour(url)
{
	newwindow=window.open(url,'VVtour','height=480,width=764, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}

function rainey(url)
{
	newwindow=window.open(url,'VVtour','height=225,width=400, top=100,left=100','resizable=false','toolbar=no','scrollbars=no');
	if (window.focus) {newwindow.focus()}
}