You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by bu...@apache.org on 2014/07/05 18:25:33 UTC

svn commit: r915113 - in /websites/staging/ooo-site/trunk: cgi-bin/ content/ content/download/download.js

Author: buildbot
Date: Sat Jul  5 16:25:32 2014
New Revision: 915113

Log:
Staging update by buildbot for ooo-site

Modified:
    websites/staging/ooo-site/trunk/cgi-bin/   (props changed)
    websites/staging/ooo-site/trunk/content/   (props changed)
    websites/staging/ooo-site/trunk/content/download/download.js

Propchange: websites/staging/ooo-site/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Jul  5 16:25:32 2014
@@ -1 +1 @@
-1608047
+1608048

Propchange: websites/staging/ooo-site/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Jul  5 16:25:32 2014
@@ -1 +1 @@
-1608047
+1608048

Modified: websites/staging/ooo-site/trunk/content/download/download.js
==============================================================================
--- websites/staging/ooo-site/trunk/content/download/download.js (original)
+++ websites/staging/ooo-site/trunk/content/download/download.js Sat Jul  5 16:25:32 2014
@@ -1,77 +1,82 @@
 /*
  * Overview of all functions defined below
- * ------------------------------------------
- * function init		()
- * function initVars		()
- * function getLanguage		()
- * function fillOSSel		()
- * function fillLangSel		()
- * function fillVerSel		()
- * function getOSSel		()
- * function getLangSel		()
- * function getVerSel		()
- * function setOSSel		()
- * function setLangSel		()
- * function setVerSel		()
- * function resetElements	()
- * function showWindow		( target_url )
- * function showErrorMessage	( error_text )
- * function isLangSupported	()
- * function checkLinkExceptions ()
- * function getLinkSel		()
- * function getPlatform		()
- * function getReleaseMatrixPos	()
- * function getFileData		( ver )
- * function openItem		( itemid, uri )
- * function alertDbg		( location )
+ * ----------------------------------------------------
+ * function init			()
+ * function initVariables		()
+ * function getLanguage			()
+ * function fillOSSelection		()
+ * function fillLanguageSelection	()
+ * function fillVersionSelection	()
+ * function getOSSelection		()
+ * function getLanguageSelection	()
+ * function getVersionSelection		()
+ * function setOSSelection		()
+ * function setLanguageSelection	()
+ * function setVersionSelection		()
+ * function hideElements		()
+ * function showWindow			( target_link )
+ * function showErrorMessage		( error_text )
+ * function isLanguageSupported		()
+ * function checkForLinkExceptions	()
+ * function getLinkSelection		()
+ * function getPlatform			()
+ * function getReleaseMatrixPosition	()
+ * function getFileData			( version )
+ * function openItem			( itemid, uri )
+ * function debug			( location )
  */
 
 /*
  * Init function
+ * @param:  release_mode - The release mode (stable, beta, etc.) that the scriping should work with
+ * @return: None
  */
-function init( mode ) {
+function init( release_mode ) {
 	// Set global variables.
-	initVars( 1 );
+	initVariables( 1 );
 
 	// Fill the OS, language and version select boxes.
-	fillOSSel()
-	fillLangSel();
-	fillVerSel();
+	fillOSSelection();
+	fillLanguageSelection();
+	fillVersionSelection();
 
-	// Get the platform and language from the browser data.
-	getPlatform();
+	// Get the language and platform from the browser data.
 	getLanguage();
+	getPlatform();
 
 	// Set the recognized platform and language as default.
-	setOSSel();
-	setLangSel();
-	setVerSel();
+	setOSSelection();
+	setLanguageSelection();
+	setVersionSelection();
 
 	
 	// When release mode = 2, it is a beta release. Otherwise assume "stable release" as default.
-	if( mode === 2 )
-		R_MODE = mode;
+	if( release_mode === 2 ) {
+		RELEASE_MODE = mode;
+	}
 
-	getLinkSel();
+	getLinkSelection();
 
 	return;
 }
 
 /*
  * Define all global variables with default values
+ * @param:  init_all - Should all variables initialized or just a part?
+ * @return: None
  */
-function initVars( init_all ) {
+function initVariables( init_all ) {
 	// Define variables without "var" to make them globally available.
 
 	// The following are used in "download.js". and "index.html".
 
-	// All elements with ID in the sub-green box.
-	element_ids_sub_green = [ "dl_rel_info", "dl_rel_notes", "dl_f_info", "dl_f_chk_keys", "space1", "dl_f_chk_asc",
+	// All elements with ID in the sub-box.
+	element_ids_sub_box = [ "dl_rel_info", "dl_rel_notes", "dl_f_info", "dl_f_chk_keys", "space1", "dl_f_chk_asc",
 	"space2", "dl_f_chk_md5", "space3", "dl_f_chk_sha256", "dl_lp_info", "dl_lp_chk_keys", "space4", "dl_lp_chk_asc",
 	"space5", "dl_lp_chk_md5", "space6", "dl_lp_chk_sha256", "dl_hlp_img", "dl_hlp", "dl_chk_img", "dl_chk",
 	"dl_rpt_img", "dl_rpt" ];
 
-	// All elements with ID in the green and sub-green box that have a link.
+	// All elements with ID in the green and sub-box that have a link.
 	element_ids_links = [ "dl_f_link", "dl_lp_link", "dl_f_chk_keys", "dl_f_chk_asc", "dl_f_chk_md5", "dl_f_chk_sha256",
 	"dl_lp_chk_keys", "dl_lp_chk_asc", "dl_lp_chk_md5", "dl_lp_chk_sha256", "dl_hlp", "dl_chk", "dl_rpt" ];
 
@@ -79,85 +84,90 @@ function initVars( init_all ) {
 
 	// All global variables.
 	if( init_all === 1 ) {
-		R_MODE				= 1;	 // The release mode (1 = stable release (default), 2 = beta release, etc.).
-		LANG_ISO			= "";	 // The language as ISO code.
-		LANG_SEL			= "";	 // The selected language as ISO code from select box.
-		UI_PLATFORM_NO_SUP		= "";	 // The platform as readable string, if not supported.
-		PLATFORM_SEL			= "";	 // The selected platform from select box.
-		VERSION_SEL			= "";	 // The selected version from select box.
-	}
-
-	UI_PLATFORM				= "";	 // The platform as readable string.
-	PLATFORM				= "";	 // The platform in short form.
-	PLATFORM_FULL				= "";	 // The platform as part of the download URL (full install).
-	PLATFORM_LP				= "";	 // The platform as part of the download URL (langpack).
-	RELEASE_PLATFORM_POS_FULL		= -1;	 // The position of the platform in the release matrix array (full install).
-	RELEASE_PLATFORM_POS_LP			= -1;	 // The position of the platform in the release matrix array (langpack).
-	RELEASE_PLATFORM			= "";	 // The platform in the release matrix array.
-	RELEASE_LANG				= "";	 // The language specific data depending on LANG_ISO.
-	REL_TEXT				= "";	 // The release data (milestone, build ID, svn rev, release date).
-	REL_NOTES				= "";	 // The complete URL for the release notes (depends on version).
-	FILENAME_FULL				= "";	 // The complete filename of the download URL (full install).
-	FILENAME_LP				= "";	 // The complete filename of the download URL (langpack).
-	FILESIZE_FULL				= -1;	 // The filesize of the download file (full install).
-	FILESIZE_LP				= -1;	 // The filesize of the download file (langpack).
-	EXTENSION				= "";	 // The file extension of the download URL.
-	SOURCEFORGE_BASE_URL			= "";	 // The base URL for all binary files on Sourceforge.
-	SOURCEFORGE_PREV_URL			= "";	 // The base URL for all binary files (prev. version) on Sourceforge.
-	ASF_ARC_BASE_URL			= "";	 // The base URL for all checksum files on Apache Archive server.
-	ASF_ARC_PREV_URL			= "";	 // The base URL for all checksum files (prev. version) on Apache Archive server.
-	ASF_WIKI_URL				= "";	 // The base URL for all release notes on Apache Wiki.
-	LINK_FULL				= "";	 // The complete download URL (full install).
-	LINK_LP					= "";	 // The complete download URL (langpack).
-	LINK_CHK_KEYS				= "";	 // The KEYS file as download URL.
-	LINK_CHK_ASC_FULL			= "";	 // The ASC file as download URL (full install).
-	LINK_CHK_MD5_FULL			= "";	 // The MD5 file as download URL (full install).
-	LINK_CHK_SHA256_FULL			= "";	 // The SHA256 file as download URL (full install).
-	LINK_CHK_ASC_LP				= "";	 // The ASC file as download URL (langpack).
-	LINK_CHK_MD5_LP				= "";	 // The MD5 file as download URL (langpack).
-	LINK_CHK_SHA256_LP			= "";	 // The SHA256 file as download URL (langpack).
-	SUPPORTED				= false; // Are the selected options supported in general (true) or not (false)?
-	ERROR					= false; // Is the download URL in general correct (true) or not (false)?
+		RELEASE_MODE		= 1;	 // The release mode (1 = stable release (default), 2 = beta release, etc.).
+		LANG_ISO		= "";	 // The language as ISO code.
+		LANG_SEL		= "";	 // The selected language as ISO code from select box.
+		UI_PLATFORM_NO_SUP	= "";	 // The platform as readable string, if not supported.
+		PLATFORM_SEL		= "";	 // The selected platform from select box.
+		VERSION_SEL		= "";	 // The selected version from select box.
+	}
+
+	UI_PLATFORM			= "";	 // The platform as readable string.
+	PLATFORM			= "";	 // The platform in short form.
+	PLATFORM_FULL			= "";	 // The platform as part of the download URL (full install).
+	PLATFORM_LP			= "";	 // The platform as part of the download URL (langpack).
+	RELEASE_PLATFORM_POS_FULL	= -1;	 // The position of the platform in the release matrix array (full install).
+	RELEASE_PLATFORM_POS_LP		= -1;	 // The position of the platform in the release matrix array (langpack).
+	RELEASE_PLATFORM		= "";	 // The platform in the release matrix array.
+	RELEASE_LANG			= "";	 // The language specific data depending on LANG_ISO.
+	REL_TEXT			= "";	 // The release data (milestone, build ID, svn rev, release date).
+	REL_NOTES			= "";	 // The complete URL for the release notes (depends on version).
+	FILENAME_FULL			= "";	 // The complete filename of the download URL (full install).
+	FILENAME_LP			= "";	 // The complete filename of the download URL (langpack).
+	FILESIZE_FULL			= -1;	 // The filesize of the download file (full install).
+	FILESIZE_LP			= -1;	 // The filesize of the download file (langpack).
+	EXTENSION			= "";	 // The file extension of the download URL.
+	SOURCEFORGE_BASE_URL		= "";	 // The base URL for all binary files on Sourceforge.
+	SOURCEFORGE_PREV_URL		= "";	 // The base URL for all binary files (prev. version) on Sourceforge.
+	ASF_ARC_BASE_URL		= "";	 // The base URL for all checksum files on Apache Archive server.
+	ASF_ARC_PREV_URL		= "";	 // The base URL for all checksum files (prev. version) on Apache Archive server.
+	ASF_WIKI_URL			= "";	 // The base URL for all release notes on Apache Wiki.
+	LINK_FULL			= "";	 // The complete download URL (full install).
+	LINK_LP				= "";	 // The complete download URL (langpack).
+	LINK_CHK_KEYS			= "";	 // The KEYS file as download URL.
+	LINK_CHK_ASC_FULL		= "";	 // The ASC file as download URL (full install).
+	LINK_CHK_MD5_FULL		= "";	 // The MD5 file as download URL (full install).
+	LINK_CHK_SHA256_FULL		= "";	 // The SHA256 file as download URL (full install).
+	LINK_CHK_ASC_LP			= "";	 // The ASC file as download URL (langpack).
+	LINK_CHK_MD5_LP			= "";	 // The MD5 file as download URL (langpack).
+	LINK_CHK_SHA256_LP		= "";	 // The SHA256 file as download URL (langpack).
+	SHOW_SUB_BOX			= true;	 // Is the download URL OK to show the sub-box (true) or not (false)?
+	ERROR				= false; // Is the download URL in general OK (false) or not (true)?
 
 	return;
 }
 
 /*
  * Get array and ISO code for language
- * Depends on $NL_LANG and array-list
+ * @param:  None
+ * @return: LANG_ISO - The language as ISO code
  */
 function getLanguage() {
 	var language = "";
 
 	// If available, use the manual set ISO code (see "index.html") that overrides $LANG_ISO.
-	if( NL_LANG !== "" )
+	if( NL_LANG !== "" ) {
 		language = NL_LANG;
 
 	// Else if available, use the selected language from select box.
-	else if( LANG_SEL !== "" )
+	} else if( LANG_SEL !== "" ) {
 		language = LANG_SEL;
 
 	// Else try to recognize the language from browser data.
-	else if( navigator.language )
+	} else if( navigator.language ) {
 		language = navigator.language;
-	else if( navigator.userLanguage )
+	} else if( navigator.userLanguage ) {
 		language = navigator.userLanguage;
-	else if( navigator.browserLanguage )
+	} else if( navigator.browserLanguage ) {
 		language = navigator.browserLanguage;
-	else if( navigator.systemLanguage )
+	} else if( navigator.systemLanguage ) {
 		language = navigator.systemLanguage;
+	}
 
 	// Assign "en-US" as fall-back language if only "en" is set or nothing at all.
-	if( !language || language === "" || language == null || language === "en" )
+	if( !language || language === "" || language == null || language === "en" ) {
 		language = "en-US";
+	}
 	// Assign "pt-PT" if only "pt" is set.
-	if( language === "pt" )
+	if( language === "pt" ) {
 		language = "pt-PT";
+	}
 
 	// Konqueror uses '_' where other browsers use '-'.
-	if( language.indexOf( "_" ) !== -1 )
+	if( language.indexOf( "_" ) !== -1 ) {
 		// Change a contained '_' into a '-'.
 		language = language.split( "_" ).join( "-" );
+	}
 
 	language		= language.toLowerCase();	// Change the language into lower case.
 	var languageCode	= language.split( "-" )[ 0 ];	// Part before "-" is the language code.
@@ -174,8 +184,9 @@ function getLanguage() {
 
 	if( regionCode != null ) {
 		// Fix for Portuguese (European) downloads as they are named only "pt" without region code!
-		if( languageCode === "pt" && regionCode === "pt" )
+		if( languageCode === "pt" && regionCode === "pt" ) {
 			language = languageCode;
+		}
 
 		// If an additional region code was found.
 		if( thisLanguageSet[ regionCode ] != null ) {
@@ -207,11 +218,12 @@ function getLanguage() {
 
 /*
  * Set values into the <select> element for OS (select box)
- * Depends on array-list
+ * @param:  None
+ * @return: None
  */
-function fillOSSel() {
-	var sel_os = document.getElementById( "os" );
-	var option = "";
+function fillOSSelection() {
+	var selection_os = document.getElementById( "os" );
+	var option	 = "";
 
 	// Fill the <select> element until all OS's are used.
 	for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
@@ -220,7 +232,7 @@ function fillOSSel() {
 		option.value = SEL_OS[ i ];
 		// Assign the UI platform name.
 		option.text  = SEL_OS[ i + 1 ];
-		sel_os.appendChild( option );
+		selection_os.appendChild( option );
 	}
 
 	return;
@@ -228,11 +240,12 @@ function fillOSSel() {
 
 /*
  * Set values into the <select> element for language (select box)
- * Depends on array-list
+ * @param:  None
+ * @return: None
  */
-function fillLangSel() {
-	var sel_lang = document.getElementById( "lang" );
-	var option   = "";
+function fillLanguageSelection() {
+	var selection_language = document.getElementById( "language" );
+	var option	       = "";
 
 	// Fill the <select> element until all languages are used.
 	for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
@@ -241,7 +254,7 @@ function fillLangSel() {
 		option.value = SEL_LANG[ i ];
 		// Assign the UI name like "English (Native) (ISO code)".
 		option.text  = SEL_LANG[ i + 1 ];
-		sel_lang.appendChild( option );
+		selection_language.appendChild( option );
 	}
 
 	return;
@@ -249,11 +262,12 @@ function fillLangSel() {
 
 /*
  * Set values into the <select> element for version (select box)
- * Depends on array-list
+ * @param:  None
+ * @return: None
  */
-function fillVerSel() {
-	var sel_ver = document.getElementById( "ver" );
-	var option  = "";
+function fillVersionSelection() {
+	var selection_version = document.getElementById( "version" );
+	var option	      = "";
 
 	// Fill the <select> element until all versions are used.
 	for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
@@ -262,7 +276,7 @@ function fillVerSel() {
 		option.value = SEL_VER[ i ];
 		// Assign the UI version.
 		option.text  = SEL_VER[ i + 1 ];
-		sel_ver.appendChild( option );
+		selection_version.appendChild( option );
 	}
 
 	return;
@@ -270,113 +284,117 @@ function fillVerSel() {
 
 /*
  * Set value in the <select> element for OS (select box)
- * Depends on OS data from browser
+ * @param:  None
+ * @return: PLATFORM_SEL - The platform as short code that was set as selected in the drop-down box
  */
-function setOSSel() {
+function setOSSelection() {
 	// Depending on $PLATFORM assign the platform string of the release matrix.
-	var sel_os = document.getElementById( "os" );
+	var selection_os = document.getElementById( "os" );
 
 	// Set the recognized browser platform as default for the select box.
 	for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
 		// If the platform was found, assign the found index to the select box.
 		if( SEL_OS[ i ] === PLATFORM ) {
-			sel_os.selectedIndex = i / 3;
+			selection_os.selectedIndex = i / 3;
 			break;
 		}
 	}
 
 	// If no selected platform for was set in the select box because it was not recognized from browser data,
 	// assign "Windows" as default.
-	if( sel_os.selectedIndex === 0 ) {
+	if( selection_os.selectedIndex === 0 ) {
 		// Default: Assign "Windows".
 		for( var i = 0, j = SEL_OS.length; i < j; i = i + 3 ) {
 			// If the platform was found, assign the found index to the select box.
 			if( SEL_OS[ i ] === "Win_x86_install" ) {
-				sel_os.selectedIndex = i / 3;
+				selection_os.selectedIndex = i / 3;
 				break;
 			}
 		}
 	}
 
-	PLATFORM_SEL = sel_os.value;
+	PLATFORM_SEL = selection_os.value;
 	return PLATFORM_SEL;
 }
 
 /*
  * Set value in the <select> element for language (select box)
- * Depends on language data from browser
+ * @param:  None
+ * @return: LANG_SEL - The language as ISO code that was set as selected in the drop-down box
  */
-function setLangSel() {
+function setLanguageSelection() {
 	// Depending on $LANG_ISO assign the language position of the release matrix.
-	var sel_lang   = document.getElementById( "lang" );
-	var lang_found = false;
+	var selection_language = document.getElementById( "language" );
+	var language_found     = false;
 
 	// Set the recognized browser language as default for the select box.
 	for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
 		// If the language was found, assign the found index to the select box.
 		if( SEL_LANG[ i ] === LANG_ISO ) {
-			sel_lang.selectedIndex = i / 2;
-			lang_found = true;
+			selection_language.selectedIndex = i / 2;
+			language_found = true;
 			break;
 		}
 	}
 
 	// If no selected language was set in the select box because it was not recognized from browser data,
 	// assign "en-US" as default.
-	if( ! lang_found ) {
+	if( ! language_found ) {
 		// Default: Assign "en-US".
 		for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
 			// If the language was found, assign the found index to the select box.
 			if( SEL_LANG[ i ] === "en-US" ) {
-				sel_lang.selectedIndex = i / 2;
+				selection_language.selectedIndex = i / 2;
 				break;
 			}
 		}
 	}
 
-	LANG_SEL = sel_lang.value;
+	LANG_SEL = selection_language.value;
 	return LANG_SEL;
 }
 
 /*
  * Set value in the <select> element for version (select box)
- * Depends on nothing
+ * @param:  None
+ * @return: VERSION_SEL - The version that was set as selected in the drop-down box
  */
-function setVerSel() {
+function setVersionSelection() {
 	// Depending on $VERSION assign the version.
-	var sel_ver = document.getElementById( "ver" );
+	var selection_version = document.getElementById( "version" );
 
 	// Set the value of $VERSION as default for the select box.
 	for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
 		// If the version was found, assign the found index to the select box.
 		if( SEL_VER[ i ] === VERSION ) {
-			sel_ver.selectedIndex = i/2;
+			selection_version.selectedIndex = i/2;
 			break;
 		}
 	}
 
 	// If no version was set as global variable,
 	// assign the most recent version as default.
-	if( sel_ver.selectedIndex === 0 ) {
+	if( selection_version.selectedIndex === 0 ) {
 		// Default: Assign "4.1.0".
 		for( var i = 0; i < SEL_VER.length; i = i + 2 ) {
 			// If the version was found, assign the found index to the select box.
 			if( SEL_VER[ i ] === "4.1.0" ) {
-				sel_ver.selectedIndex = i / 2;
+				selection_version.selectedIndex = i / 2;
 				break;
 			}
 		}
 	}
 
-	VERSION_SEL = sel_ver.value;
+	VERSION_SEL = selection_version.value;
 	return VERSION_SEL;
 }
 
 /*
  * Get values from the <select> element for OS (select box)
- * Depends on chosen OS
+ * @param:  None
+ * @return: PLATFORM_SEL - The platform as short code that was selected from the drop-down box
  */
-function getOSSel() {
+function getOSSelection() {
 	var os_value = document.download.os.options[document.download.os.selectedIndex].value;
 
 	// Search through the <select> element until the chosen OS is found.
@@ -395,15 +413,16 @@ function getOSSel() {
 
 /*
  * Get values from the <select> element for language (select box)
- * Depends on chosen language
+ * @param:  None
+ * @return: LANG_SEL - The language as ISO code that was selected from the drop-down box
  */
-function getLangSel() {
-	var lang_value = document.download.lang.options[document.download.lang.selectedIndex].value;
+function getLanguageSelection() {
+	var language_value = document.download.language.options[document.download.language.selectedIndex].value;
 
 	// Search through the <select> element until the chosen language is found.
 	for( var i = 0, j = SEL_LANG.length; i < j; i = i + 2 ) {
-		if( SEL_LANG[ i ] === lang_value ) {
-			LANG_SEL = lang_value;
+		if( SEL_LANG[ i ] === language_value ) {
+			LANG_SEL = language_value;
 			break;
 		}
 	}
@@ -414,15 +433,16 @@ function getLangSel() {
 
 /*
  * Get values from the <select> element for version (select box)
- * Depends on chosen version
+ * @param:  None
+ * @return: VERSION_SEL - The version that was selected from the drop-down box
  */
-function getVerSel() {
-	var ver_value = document.download.ver.options[document.download.ver.selectedIndex].value;
+function getVersionSelection() {
+	var version_value = document.download.version.options[document.download.version.selectedIndex].value;
 
 	// Search through the <select> element until the chosen version is found.
 	for( var i = 0, j = SEL_VER.length; i < j; i = i + 2 ) {
-		if( SEL_VER[ i ] === ver_value ) {
-			VERSION_SEL = ver_value;
+		if( SEL_VER[ i ] === version_value ) {
+			VERSION_SEL = version_value;
 			break;
 		}
 	}
@@ -431,13 +451,15 @@ function getVerSel() {
 }
 
 /*
- * Reset CSS style for all elements with ID to make them invisible
+ * Hide CSS style for all elements with ID to make them invisible
+ * @param:  None
+ * @return: None
  */
-function resetElements() {
+function hideElements() {
 	// Change CSS styles for all elements with ID in the green and sub-green colored boxes.
 	// Emtpy the values for all elements, make them invisible.
-	for( var i = 0, j = element_ids_sub_green.length; i < j; i++ ) {
-		document.getElementById( element_ids_sub_green[ i ] ).style.display = "none";
+	for( var i = 0, j = element_ids_sub_box.length; i < j; i++ ) {
+		document.getElementById( element_ids_sub_box[ i ] ).style.display = "none";
 	}
 
 	for( var i = 0, j = element_ids_links.length; i < j; i++ ) {
@@ -449,10 +471,13 @@ function resetElements() {
 
 /*
  * Show a popup window
- * Depends on received target link
+ * @param:  target_link - The URL that should be opened as popup window
+ * @return: None
  */
 function showWindow( target_link ) {
 	// Open a popup window with specific parameters to show the file from "target_link".
+	var window;
+
 	window = window.open( target_link, "_blank", "location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, titlebar=no, toolbar=no, left=100, top=250, width=800, height=550");
 	window.focus();
 
@@ -461,58 +486,58 @@ function showWindow( target_link ) {
 
 /*
  * Show error message
- * Depends on set text data
+ * @param:  error_text - The text should should be shown as error message
+ * @return: ERROR      - Set the general error flag to "true"
  */
 function showErrorMessage( error_text ) {
 	// The chosen items from select boxes lead to no download link, show an error message about reason and alternative.
 
-	// In general, reset the data for link, text and title of all elements.
-	resetElements();
+	// In general, hide the data for link, text and title of all elements.
+	hideElements();
 
 	// Now set again the values for all elements that should be shown with changed data.
-	document.getElementById( "dl_f_link"	 ).style.display	= "inline";
-	document.getElementById( "dl_f_link"	 ).style.cursor		= "not-allowed";
-	document.getElementById( "dl_f_link"	 ).href			= "javascript:void( 0 )";
-	document.getElementById( "dl_f_link"	 ).target		= "";
-	document.getElementById( "dl_f_link"	 ).innerHTML		= l10n_download_full_link_error_text;
-	document.getElementById( "dl_f_link"	 ).title		= l10n_download_full_link_error_title;
-	document.getElementById( "dl_lp_link"	 ).style.display	= "inline";
-	document.getElementById( "dl_lp_link"	 ).style.cursor		= "not-allowed";
-	document.getElementById( "dl_lp_link"	 ).href			= "javascript:void( 0 )";
-	document.getElementById( "dl_lp_link"	 ).target		= "";
-	document.getElementById( "dl_lp_link"	 ).innerHTML		= l10n_download_langpack_link_error_text;
-	document.getElementById( "dl_lp_link"	 ).title		= l10n_download_langpack_link_error_title;
-
-	document.getElementById( "dl_err_img"    ).src			= FILE_ERROR_IMG;
-	document.getElementById( "dl_err_img"    ).title		= l10n_download_error_problem_img_title;
-	document.getElementById( "dl_err_img"    ).alt			= l10n_download_error_problem_img_alt;
-	document.getElementById( "dl_err_img"	 ).style.display	= "inline-block";
-	document.getElementById( "dl_err"	 ).innerHTML		= "<br />" + error_text;
-	document.getElementById( "dl_err"	 ).style.fontSize	= "1.2em";
-	document.getElementById( "dl_err"	 ).style.cursor		= "default";
-	document.getElementById( "dl_err"	 ).style.display	= "inline-block";
+	document.getElementById( "dl_f_link"	).style.display	 = "inline";
+	document.getElementById( "dl_f_link"	).style.cursor	 = "not-allowed";
+	document.getElementById( "dl_f_link"	).href		 = "javascript:void( 0 )";
+	document.getElementById( "dl_f_link"	).innerHTML	 = l10n_download_full_link_error_text;
+	document.getElementById( "dl_f_link"	).title		 = l10n_download_full_link_error_title;
+	document.getElementById( "dl_lp_link"	).style.display	 = "inline";
+	document.getElementById( "dl_lp_link"	).style.cursor	 = "not-allowed";
+	document.getElementById( "dl_lp_link"	).href		 = "javascript:void( 0 )";
+	document.getElementById( "dl_lp_link"	).innerHTML	 = l10n_download_langpack_link_error_text;
+	document.getElementById( "dl_lp_link"	).title		 = l10n_download_langpack_link_error_title;
+
+	document.getElementById( "dl_err_img"   ).src		 = l10n_download_error_problem_img_src;
+	document.getElementById( "dl_err_img"   ).title		 = l10n_download_error_problem_img_title;
+	document.getElementById( "dl_err_img"   ).alt		 = l10n_download_error_problem_img_alt;
+	document.getElementById( "dl_err_img"	).style.display	 = "inline-block";
+	document.getElementById( "dl_err"	).innerHTML	 = "<br />" + error_text;
+	document.getElementById( "dl_err"	).style.fontSize = "1.2em";
+	document.getElementById( "dl_err"	).style.cursor	 = "default";
+	document.getElementById( "dl_err"	).style.display	 = "inline-block";
 
-	document.getElementById( "sub_green_box" ).className		= "sub-green-sel_error";
-	document.getElementById( "sub_green_box" ).style.display	= "block";
+	document.getElementById( "sub_box"	).className	 = "sub-green-sel_error";
+	document.getElementById( "sub_box"	).style.display	 = "block";
 
 	// Delete previously set string to get the possibility back to choose a different platform
 	// and then to assemble a new download link.
 	UI_PLATFORM_NO_SUP = "";
-	SUPPORTED	   = false;
+	SHOW_SUB_BOX	   = true;
 	ERROR		   = true;
 	return ERROR;
 }
 
 /*
  * Is flag set for chosen language (y/n)?
- * Depends on array-list of "languages.js"
- * Depends on language and array-list of "release_matrix.js"
+ * @param:  None
+ * @return: ERROR - Depending on if the language is supported set the general error flag to "true" or "false"
  */
-function isLangSupported() {
+function isLanguageSupported() {
 	// Check the flag in "release_matrix.js", 'y' -> provide download link, 'n' -> redirect to alternative webpage.
 
-	if( VERSION_SEL === undefined || VERSION_SEL === "" )
+	if( VERSION_SEL === undefined || VERSION_SEL === "" ) {
 		VERSION_SEL = VERSION;
+	}
 
 	switch( VERSION_SEL ) {
 		case "4.1.0":
@@ -539,35 +564,57 @@ function isLangSupported() {
 }
 
 /*
- * Check links that should be assembled in getLinkSel() for expections that do not lead to real download links
- * Depends on chosen OS, language and version
- */
-function checkLinkExceptions() {
-	// If recognized platform is not Windows, Linux or Mac, show the none-availability to the user.
+ * Check links that should be assembled in getLinkSelection() for expections that do not lead to real download links
+ * @param:  None
+ * @return: None
+ */
+function checkForLinkExceptions() {
+	// If recognized resp. selected platform, language or version does not lead to a normal download link,
+	// show the none-availability to the user.
 
-	var error_text = "";
+	SHOW_SUB_BOX   = true;
+	ERROR	       = false;
 
 	// If language is not supported, show the none-availability to the user.
-	if( ! isLangSupported() ) {
+	if( ! isLanguageSupported() ) {
 		// Show an error message that the chosen items do not lead to a download.
-		error_text = "<b>" + l10n_download_error_problem_text + "</b>" + l10n_download_error_aoo_text + VERSION_SEL
-			     + l10n_download_error_not_available_for_text + "<b>" + RELEASE_LANG[ 1 ] + " ("
-			     + RELEASE_LANG[ 2 ] + ") (" + LANG_SEL + ")</b>."
-			     + "<br /><b>" + l10n_download_error_solution_text + "</b>"
-			     + l10n_download_error_please_select_4_text;
+
+		// If a customized string is not available in the "msg_prop_l10n_XX.js" file.
+		if( l10n_download_error_custom_4_text === "" ) {
+			// Show the default error text.
+			var error_text = "<b>" + l10n_download_error_problem_text + "</b>"
+					+ l10n_download_error_aoo_text + VERSION_SEL
+					+ l10n_download_error_not_available_for_text
+					+ "<b>" + RELEASE_LANG[ 1 ] + " (" + RELEASE_LANG[ 2 ] + ") (" + LANG_SEL + ")</b>."
+					+ "<br />"
+					+ "<b>" + l10n_download_error_solution_text + "</b>"
+					+ l10n_download_error_please_select_4_text;
+		} else {
+			// Show the customized error text.
+			var error_text = l10n_download_error_custom_4_text;
+		}
 
 		showErrorMessage( error_text );
-	} else {
-		// If language is supported, assemble the filenames and text for download and checksums.
-		// Go on in "getLinkSel().
 	}
 
+	// If the browser-guessed platform is not supported, show the none-availability to the user.
 	if( UI_PLATFORM_NO_SUP !== "" ) {
 		// Show an error message that the chosen items do not lead to a download.
-		error_text = "<b>" + l10n_download_error_problem_text + "</b>" + l10n_download_error_aoo_text + VERSION_SEL
-			     + l10n_download_error_not_available_for_text + "<b>" + UI_PLATFORM_NO_SUP + "</b>."
-			     + "<br /><b>" + l10n_download_error_solution_text + "</b>"
-			     + l10n_download_error_please_select_3_text;
+
+		// If a customized string is not available in the "msg_prop_l10n_XX.js" file.
+		if( l10n_download_error_custom_3_text === "" ) {
+			// Show the default error text.
+			var error_text = "<b>" + l10n_download_error_problem_text + "</b>"
+					+ l10n_download_error_aoo_text + VERSION_SEL
+					+ l10n_download_error_not_available_for_text
+					+ "<b>" + UI_PLATFORM_NO_SUP + "</b>."
+					+ "<br />"
+					+ "<b>" + l10n_download_error_solution_text + "</b>"
+					+ l10n_download_error_please_select_3_text;
+		} else {
+			// Show the customized error text.
+			var error_text = l10n_download_error_custom_3_text;
+		}
 
 		showErrorMessage( error_text );
 	}
@@ -575,93 +622,123 @@ function checkLinkExceptions() {
 	// If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', show the none-availability to the user.
 	if( VERSION_SEL === "4.1.0" && PLATFORM === "mac32" ) {
 		// Show an error message that the chosen items do not lead to a download.
-		error_text = "<b>" + l10n_download_error_problem_text + "</b>" + l10n_download_error_aoo_text + VERSION_SEL
-			     + l10n_download_error_not_available_for_text + "<b>" + UI_PLATFORM + "</b>."
-			     + "<br /><b>" + l10n_download_error_solution_text + "</b>"
-			     + l10n_download_error_please_select_1_text;
+
+		// If a customized string is not available in the "msg_prop_l10n_XX.js" file.
+		if( l10n_download_error_custom_1_text === "" ) {
+			// Show the default error text.
+			var error_text = "<b>" + l10n_download_error_problem_text + "</b>"
+					+ l10n_download_error_aoo_text + VERSION_SEL
+					+ l10n_download_error_not_available_for_text
+					+ "<b>" + UI_PLATFORM + "</b>."
+					+ "<br />"
+					+ "<b>" + l10n_download_error_solution_text + "</b>"
+					+ l10n_download_error_please_select_1_text;
+		} else {
+			// Show the customized error text.
+			var error_text = l10n_download_error_custom_1_text;
+		}
 
 		showErrorMessage( error_text );
 	}
 
 	// If version is '4.0.1' (or older) and platform is 'Mac OS X >= 10.7', show the none-availability to the user.
 	if( ( VERSION_SEL === "4.0.1" || VERSION_SEL === "4.0.0" ) && PLATFORM === "mac64" ) {
-		// Set the values for all elements that should not be empty.
-		error_text = "<b>" + l10n_download_error_problem_text + "</b>" + l10n_download_error_aoo_text + VERSION_SEL
-			     + l10n_download_error_not_available_for_text + "<b>" + UI_PLATFORM + "</b>."
-			     + "<br /><b>" + l10n_download_error_solution_text + "</b>"
-			     + l10n_download_error_please_select_2_text;
+		// Show an error message that the chosen items do not lead to a download.
+
+		// If a customized string is not available in the "msg_prop_l10n_XX.js" file.
+		if( l10n_download_error_custom_2_text === "" ) {
+			// Show the default error text.
+			var error_text = "<b>" + l10n_download_error_problem_text + "</b>"
+					+ l10n_download_error_aoo_text + VERSION_SEL
+					+ l10n_download_error_not_available_for_text
+					+ "<b>" + UI_PLATFORM + "</b>."
+					+ "<br />"
+					+ "<b>" + l10n_download_error_solution_text + "</b>"
+					+ l10n_download_error_please_select_2_text;
+		} else {
+			// Show the customized error text.
+			var error_text = l10n_download_error_custom_2_text;
+		}
 
 		showErrorMessage( error_text );
 	}
 
+	// If version is '3.4.1', create a download link that leads to the "other-3.4.1.html" webpage.
+	if( VERSION_SEL === "3.4.1" ) {
+		// In general, hide the data for link, text and title of all elements.
+		hideElements();
+
+		// Set the values for the single download text button.
+		document.getElementById( "dl_f_link"	).href		= l10n_download_aoo341_link;
+		document.getElementById( "dl_f_link"	).innerHTML	= l10n_download_full_link_archive_text;
+		document.getElementById( "dl_f_link"	).title		= l10n_download_full_link_archive_title;
+		document.getElementById( "dl_f_link"	).style.cursor	= "pointer";
+		document.getElementById( "dl_f_link"	).style.display = "inline";
+		document.getElementById( "dl_lp_link"	).style.display = "none";
+		document.getElementById( "sub_box"	).style.display = "none";
+
+		SHOW_SUB_BOX = false;
+	}
+
 	// If platform is 'other', create a download link that leads to the Porting webpage.
 	if( PLATFORM_SEL === "other" ) {
-		// In general, reset the data for link, text and title of all elements.
-		resetElements();
+		// In general, hide the data for link, text and title of all elements.
+		hideElements();
 
 		// Set the values for the single download text button.
-		document.getElementById( "dl_f_link"	 ).href		 = l10n_download_porting_link;
-		document.getElementById( "dl_f_link"	 ).target	 = "_blank";
-		document.getElementById( "dl_f_link"	 ).innerHTML	 = l10n_download_full_link_porting_text;
-		document.getElementById( "dl_f_link"	 ).title	 = l10n_download_full_link_porting_title;
-		document.getElementById( "dl_f_link"	 ).style.cursor	 = "pointer";
-		document.getElementById( "dl_f_link"	 ).style.display = "inline";
-		document.getElementById( "dl_lp_link"	 ).style.display = "none";
-		document.getElementById( "sub_green_box" ).style.display = "none";
+		document.getElementById( "dl_f_link"	).href		= l10n_download_porting_link;
+		document.getElementById( "dl_f_link"	).innerHTML	= l10n_download_full_link_porting_text;
+		document.getElementById( "dl_f_link"	).title		= l10n_download_full_link_porting_title;
+		document.getElementById( "dl_f_link"	).style.cursor	= "pointer";
+		document.getElementById( "dl_f_link"	).style.display = "inline";
+		document.getElementById( "dl_lp_link"	).style.display = "none";
+		document.getElementById( "sub_box"	).style.display = "none";
 
-		SUPPORTED = true;
-		ERROR	  = false;
+		SHOW_SUB_BOX = false;
 	}
 
 	// If version is 'older', create a download link that leads to the archive webpage.
 	if( VERSION_SEL === "older" ) {
-		// In general, reset the data for link, text and title of all elements.
-		resetElements();
+		// In general, hide the data for link, text and title of all elements.
+		hideElements();
 
 		// Set the values for the single download text button.
-		document.getElementById( "dl_f_link"	 ).href		 = l10n_download_archive_link;
-		document.getElementById( "dl_f_link"	 ).target	 = "_blank";
-		document.getElementById( "dl_f_link"	 ).innerHTML	 = l10n_download_full_link_archive_text;
-		document.getElementById( "dl_f_link"	 ).title	 = l10n_download_full_link_archive_title;
-		document.getElementById( "dl_f_link"	 ).style.cursor	 = "pointer";
-		document.getElementById( "dl_f_link"	 ).style.display = "inline";
-		document.getElementById( "dl_lp_link"	 ).style.display = "none";
-		document.getElementById( "sub_green_box" ).style.display = "none";
-
-		SUPPORTED = true;
-		ERROR	  = false;
-	}
-
-	// If until now an error occurred then assume that the selected options are not supported.
-	if( ERROR )
-		SUPPORTED = false;
-	else
-		SUPPORTED = true;
+		document.getElementById( "dl_f_link"	).href		= l10n_download_archive_link;
+		document.getElementById( "dl_f_link"	).innerHTML	= l10n_download_full_link_archive_text;
+		document.getElementById( "dl_f_link"	).title		= l10n_download_full_link_archive_title;
+		document.getElementById( "dl_f_link"	).style.cursor	= "pointer";
+		document.getElementById( "dl_f_link"	).style.display = "inline";
+		document.getElementById( "dl_lp_link"	).style.display = "none";
+		document.getElementById( "sub_box"	).style.display = "none";
 
-	return ERROR;
+		SHOW_SUB_BOX = false;
+	}
+
+	return;
 }
 
 /*
  * Get link to mirror system for download file and checksum file
- * Depends on chosen OS, language and version
+ * @param:  None
+ * @return: None
  */
-function getLinkSel() {
+function getLinkSelection() {
 	// Reset all variables that could have been set until now.
-	initVars( 0 );
+	initVariables( 0 );
 
 	// Get the selected data from the select boxes.
-	getOSSel();
-	getLangSel();
-	getVerSel();
+	getOSSelection();
+	getLanguageSelection();
+	getVersionSelection();
 
 	// First check for expections that do not lead to real download links.
-	checkLinkExceptions();
+	checkForLinkExceptions();
 
-	// If selected options lead to an exception (VERSION_SEL = "older" OR SUPPORTED = FALSE)
-	// then do not overwrite current download links.
-	if( VERSION_SEL !== "older" && SUPPORTED && ! ERROR ) {
+	// If the selected options lead to no download URL, should the sub-box shown anyway?
+	// Yes when SHOW_SUB_BOX = "true" and ERROR = "false".
+	if( SHOW_SUB_BOX && ! ERROR ) {
 		// Assemble the filenames and text for download and checksums.
-		getReleaseMatrixPos();
+		getReleaseMatrixPosition();
 		getFileData( VERSION_SEL );
 
 		SOURCEFORGE_BASE_URL = SOURCEFORGE + VERSION_SEL + "/binaries/";
@@ -680,7 +757,7 @@ function getLinkSel() {
 		LINK_CHK_MD5_LP	     = ASF_ARC_BASE_URL  + "/binaries/"   + LANG_SEL + "/" + FILENAME_LP   + ".md5";
 		LINK_CHK_SHA256_LP   = ASF_ARC_BASE_URL  + "/binaries/"   + LANG_SEL + "/" + FILENAME_LP   + ".sha256";
 
-		SUPPORTED	     = true;
+		SHOW_SUB_BOX	     = true;
 		ERROR		     = false;
 
 		// Set the values for both download text buttons and set the focus to the "full install".
@@ -692,12 +769,16 @@ function getLinkSel() {
 		document.getElementById( "dl_lp_link"	    ).innerHTML	= l10n_download_langpack_link_text;
 		document.getElementById( "dl_lp_link"	    ).title	= l10n_download_langpack_link_title + FILENAME_LP;
 
-		// Set the values in the sub-green box for the 3 text lines.
-		document.getElementById( "dl_rel_info"      ).innerHTML	= "<b>" + l10n_download_rel_info_headline_text + "</b> " + REL_TEXT + " | ";
+		// Set the values in the sub-box for the 3 text lines.
+		document.getElementById( "dl_rel_info"      ).innerHTML	= "<b>" + l10n_download_rel_info_headline_text
+									+ "</b> " + REL_TEXT + " | ";
 		document.getElementById( "dl_rel_notes"	    ).href	= REL_NOTES;
 		document.getElementById( "dl_rel_notes"	    ).innerHTML	= l10n_download_rel_notes_text;
 		document.getElementById( "dl_rel_notes"	    ).title	= l10n_download_rel_notes_title + VERSION_SEL;
-		document.getElementById( "dl_f_info"	    ).innerHTML = "<b>" + l10n_download_headline_full_text + "</b>" + l10n_download_filesize_text + FILESIZE_FULL + l10n_download_megabyte_text + " | " + l10n_download_checksum_headline_text;
+		document.getElementById( "dl_f_info"	    ).innerHTML = "<b>" + l10n_download_headline_full_text + "</b>"
+									+ l10n_download_filesize_text + FILESIZE_FULL
+									+ l10n_download_megabyte_text + " | "
+									+ l10n_download_checksum_headline_text;
 		document.getElementById( "dl_f_chk_keys"    ).href	= LINK_CHK_KEYS;
 		document.getElementById( "dl_f_chk_keys"    ).innerHTML	= l10n_download_checksum_keys_text;
 		document.getElementById( "dl_f_chk_keys"    ).title	= l10n_download_checksum_keys_title;
@@ -713,7 +794,10 @@ function getLinkSel() {
 		document.getElementById( "dl_f_chk_sha256"  ).href	= LINK_CHK_SHA256_FULL;
 		document.getElementById( "dl_f_chk_sha256"  ).innerHTML	= l10n_download_checksum_sha256_text;
 		document.getElementById( "dl_f_chk_sha256"  ).title	= l10n_download_checksum_sha256_title + FILENAME_FULL;
-		document.getElementById( "dl_lp_info"	    ).innerHTML	= "<b>" + l10n_download_headline_langpack_text + "</b>" + l10n_download_filesize_text + FILESIZE_LP + l10n_download_megabyte_text + " | " + l10n_download_checksum_headline_text;
+		document.getElementById( "dl_lp_info"	    ).innerHTML	= "<b>" + l10n_download_headline_langpack_text
+									+ "</b>" + l10n_download_filesize_text
+									+ FILESIZE_LP + l10n_download_megabyte_text
+									+ " | " + l10n_download_checksum_headline_text;
 		document.getElementById( "dl_lp_chk_keys"   ).href	= LINK_CHK_KEYS;
 		document.getElementById( "dl_lp_chk_keys"   ).innerHTML	= l10n_download_checksum_keys_text;
 		document.getElementById( "dl_lp_chk_keys"   ).title	= l10n_download_checksum_keys_title;
@@ -730,42 +814,42 @@ function getLinkSel() {
 		document.getElementById( "dl_lp_chk_sha256" ).innerHTML	= l10n_download_checksum_sha256_text;
 		document.getElementById( "dl_lp_chk_sha256" ).title	= l10n_download_checksum_sha256_title + FILENAME_LP;
 
-		// Set the values in the sub-green box below the 3 text lines.
-		document.getElementById( "dl_hlp_img"	    ).src	= FILE_FULL_LP_IMG;
+		// Set the values in the sub-box below the 3 text lines.
+		document.getElementById( "dl_hlp_img"	    ).src	= l10n_download_help_img_src;
 		document.getElementById( "dl_hlp_img"	    ).title	= l10n_download_help_img_title;
 		document.getElementById( "dl_hlp_img"	    ).alt	= l10n_download_help_img_alt;
 		document.getElementById( "dl_hlp"	    ).href	= l10n_download_help_link;
 		document.getElementById( "dl_hlp"	    ).innerHTML	= l10n_download_help_text;
 		document.getElementById( "dl_hlp"	    ).title	= l10n_download_help_title;
-		document.getElementById( "dl_chk_img"	    ).src	= FILE_CHECKSUMS_IMG;
+		document.getElementById( "dl_chk_img"	    ).src	= l10n_download_checksum_img_src;
 		document.getElementById( "dl_chk_img"	    ).title	= l10n_download_checksum_img_title;
 		document.getElementById( "dl_chk_img"	    ).alt	= l10n_download_checksum_img_alt;
 		document.getElementById( "dl_chk"	    ).href	= l10n_download_checksum_link;
 		document.getElementById( "dl_chk"	    ).innerHTML	= l10n_download_checksum_text;
 		document.getElementById( "dl_chk"	    ).title	= l10n_download_checksum_title;
-		document.getElementById( "dl_rpt_img"	    ).src	= FILE_ANALYZE_IMG;
+		document.getElementById( "dl_rpt_img"	    ).src	= l10n_download_report_img_src;
 		document.getElementById( "dl_rpt_img"	    ).title	= l10n_download_report_img_title;
 		document.getElementById( "dl_rpt_img"	    ).alt	= l10n_download_report_img_alt;
 		document.getElementById( "dl_rpt"	    ).href	= l10n_download_report_link;
 		document.getElementById( "dl_rpt"	    ).innerHTML	= l10n_download_report_text;
 		document.getElementById( "dl_rpt"	    ).title	= l10n_download_report_title;
 
-		// Reset the CSS styles for the elements in the sub-green colored boxes.
-		document.getElementById( "sub_green_box"    ).className	       = "sub-green-sel";
+		// Hide the CSS styles for the elements in the sub-green colored boxes.
+		document.getElementById( "sub_box"	    ).className	       = "sub-green-sel";
 		document.getElementById( "dl_err_img"	    ).style.display    = "none";
 		document.getElementById( "dl_err"	    ).style.display    = "none";
 
 		// Change CSS styles for all elements with ID in the green and sub-green colored boxes.
 		// Set the cursor style for elements to default and make the elements visible.
-		for( var i = 0, j = element_ids_sub_green.length; i < j; i++ ) {
-			document.getElementById( element_ids_sub_green[ i ] ).style.display = "inline";
-			document.getElementById( element_ids_sub_green[ i ] ).style.cursor  = "default";
+		for( var i = 0, j = element_ids_sub_box.length; i < j; i++ ) {
+			document.getElementById( element_ids_sub_box[ i ] ).style.display = "inline";
+			document.getElementById( element_ids_sub_box[ i ] ).style.cursor  = "default";
 		}
 
 		// Set the cursor style for elements with links to pointer and make the elements visible.
 		for( var i = 0, j = element_ids_links.length; i < j; i++ ) {
-			document.getElementById( element_ids_links[ i ] ).style.display	    = "inline";
-			document.getElementById( element_ids_links[ i ] ).style.cursor	    = "pointer";
+			document.getElementById( element_ids_links[ i ] ).style.display	  = "inline";
+			document.getElementById( element_ids_links[ i ] ).style.cursor	  = "pointer";
 		}
 
 		// Set the cursor style for the 3 links with icon to a help sign.
@@ -776,28 +860,33 @@ function getLinkSel() {
 		document.getElementById( "dl_rpt_img"	    ).style.cursor     = "help";
 		document.getElementById( "dl_rpt"	    ).style.cursor     = "help";
 
-		// Make the sub-green box and therefore all elements visible.
-		document.getElementById( "sub_green_box"    ).style.display    = "block";
+		// Make the sub-box and therefore all elements visible.
+		document.getElementById( "sub_box"	    ).style.display    = "block";
 	}
 
-	return LINK_FULL;
+	return;
 }
 
 /*
  * Get platform of browser
- * Depends on internal browser data
+ * @param:  None
+ * @return: None
  */
 function getPlatform() {
 	// For more help or data see: "http://www.useragentstring.com".
 
-	if( navigator.appVersion )
+	if( navigator.appVersion ) {
 		var av	   = navigator.appVersion.toLowerCase();	// Get the application version in lower case.
-	if( navigator.platform )
+	}
+	if( navigator.platform ) {
 		var os	   = navigator.platform.toLowerCase();		// Get the platform string in lower case.
-	if( navigator.userAgent )
+	}
+	if( navigator.userAgent ) {
 		var ua	   = navigator.userAgent.toLowerCase();		// Get the user agent string in lower case.
-	if( navigator.vendor )
+	}
+	if( navigator.vendor ) {
 		var ve	   = navigator.vendor.toLowerCase();		// Get the vendor string in lower case.
+	}
 
 	UI_PLATFORM	   = "";					// Delete previously set string.
 	UI_PLATFORM_NO_SUP = "";					// Delete previously set string.
@@ -808,15 +897,19 @@ function getPlatform() {
 	// To workaround that MSIE 8 and older do not support this function.
 	if( !( 'indexOf' in Array.prototype ) ) {
 		Array.prototype.indexOf= function( find, i ) {		// 'i' is an optional parameter.
-			if( i === undefined )
+			if( i === undefined ) {
 				i = 0;
-			if( i < 0 )
+			}
+			if( i < 0 ) {
 				i+= this.length;
-			if( i < 0 )
+			}
+			if( i < 0 ) {
 				i = 0;
+			}
 			for( var n = this.length; i < n; i++ ) {
-				if( i in this && this[ i ] === find )
+				if( i in this && this[ i ] === find ) {
 					return i;
+				}
 			}
 			return -1;
 		};
@@ -827,13 +920,15 @@ function getPlatform() {
 		// Recognized but *not supported* platforms/OS, set $UI_PLATFORM_NO_SUP to show it to the user.
 
 		// Mobile devices.
-		if( ve )
+		if( ve ) {
 		    if( ua.indexOf( "android"		) !== -1 )
 			if( ua.indexOf( "nexus"		) !== -1 &&
 			    ve.indexOf( "google"	) !== -1 )	UI_PLATFORM_NO_SUP	= "Google Nexus";
+		}
 
-		if( ua.indexOf( "android"		) !== -1 )
+		if( ua.indexOf( "android"		) !== -1 ) {
 		    if( ua.indexOf( "mobile"		) !== -1 )	UI_PLATFORM_NO_SUP	= "Mobile Devices (Android)";
+		}
 
 		if( os.indexOf( "arm"			) !== -1 )	UI_PLATFORM_NO_SUP	= "Mobile Devices (ARM processor)";
 		if( ua.indexOf( "blackberry"		) !== -1 )	UI_PLATFORM_NO_SUP	= "Blackberry Smartphones";
@@ -857,9 +952,10 @@ function getPlatform() {
 		if( ua.indexOf( "webos"			) !== -1 )	UI_PLATFORM_NO_SUP	= "Mobile Phones (Palm webOS)";
 		if( ua.indexOf( "widerweb"		) !== -1 )	UI_PLATFORM_NO_SUP	= "Mobile Phones (WiderWeb)";
 		if( os.indexOf( "win"			) !== -1 ||
-		    os.indexOf( "windows"		) !== -1 )
+		    os.indexOf( "windows"		) !== -1 ) {
 			if( ua.indexOf( "mobile"	) !== -1 ||
 			    ua.indexOf( "phone"		) !== -1 )	UI_PLATFORM_NO_SUP	= "Smartphones (Windows Phone)";
+		}
 
 		// Other platforms.
 		if( os.indexOf( "aix"			) !== -1 )	UI_PLATFORM_NO_SUP	= "IBM AIX";
@@ -957,7 +1053,7 @@ function getPlatform() {
 			    ua.indexOf( "10.4"		) !== -1 ||
 			    ua.indexOf( "10_4"		) !== -1 ||
 			    ua.indexOf( "10.3"		) !== -1 ||
-			    ua.indexOf( "10_3"		) !== -1 ) {	UI_PLATFORM	= "Mac OS X (<= 10.6)";
+			    ua.indexOf( "10_3"		) !== -1 ) {	UI_PLATFORM	= "Mac OS X (Version <= 10.6)";
 									PLATFORM	= "mac32";
 			}
 		} 
@@ -969,14 +1065,15 @@ function getPlatform() {
 		ERROR		   = true;
 	}
 
-	return PLATFORM;
+	return;
 }
 
 /*
  * Get positions of platform in release matrix
- * Depends on platform and array-list of "release_matrix.js"
+ * @param:  None
+ * @return: None
  */
-function getReleaseMatrixPos() {
+function getReleaseMatrixPosition() {
 	// Depending on $PLATFORM, assign the platform position from the release matrix.
 	switch( PLATFORM ) {
 		case "lnx64d":
@@ -1027,23 +1124,24 @@ function getReleaseMatrixPos() {
 			ERROR			  = true;
 	}
 
-	return RELEASE_PLATFORM_POS_FULL;
+	return;
 }
 
 /*
  * Get file name for download file
- * Depends on version and array-list of "release_matrix.js"
+ * @param:  version - The version to use to get the file data
+ * @return: None
  */
-function getFileData( ver ) {
+function getFileData( version ) {
 	// Depending on $ver, a different release matrix has to be used to assemble the download filenames.
-	switch( ver ) {
+	switch( version ) {
 		case "4.1.0":
 			// Assign all values from the release matrix of language and platform.
 			RELEASE_PLATFORM = release_410[ LANG_ISO ][ RELEASE_PLATFORM_POS_FULL ];
 
 			// Assemble filename: Product name + version + platform as URL part + language ISO + file extension.
-			FILENAME_FULL	 = "Apache_OpenOffice_" + ver + "_" + PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
-			FILENAME_LP	 = "Apache_OpenOffice_" + ver + "_" + PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
+			FILENAME_FULL	 = "Apache_OpenOffice_" + version + "_" + PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+			FILENAME_LP	 = "Apache_OpenOffice_" + version + "_" + PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
 
 			// Assign the file size (column 2) from the release matrix of language and platform.
 			FILESIZE_FULL	 = release_410[ LANG_ISO ][ RELEASE_PLATFORM_POS_FULL ][ 1 ];
@@ -1063,8 +1161,8 @@ function getFileData( ver ) {
 			RELEASE_PLATFORM = release_401[ LANG_ISO ][ RELEASE_PLATFORM_POS_FULL ];
 
 			// Assemble filename: Product name + version + platform as URL part + language ISO + file extension.
-			FILENAME_FULL	 = "Apache_OpenOffice_" + ver + "_" + PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
-			FILENAME_LP	 = "Apache_OpenOffice_" + ver + "_" + PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
+			FILENAME_FULL	 = "Apache_OpenOffice_" + version + "_" + PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+			FILENAME_LP	 = "Apache_OpenOffice_" + version + "_" + PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
 
 			// Assign the file size (column 2) from the release matrix of language and platform.
 			FILESIZE_FULL	 = release_401[ LANG_ISO ][ RELEASE_PLATFORM_POS_FULL ][ 1 ];
@@ -1084,8 +1182,8 @@ function getFileData( ver ) {
 			RELEASE_PLATFORM = release_400[ LANG_ISO ][ RELEASE_PLATFORM_POS_FULL ];
 
 			// Assemble filename: Product name + version + platform as URL part + language ISO + file extension.
-			FILENAME_FULL	 = "Apache_OpenOffice_" + ver + "_" + PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
-			FILENAME_LP	 = "Apache_OpenOffice_" + ver + "_" + PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
+			FILENAME_FULL	 = "Apache_OpenOffice_" + version + "_" + PLATFORM_FULL + "_" + LANG_ISO + EXTENSION;
+			FILENAME_LP	 = "Apache_OpenOffice_" + version + "_" + PLATFORM_LP   + "_" + LANG_ISO + EXTENSION;
 
 			// Assign the file size (column 2) from the release matrix of language and platform.
 			FILESIZE_FULL	 = release_400[ LANG_ISO ][ RELEASE_PLATFORM_POS_FULL ][ 1 ];
@@ -1103,8 +1201,8 @@ function getFileData( ver ) {
 		default:
 			FILENAME_FULL	 = "";
 			FILENAME_LP	 = "";
-			FILESIZE_FULL	 = 0;
-			FILESIZE_LP	 = 0;
+			FILESIZE_FULL	 = -1;
+			FILESIZE_LP	 = -1;
 			REL_TEXT	 = l10n_download_rel_info_milestone_text + "? | "
 					 + l10n_download_rel_info_buildid_text   + "? | "
 					 + l10n_download_rel_info_svn_text       + "? | "
@@ -1113,27 +1211,31 @@ function getFileData( ver ) {
 			ERROR		 = true;
 	}
 
-	return FILENAME_FULL;
+	return;
 }
 
 /*
  * Set document.location to start the download
+ * @param:  itemid, uri - The ID of the colored box and the URI that should be opened
+ * @return: None
  */
 function openItem( itemid, uri ) {
-	var thisDocument  = document.getElementById( "downloadextendedtext" );
-	var thisDocument  = document.getElementById( itemid );
+//	var thisDocument  = document.getElementById( "downloadextendedtext" );
+//	var thisDocument  = document.getElementById( itemid );
 	document.location = uri;
 }
 
 /*
  * Output values of variables for debugging
+ * @param:  location - The location where the debug utput should take place
+ * @return: None
  */
-function alertDbg( location ) {
-	if( location === "" )
+function debug( location ) {
+	if( location === "" ) {
 		location = "No location named!";
+	}
 
-	alert( ""
-	+ location												+ "\n"
+	alert( location												+ "\n"
 	+ "NL_LANG: "				+ "\t\t\t\t\t\t\t"	+ NL_LANG				+ "\n"
 	+ "LANG_ISO: "				+ "\t\t\t\t\t\t"	+ LANG_ISO				+ "\n"
 	+ "LANG_SEL: "				+ "\t\t\t\t\t\t"	+ LANG_SEL				+ "\n"
@@ -1163,9 +1265,8 @@ function alertDbg( location ) {
 	+ "LINK_CHK_ASC_LP: "			+ "\t\t\t\t\t"		+ LINK_CHK_ASC_LP			+ "\n"
 	+ "LINK_CHK_MD5_LP: "			+ "\t\t\t\t\t"		+ LINK_CHK_MD5_LP			+ "\n"
 	+ "LINK_CHK_SHA256_LP: "		+ "\t\t\t\t"		+ LINK_CHK_SHA256_LP			+ "\n"
-	+ "SUPPORTED: "				+ "\t\t\t\t\t\t"	+ SUPPORTED				+ "\n"
-	+ "ERROR: "				+ "\t\t\t\t\t\t\t"	+ ERROR					+ "\n"
-	+ "" );
+	+ "SHOW_SUB_BOX: "			+ "\t\t\t\t\t"		+ SHOW_SUB_BOX				+ "\n"
+	+ "ERROR: "				+ "\t\t\t\t\t\t\t"	+ ERROR					+ "\n" );
 
 	return;
 }