/*
Change language.
*/
function MFChangeLanguage(selObj)
{
  if( selObj.options[ selObj.selectedIndex ].value != "#" ) 
  {
	document.location = selObj.options[ selObj.selectedIndex ].value;
  }
}

/*
Function for changing the style of the navigation button.
*/
function MFButtonMouseOver(szTdId)
{	
	document.getElementById( szTdId ).className = "navi_hover";
}	
	
/*
Function for changing the style of the navigation button.
*/
function MFButtonMouseOut(szTdId)
{
	document.getElementById( szTdId ).className = "navi_normal";
}

/*
Open a new window for printing.
*/
function MFOpenPrintWin( szLang, szPage )
{
	// The page to print.
	var szPage = "../common/print.asp?page=" + szPage + "&lang=" + szLang;
	
	// Open the window.
	var winPrint = window.open(szPage, "PrintWnd", "toolbar=no, width=610, height=320, resizable=yes, menubar=no, scrollbars=yes, status=no, directories=no, copyhistory=no, dependent=yes");
	
	// Focus.
	winPrint.focus();
}

/*
Open a new window for flash overview presentation.
*/
function MFOpenFlashOverview()
{
	// Construct a correct page and its parameters.
	var szPage = "res/flashoverview/intro.swf";
	
	// Open a new window. (802 x 603)
	var winFlash = window.open( szPage, "winflash", "toolbar=no, width=800, height=600, resizable=no, menubar=no, scrollbars=yes, status=yes, directories=no, copyhistory=no, dependent=no");		
	winFlash.focus();
	
	return true;
}
function MFOpenFlashGuidedTour()
{
	// Construct a correct page and its parameters.
	var szPage = "res/guidedtour/M-FilesGuidedTour.exe";
	
	
	// Open a new window. (802 x 603)
	var winFlash = window.open( szPage, "winflash", "toolbar=no, width=800, height=600, resizable=no, menubar=no, scrollbars=yes, status=yes, directories=no, copyhistory=no, dependent=no");		
	winFlash.focus();
	
	return true;
}

/*
This function opens the buy window.
*/
function MFOpenBuyWindow( szDebug, szLanguage )
{
	// Construct a correct page and its parameters.
	var szPage;
	if( szDebug == "true" || szDebug == "True" ) 
	{
		szPage = "buystep1.asp";
	}
	else
	{
		szPage = "https://www.m-files.com/" + szLanguage + "/buystep1.asp"
	}
	
	// Open a new window.
	var winOrderForm;
	winOrderForm = window.open( szPage, "winbuy", "toolbar=no, width=970, height=780, resizable=yes, menubar=no, scrollbars=yes, status=yes, directories=no, copyhistory=no, dependent=yes");		
	winOrderForm.focus();
	
	return;
}

/*
This function opens the help window. 
*/
function MFOpenHelpWin( szPage ) 
{
   var winHelp = window.open( szPage, "helpwin", "toolbar=no, width=480, height=320, resizable=yes, menubar=no, scrollbars=yes, status=no, directories=no, copyhistory=no, dependent=yes" );
   winHelp.focus();
}

