﻿function Tips(on,div,str)
{
    var msg ="";
    if (str==0)
    {
        msg = "Play/Resume seminar video and reset playback speed to 1.0x";
    }
    if (str==1)
    {
		msg = "Pause seminar video";
       
    }
    if (str==2)
    {
		 msg = "Decrease seminar video playback speed to " + getSpeed(0) + "x";
       
    }
    if (str==3)
    {
         msg = "Increase seminar video playback speed to " + getSpeed(1) + "x";
    }
	if (str==4)
	{
		msg = '<font color="#ff0000">**WARNING:</font> You are required to view from beginning next time. ';
	}
	if (str==5)
	{
		msg = 'Press <font color="#119911">OK</font> to begin the seminar.<br><font color="#ff0000">NOTE THAT</font> if you pause the video for more than 5 minutes / disconnect from this page during the seminar,<br> this seminar session is treated as incomplete and you are required to view this chapter from begin next time. ';
	}
	if (str==6)
	{
		msg = '<font color="#ff0000">Not Available</font> in CPT viewing mode.';
	}
	if (str==7)
	{
		msg = '<font color="#119911">Click for CPT viewing mode</font><br><br>In order to get your free online CPT hour, you will need to view every<br> chapter of the e-seminar and attempt all questions during throughout<br>  the presentation.If you score more than 60%, you will be awarded the<br> corresponding CPT hour(s).';
	}
	if (str==8)
	{
		msg = '<font color="#119911">Click for General viewing mode</font><br><br>You are free to view any e-seminar in this mode and there is<br> no restriction on how many times you view it.<br> No CPT hours will be counted in this mode.';
	}
	if (str==9)
	{
		msg = '<font color="#ff0000">Not Available</font> in Demo viewing.';
	}
	if (on==1)
	{
		x = (window.Event) ? e.pageX : event.clientX;
	  	y = (window.Event) ? e.pageY : event.clientY;
		document.getElementById(div).style.visibility = 'visible';
		document.getElementById(div).innerHTML = '<table border="1" bordercolor="#333333"><tr><td>'+msg+'</td></tr></table>';
		//document.getElementById(div).style.pixelLeft = x + 5;
		//document.getElementById(div).style.pixelTop = y + 5;
	}
	else
	{
		document.getElementById(div).style.visibility = 'hidden';
		document.getElementById(div).innerHTML = '&nbsp;';
	}
}

function getSpeed(mode)
{
	var msg = 0;
	if (mode==0)
	{
		msg = this.speed - 0.25;
		if	(msg == 0)
			msg = 0.25
		return msg;
	}
	else
	{	
		msg = this.speed + 0.25;
		if	(msg == 0)
			msg = 0.25;
		return msg;
	}
}
function getXY(e) 
{
	  x = (window.Event) ? e.pageX : event.clientX;
	  y = (window.Event) ? e.pageY : event.clientY;
	  document.getElementById('playerTips').style.pixelLeft = x + 20;
  	  document.getElementById('playerTips').style.pixelTop  = y ;
}// JScript File


