function movieSet( thumbUrl, playUrl, downloadUrl, title, text, showDownload, showCopy ) {
	this.thumbUrl = thumbUrl;
	this.playUrl = playUrl;
	this.downloadUrl = downloadUrl;
	this.title = title;
	this.text = text;
	this.showDownload = showDownload;
	this.showCopy = showCopy;
}

function selectMovie(pos) {
	currentMovie = movies[pos];
	
	var objTitle = document.getElementById("playerTitle");
	objTitle.innerText = currentMovie.title;
	
	var objMovie = document.getElementById("trailer");
	objMovie.URL = currentMovie.playUrl;
	objMovie.Controls.Play();
}

function moviePlay() {
	var objMovie = document.getElementById("trailer");
	objMovie.Controls.Play();
}

function movieStop() {
	var objMovie = document.getElementById("trailer");
	objMovie.Controls.Stop();
}

function moviePause() {
	var objMovie = document.getElementById("trailer");
	objMovie.Controls.Pause();
}

function copyCliboardMain() {
	var objMovie = document.getElementById("trailer");
	copyClipboard(objMovie.URL); 
}

function copyCliboardEach(pos) {
	copyClipboard(movies[pos].playUrl);
}

function copyClipboard(data) {
	var result = window.clipboardData.setData( "Text", data );
	if( result ) {
		alert('복사되었습니다. Ctrl + V 키로 붙여넣기 하세요.');
	}
}

function downloadMain() {
	document.getElementById("movieDown").src = currentMovie.downloadUrl;
}

function download(pos) {
	document.getElementById("movieDown").src = movies[pos].downloadUrl;
}