// JavaScript Document
//Open pou window to play lessons
function playLesson(sku, id, foldername, movieCode, movieName){
	//var MOVIE_SIZE;
	if ((MOVIE_SIZE == "Large") || (MOVIE_SIZE == "large")) {
		winwidth=800;
		winheight=600+50;
	}
	else if ((MOVIE_SIZE == "Small") || (MOVIE_SIZE == "small")) {
		winwidth=640;
		winheight=480+50;
	}else{
		winwidth=320;
		winheight=307;
	}
	wposx=0;
	wposy=0;
	size = MOVIE_SIZE;
	var mediaOptionsForm = document.forms["mediaOptions"];
	if(mediaOptionsForm){ 
		var radioObj = mediaOptionsForm.elements['playerOption'];
		var radioLength = radioObj.length;
		if(radioLength != undefined){
			//Can be flash or quicktime
			for(var i = 0; i < radioLength; i++){
				if(radioObj[i].checked){
					mediaMode = radioObj[i].value;
				}
			}
		}
		else{
			//Flash
			mediaMode = radioObj.value;
		}
	}
	else{
		mediaMode='qt';
	}
	file =  'http://www.vtc.com/modules/products/moviePlay.php?size=' + size + '&foldername=' + foldername + '&sku=' + sku + '&id=' + id  + '&movieCode=' + movieCode  + '&movieName=' + movieName+ '&mode=' + mediaMode;
	
	//alert(file);
	
	popupWin = window.open(file, "vtcplayer", "status=no,resizable=no,toolbar=no,scrollbars=no,screenX=" + wposx + ",screenY=0,left=" + wposx + ",top=" + wposy + ",width=" + winwidth + ",height=" + winheight);
	popupWin.focus();
}
