// SCREEN DETECTION & METHODS -----------------------------------------------------------

bodyWidth = screen.availWidth;
bodyHeight = screen.availHeight;
screenWidth = screen.width;
screenHeight = screen.height;

function windowOpen( title, url, x, y, width, height, location, menubar, toolbar, scrollbars, status, resizable, fullscreen) {
	var tmpWindow = window.open( url, title, "left=" + x + ",top=" + y + ",width=" + width + ",height=" + height + ",location=" + location + ",menubar=" + menubar + ",toolbar=" + toolbar + ",scrollbars=" + scrollbars + ",status=" + status + ",resizable=" + resizable + ",fullscreen=" + fullscreen);
	tmpWindow.focus();
	return( tmpWindow);
}

function popupOpen( title, url, width, height, scrollbars) {
	var tmpWindow = windowOpen( title, url, ( screenWidth - width) / 2 - 5, ( screenHeight - height) / 2 - 20, width, height, 'no', 'no', 'no', scrollbars, 'no', 'no', 'no');
}

function popupOpenFullScreen( title, url, fullscreen) {
	var tmpWidth = bodyWidth;
	var tmpHeight = bodyHeight;
	var tmpWindow = windowOpen( title, url, 0, 0, tmpWidth, tmpHeight, 'no', 'no', 'no', 'no', 'no', 'no', fullscreen);
	tmpWindow.resizeTo( tmpWidth, tmpHeight);
}
popupOpenFullScreen = popupOpenFullScreen;


function popupCheck( NoFunctionName, YesFunctionName) {
	tmpTimeoutId = setTimeout( 'if ( tmpPopupCheck == null) { eval( "' + NoFunctionName + '()"); } else { eval( "' + YesFunctionName + '()"); }', 1000);
	tmpPopupCheck = window.open( "about:blank","tmpPopupCheck","width=100,height=100,left=0,top=5000");
	tmpPopupCheck.document.write( '<scr' + 'ipt type="text/javascript">window.close()</scr' + 'ipt>');
}

function popUpAcces (){
	popupOpen('plan', '_acces/', 590, 480, 'no');
}
