
var sWidth = (screen.width) ? screen.width : 0;
var sHeight = (screen.height) ? screen.height : 0;
var screenX;
var screenY;

document.cookie="screenres="+sWidth+"x"+sHeight+"; path=/";

//**********************//
function centerWindow(myWin) 
{
	myDoc = myWin.document.body;
	if (sWidth > 800 || sHeight > 600) 
	{
		screenX = (screen.availWidth / 2) - ((myDoc != null && myDoc.clientWidth > 0) ? (myDoc.clientWidth / 2) : 250);
		screenY = (screen.availHeight / 2) - ((myDoc != null && myDoc.clientHeight > 0) ? (myDoc.clientHeight / 2) : 120);
		myWin.window.moveTo(screenX, screenY);
	}
}
//***********************//
function openChat(){
	chatWindow=window.open("http://www2.streamlogics.com/clients/qrca/chat/index.php","chatwindow","width=650,height=500,toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=yes");
	chatWindow.focus();
}

//***************************//
function openWin() 
{
	if (sWidth > 800) 
	{  // if the screen res is higher than 800x600 then open the large auditorium
		aWidth = 1014;
		aHeight = 678;
		screensize="large";
	}
	else
	{
		aWidth = 790;
		aHeight = 510;
		screensize="small";
	}

	pLeft = (sWidth - aWidth) / 2;
	pTop = ((sHeight - aHeight) / 2 ) - 40;
	if (pTop < 0)
	{
		pTop = 0;
	}
	if (pLeft < 0)
	{
		pLeft = 0;
	}
	document.cookie="screensize="+screensize+"; path=/";


	var aWindow=window.open("auditorium/index.htm","thewindow","width="+aWidth+",height="+aHeight+",top="+pTop+",left="+pLeft+",toolbar=0,location=0,statusbar=0,menubar=0,resizable=0");
	
	// var aWindow=window.open("auditorium/index.asp","thewindow","width="+aWidth+",height="+aHeight+",top="+pTop+",left="+pLeft+",toolbar=0,location=0,statusbar=0,menubar=0,resizable=0");
	if (aWindow)
	{
		aWindow.focus();
	}
}

function openWinConf() 
{
	if (sWidth > 800) 
	{  // if the screen res is higher than 800x600 then open the large auditorium
		aWidth = 1014;
		aHeight = 678;
		screensize="large";
	}
	else
	{
		aWidth = 790;
		aHeight = 510;
		screensize="small";
	}

	pLeft = (sWidth - aWidth) / 2;
	pTop = ((sHeight - aHeight) / 2 ) - 40;
	if (pTop < 0)
	{
		pTop = 0;
	}
	if (pLeft < 0)
	{
		pLeft = 0;
	}
	document.cookie="screensize="+screensize+"; path=/";

	var aWindow=window.open("auditorium/index.asp?selectedConferenceCall=1","thewindow","width="+aWidth+",height="+aHeight+",top="+pTop+",left="+pLeft+",toolbar=0,location=0,statusbar=0,menubar=0,resizable=0");
	if (aWindow)
	{
		aWindow.focus();
	}
}


//**********************//
function Tell()
{
	var Tellwindow=window.open("Forms/invite-a-friend.asp","tell","width=300,height=230,toolbar=no,menubar=no,status=no,scrollbars=no,resizable=no");
	if (Tellwindow)
	{
		centerWindow(Tellwindow)
		Tellwindow.focus();
	}
}

//**********************//
function openCop()
{
	aWindow=window.open("http://events.streamlogics.com/standard_includes/english/copyright.htm","copwindow","width=300,height=450,toolbar=no,menubar=no,status=no,scrollbars=yes,resize=no");
	if (aWindow)
	{
		if (aWindow.opener == null) aWindow.opener = window;
	}
}

//**********************//
function openqanda()
{
	aWindow=window.open("Forms/question.asp","qandawindow","width=400,height=70,toolbar=no,menubar=no,status=no,scrollbars=yes,resize=no");
	if (aWindow)
	{
		if (aWindow.opener == null) aWindow.opener = window;
	}
}

//**********************//
function openQuote()
{
	//For the Quote Ticker enter the symbol after 'pi_symbol=' in this exp: CMGI-Q//
	QuoteWindow=window.open("http://investdb.theglobeandmail.com/invest/investSQL/gx.stock_today?pi_symbol=CMGI-Q","Quote","width=650,height=450,toolbar=no,menubar=no,status=no,scrollbars=yes, resizable=yes");
	if (QuoteWindow)
	{
		centerWindow(QuoteWindow)
		QuoteWindow.focus();
	}
}


