var isDetailsDisplayed = false;
var container, containerMore  ;
function playLesson(sku, id, foldername, movieCode, movieName){
	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;
	file =  H_PATH + '/modules/products/moviePlay.php?size=' + size + '&foldername=' + foldername + '&sku=' + sku + '&id=' + id  + '&movieCode=' + movieCode  + '&movieName=' + movieName ;
	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();
}


function openDetails(){
	container = (container) ? container : document.getElementById('titleDetails');
	containerMore = (containerMore) ? containerMore : document.getElementById('titleDetailsMore'); 
	if(isDetailsDisplayed){
		container.style.display = 'none';
		containerMore.innerHTML = '<a class="linkMore" href="#" onclick="javascript:openDetails(); return false;">'+moreStr+'</a>';
	}else{
		container.style.display = 'block';
		containerMore.innerHTML = '<a class="linkMore" href="#" onclick="javascript:openDetails(); return false;">'+hideStr+'</a>';
	}
	isDetailsDisplayed = !isDetailsDisplayed;
	return false;
}

function hideQtDetails(){
	qtContainer = document.getElementById('qtDetails');	
	qtContainer.style.display = 'none';
	return false;
}

function openFeedBack(sku){
	winwidth=500;
	winheight=450;
	wposx=(screen.width-500)/2;
	wposy=(screen.height-450)/2;
	file =  H_PATH + '/modules/misc/productFeedback.php?sku=' + sku ;
	popupWin = window.open(file, "productFeedback", "status=no,resizable=no,toolbar=no,scrollbars=yes,screenX=" + wposx + ",screenY=0,left=" + wposx + ",top=" + wposy + ",width=" + winwidth + ",height=" + winheight);
	popupWin.focus();
}

function openEmailPage(url){
	winwidth=500;
	winheight=410;
	wposx=(screen.width-500)/2;
	wposy=(screen.height-410)/2;
	file =  H_PATH + '/modules/misc/emailPage.php?url=' + url ;
	popupWin = window.open(file, "sendPage", "status=no,resizable=no,toolbar=no,scrollbars=no,screenX=" + wposx + ",screenY=0,left=" + wposx + ",top=" + wposy + ",width=" + winwidth + ",height=" + winheight);
	popupWin.focus();
}
function disableSubmit(){
	var frm = document.lessonsFrm;
	var updateBtn = frm.elements['updateBtn'];
	for (i=0; i<updateBtn.length; i++){
		updateBtn[i].disabled=true; updateBtn[i].readonly=true;
	}
	return true;
}