// MPWindow class. Perform window operations.

//  Created 06 Feb 10
// Modified 09 Feb 10


//------------------------------------------------------------------------------
function CloseMe()
{
// Close window.

// For Mozilla, make system think window was opened with window.open
// comment out for now, since we are using javascript to open all new pop-up windows.
//	var win=window.open("","_self");

	window.close();
}


//------------------------------------------------------------------------------
function Download(url) 
{
// Download a file from server to client.

	var ok=confirm('Click "OK" to download the application.')
	if (ok) 
		{window.location=url}
}


//------------------------------------------------------------------------------
function EmailPA()
{ 
// Email a support request to P/A development.

    var email = "MajorPilot@iquest.net"; 
    var subject = "P/A Support Request"; 

    var emaillink = 'mailto:' + email + '?subject=' + subject; 

    win = window.open(emaillink,''); 
    if (win && win.open &&!win.closed) win.close(); 
} 


//------------------------------------------------------------------------------
function NavBar(url) 
{
// Navigation Bar..

//	document.write('<a href=\"mailto:' + name + '@' + domain + '?subject=' + subject + '\">');

	document.write('<a href="index.html">Home</a>&nbsp;|');


}








//------------------------------------------------------------------------------
function ShowNewWindow(url,pwidth,pheight)
{
// Show a page in a new window, of requested dimensions.
   
// The attributes of window.open is a literal. In order to subtitute width and length,
// we must ust assemple an attributes field, then insert it as a parameter.

   	var windowAttr = "width=" + pwidth + ",height=" + pheight + 		",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,directories=no";
    	window.open(url,"",windowAttr);
}


//------------------------------------------------------------------------------
function ShowSameWindow(url) 
{
// Show a page in the same window.

	var mywindowobject = window.location(url);
}

















