var videoplayer=0;
function openreal(realsrc) {
	videoplayerURI = "/videoplayer.html?source=" + realsrc;
	stopEmbeddedPlayer(videoplayerURI)	
	videoplayer = window.open(videoplayerURI,'FashionFileVideoPlayer','height=420,width=360,toolbar=no,scrollbars=no,menubar=no');
	videoplayer.focus();
}

function openfashionmagazine(realsrc) {
	videoplayerURI = "/videoplayer.html?origin=fashionmagazine&source=" + realsrc;
	videoplayer = window.open(videoplayerURI,'FashionFileVideoPlayer2','height=420,width=360,toolbar=no,menubar=no');
	videoplayer.focus();
}

function opensponsoredlink(realsrc) {
	videoplayerURI = "/videoplayer.html?origin=sponsoredlink&source=" + realsrc;
	videoplayer = window.open(videoplayerURI,'FashionFileVideoPlayer','height=420,width=360,toolbar=no,menubar=no');
	videoplayer.focus();
}
function stopEmbeddedPlayer(videoplayerURI) {
	if (document.getElementById('embed')!=null) {
		document.getElementById('embed').src='embed_placeholder.html';
	}
}

//Windows Media Player Scripts
function openWindowsMediaPlayer(mediaFile, videoTitle, videoText){
	var fullURL = "/popups/wmv_popup.html?"+mediaFile+"#"+videoTitle+"|"+videoText;
	window.open(fullURL, "codWindow", "location=0,menubar=0,scrollbars=0,resizable=1,width=420,height=570").focus();
}
// redefine above function with lowercase, because some pages call it this way
function openwindowsmediaplayer(mediaFile, videoTitle, videoText){
	return openWindowsMediaPlayer(mediaFile, videoTitle, videoText);
}
