/******************************************************************************/
// 
// NOTE TO DEVELOPERS:
// The following code should be integrated with your web page in order to open
// the presentation in a new window.  To launch the presentation immediately,
// simply copy the code below into your web page.  To launch the presentation
// when a button or link is clicked, call LaunchPresentation when the onClick
// event is triggered.
//
//
// LaunchPresentation(url, bChromeless, bResize)
//
// Parameters:
//	bChromeless - Opens a new window without the toolbar, addressbar, statusbar,
//		      menubar, and scrollbars
//
//	bResize - Determines whether or not the new window can be resized
//
//  
/******************************************************************************/

function LaunchPresentation(url, bChromeless, bResize)
{
	var nWidth = screen.availWidth;
	var nHeight = screen.availHeight;

	// Get the width
	if (nWidth > 820)
	{
		nWidth = 980;
		nHeight = 640;
	}

	// Build the options string
	var strOptions = "width=" + nWidth +",height=" + nHeight;
	strOptions += ",resizable=yes"
	strOptions += ", status=1, toolbar=0, location=0, menubar=0, scrollbars=0";

	// Launch the URL
	window.open(url+"player.html" , "_blank", strOptions);
}

function LaunchPresentation2(url, bChromeless, bResize)
{
	var nWidth = screen.availWidth;
	var nHeight = screen.availHeight;

	// Get the width
	if (nWidth > 820)
	{
		nWidth = 980;
		nHeight = 640;
	}

	// Build the options string
	var strOptions = "width=" + nWidth +",height=" + nHeight;
	strOptions += ",resizable=yes"
	strOptions += ", status=1, toolbar=0, location=0, menubar=0, scrollbars=0";

	// Launch the URL
	window.open(url+"index.html" , "_blank", strOptions);
}

function LaunchPresentation3(url, bChromeless, bResize)
{
	var nWidth = screen.availWidth;
	var nHeight = screen.availHeight;

	// Get the width
	if (nWidth > 820)
	{
		nWidth = 980;
		nHeight = 640;
	}

	// Build the options string
	var strOptions = "width=" + nWidth +",height=" + nHeight;
	strOptions += ",resizable=yes"
	strOptions += ", status=1, toolbar=0, location=0, menubar=0, scrollbars=0";

	// Launch the URL
	window.open(url, "_blank", strOptions);
}

function QMBHDemo(url, bChromeless, bResize)
{
	var nWidth = screen.availWidth;
	var nHeight = screen.availHeight;

	// Get the width
	if (nWidth > 820)
	{
		nWidth = 982;
		nHeight = 680;
	}

	// Build the options string
	var strOptions = "width=" + nWidth +",height=" + nHeight;
	strOptions += ",resizable=yes, status=1, toolbar=0, location=0, menubar=0, scrollbars=0";

	// Launch the URL
	window.open(url, "_blank", strOptions);
}

function LaunchQuiz(url, bChromeless, bResize)
{
	var nWidth = screen.availWidth;
	var nHeight = screen.availHeight;

	// Get the width
	if (nWidth > 820)
	{
		nWidth = 800;
		nHeight = 600;
	}

	// Build the options string
	var strOptions = "width=" + nWidth +",height=" + nHeight;
	strOptions += ",resizable=yes"
	strOptions += ", status=1, toolbar=0, location=0, menubar=0, scrollbars=0";

	// Launch the URL
	window.open(url+"quizmaker.html" , "_blank", strOptions);
}

function LaunchInteraction(url, bChromeless, bResize)
{
	var nWidth = screen.availWidth;
	var nHeight = screen.availHeight;

	// Get the width
	if (nWidth > 820)
	{
		nWidth = 730;
		nHeight = 550;
	}

	// Build the options string
	var strOptions = "width=" + nWidth +",height=" + nHeight;
	strOptions += ",resizable=yes"
	strOptions += ", status=1, toolbar=0, location=0, menubar=0, scrollbars=0";

	// Launch the URL
	window.open(url, "_blank", strOptions);
}

function poptour(url) {
	// Build the options string
	strOptions = ",resizable=yes, status=1, toolbar=0, location=0, menubar=0, scrollbars=0";

	// Launch the URL
	window.open(url,"tour","width=745,height=585" + strOptions);

}

function popper(_url,_width,_height) {
//	window.open(_url, "popperwin", "width="+_width+",height="+_height+",resizable=1,toolbar=0,menubar=0,status=0,scrollbars=1,left=0,top=0");
	window.open(_url, "popperwin", "width="+_width+",height="+_height+",resizable=1,toolbar=0,menubar=0,status=0,scrollbars=1");

}

function chromePopper(_url,_width,_height) {
	window.open(_url, "popperwin", "width="+_width+",height="+_height+",resizable=1,toolbar=0,menubar=1,status=0,scrollbars=1");

}

function popperNoScroll(_url,_width,_height) {
        _width = _width - 10;
	window.open(_url, "popperwin", "width="+_width+",height="+_height+",resizable=0,toolbar=0,menubar=0,status=0,scrollbars=0");

}

var newwindow;
function poptastic(url)
{
        newwindow=window.open(url,'name','width=992,height=650');
        if (window.focus) {newwindow.focus()}
}
