function playLesson(movieCode){
var mediaOptionsForm = document.forms["mediaOptions"];

	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;
	}
	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';
	}
	winheight+=10;
	winwidth+=10;
	
	wposx=0;
	wposy=0;
	size = movie_size;
	//http://vtc.com/modules/products/affiliatePlay.php
//switch to setter3 to record email addresses
//file='grab.php?type=<?=$mode?>&price=<?=$p1?>&mode=<?=$mode?>&cat=<?=$cat?>&size=<?=$size?>&foldername=<?=$foldername?>&sku=<?=$cartcode?>&movie='+movienum+'';
	//file='http://www.hyperteach.com/grab.php?size='+size+'&foldername='+folder_name+'&sku='+sku+'&movie='+movieCode+'&type=' + mediaMode;
	file='http://apex.vtc.com/setter.php?size='+size+'&foldername='+folder_name+'&sku='+sku+'&movie='+movieCode+'&type=' + mediaMode;
	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 hideQtDetails(){
	qtContainer = document.getElementById('qtDetails');	
	qtContainer.style.display = 'none';
	qtContainer1 = document.getElementById('test');
	qtContainer1.style.display = 'block';
	
	return false;
}
function viewQtDetails(){
	qtContainer = document.getElementById('qtDetails');	
	qtContainer.style.display = 'block';
	qtContainer1 = document.getElementById('test');
	qtContainer1.style.display = 'none';
}
function hideQtLinks(){
	qtContainer1 = document.getElementById('test');
	qtContainer1.style.display = 'block';
	qtContainer = document.getElementById('qtDetails');	
	qtContainer.style.display = 'none';
	return false;
}

function P7_swapClass(){ //v1.4 by PVII

 var i,x,tB,j=0,tA=new Array(),arg=P7_swapClass.arguments;
 if(document.getElementsByTagName){for(i=4;i<arg.length;i++){tB=document.getElementsByTagName(arg[i]);
  for(x=0;x<tB.length;x++){tA[j]=tB[x];j++;}}for(i=0;i<tA.length;i++){
  if(tA[i].className){if(tA[i].id==arg[1]){if(arg[0]==1){
  tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}else{tA[i].className=arg[2];}
  }else if(arg[0]==1 && arg[1]=='none'){if(tA[i].className==arg[2] || tA[i].className==arg[3]){
  tA[i].className=(tA[i].className==arg[3])?arg[2]:arg[3];}
  }else if(tA[i].className==arg[2]){tA[i].className=arg[3];}}}}
}

function changeStyle(playerType) {
	var tableObj = document.getElementById("tutorialList");
	var tableTds = tableObj.getElementsByTagName("li");
	
	var tdCount = tableTds.length;
	//alert('class','icon'+playerType+'Inactive');
	for(i=0; i<tdCount;i++) {
		var tdId = tableTds[i].id;
		if(tdId) {
			tdObject = document.getElementById(tdId);
			if(tdId.search('Inactive') > 0) {
			tdObject.setAttribute('class','icon'+playerType+'Inactive');
				tdObject.setAttribute('className','icon'+playerType+'Inactive'); //For IE browser
			} else if(tdId.search('Active') >0) {
				tdObject.setAttribute('class','icon'+playerType+'Active');	
				tdObject.setAttribute('className','icon'+playerType+'Active');	//For IE browser
			}
		}
	}
	
}
