function goFullScreen()
{	
	val1 = window.screen.width;
	val2 = window.screen.height;
	window.moveTo(0,0);
	window.resizeTo(val1,val2);	
}

function popUpWindow( href, title, options, fullScreen, setTimer )
{
	var windowOptions = 'location=0,status=0,menubar=0,toolbar=0';
	
	var resizableOption  = 'resizable=yes';
	var scrollbarsOption = 'scrollbars=1';
	
	if(options)
	{
		if( options.indexOf( 'resizable=' ) == -1 )
			windowOptions += ',' + resizableOption;
		if( options.indexOf( 'scrollbars=' ) == -1 )
			windowOptions += ',' + scrollbarsOption;
		
		windowOptions = windowOptions + ',' + options;
	}
	else
		windowOptions += ',' + resizableOption + ',' + scrollbarsOption;
	
	popUp = window.open( href , title , windowOptions ); 
	
	if(fullScreen == true)
	{
		val1 = window.screen.width;
		val2 = window.screen.height;
		popUp.moveTo(0,0);
		popUp.resizeTo(val1,val2);
	}

	/*
	timer() function reference in js/elements/popup_observe.js
	*/
	if(setTimer ==  true)
	{
		popUp.focus(); 
		timer();	
	}	
}

/**
 * Adds onload method and focuses on specified form field
 */
function focusOn( formField )
{
	window.onload = function()
	{
		document.getElementById( formField ).focus();
	}
}

function toggleAllSelects( state )
{
	var selects = document.getElementsByTagName("select");
	for (var i = 0; i < selects.length; i++ ) {
		if( selects[i].parentNode.parentNode.id == 'newAbsence' )
			continue;
		selects[i].style.visibility = (state == "hide") ? 'hidden' : 'visible';
	}	
}

/** SCORM **/
function scoWindow( href, title, options, fullScreen, setTimer )
{
	var windowOptions = 'resizable=yes,location=0,status=0,scrollbars=1,menubar=0,toolbar=0';
	
	if(options)
		windowOptions = windowOptions + ',' + options;
	
	popUp = window.open( href , title , windowOptions ); 
	
	if(fullScreen == true)
	{
		val1 = window.screen.width;
		val2 = window.screen.height;
		popUp.moveTo(0,0);
		popUp.resizeTo(val1,val2);
	}

	/*
	timer() function reference in js/elements/popup_observe.js
	*/
	if(setTimer ==  true)
	{
		popUp.focus(); 
		scoTimer();	
	}	
}