function load_video_and_silence_claire(url) {
	
	//only silence claire if she's talking. playpause is a toggle, not a state set.
	// http://www.jeroenwijering.com/?thread=3523
	if (currentState == 2) {
		sendEvent('playpause');
	}
	window.open(url,'video_player','height=350,width=420,resizable=false');
	return true;
}

function load_market_video_and_silence_claire(url) {
	
	//only silence claire if she's talking. playpause is a toggle, not a state set.
	// http://www.jeroenwijering.com/?thread=3523
	if (currentState == 2) {
		sendEvent('playpause');
	}
	window.open(url,'market_video_player','height=380,width=380,resizable=false');
	return true;
}

// some variables to save
var currentPosition;
var currentVolume;
var currentItem;
var currentState;

// these functions are caught by the JavascriptView object of the player.
function sendEvent(typ,prm) { thisMovie("claire").sendEvent(typ,prm); };
function getUpdate(typ,pr1,pr2,pid) {
	if (typ == "state") { currentState = pr1;  }
};


// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
    if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	} else {
		return document[movieName];
	}
};
