DL.checkForLinkExceptions = function()

in assets/download/download.js [663:817]


DL.checkForLinkExceptions = function() {
	// If recognized resp. selected platform, language or version does not lead to a normal download link,
	// show the none-availability to the user.

	DL.SHOW_SUB_BOX	= true;
	DL.ERROR	= false;

	// If language is not supported, show the none-availability to the user.
	if( ! DL.isLanguageSupported() ) {
		// 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.dl_error_custom_4_text === "" ) {
			// Show the default error text.
			var error_text = "<b>" + l10n.dl_error_problem_text + "</b>"
					+ l10n.dl_error_aoo_text + DL.VERSION_SEL
					+ l10n.dl_error_not_available_for_text
					+ "<b>" + DL.RELEASE_LANG[ 1 ]
					+ " (" + DL.RELEASE_LANG[ 2 ] + ") (" + DL.LANG_SEL + ")</b>."
					+ "<br />"
					+ "<b>" + l10n.dl_error_solution_text + "</b>"
					+ l10n.dl_error_please_select_4_text;
		} else {
			// Show the customized error text.
			var error_text = l10n.dl_error_custom_4_text;
		}

		DL.showErrorMessage( error_text );
	}

	// If the browser-guessed platform is not supported, show the none-availability to the user.
	if( DL.UI_PLATFORM_NO_SUP !== "" ) {
		// 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.dl_error_custom_3_text === "" ) {
			// Show the default error text.
			var error_text = "<b>" + l10n.dl_error_problem_text + "</b>"
					+ l10n.dl_error_aoo_text + DL.VERSION_SEL
					+ l10n.dl_error_not_available_for_text
					+ "<b>" + DL.UI_PLATFORM_NO_SUP + "</b>."
					+ "<br />"
					+ "<b>" + l10n.dl_error_solution_text + "</b>"
					+ l10n.dl_error_please_select_3_text;
		} else {
			// Show the customized error text.
			var error_text = l10n.dl_error_custom_3_text;
		}

		DL.showErrorMessage( error_text );
	}

	// If version is '4.1.0' (or newer) and platform is 'Mac OS X <= 10.6', show the none-availability to the user.
	if( ( DL.VERSION_SEL === "4.1.14" || DL.VERSION_SEL === "4.1.13" || DL.VERSION_SEL === "4.1.12" || DL.VERSION_SEL === "4.1.11" || DL.VERSION_SEL === "4.1.10" || DL.VERSION_SEL === "4.1.9" || DL.VERSION_SEL === "4.1.8" || DL.VERSION_SEL === "4.1.7" || DL.VERSION_SEL === "4.1.6" || DL.VERSION_SEL === "4.1.5" || DL.VERSION_SEL === "4.1.4" || DL.VERSION_SEL === "4.1.3" || DL.VERSION_SEL === "4.1.2" || DL.VERSION_SEL === "4.1.1" || DL.VERSION_SEL === "4.1.0" ) && DL.PLATFORM === "mac32" ) {
		// 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.dl_error_custom_1_text === "" ) {
			// Show the default error text.
			var error_text = "<b>" + l10n.dl_error_problem_text + "</b>"
					+ l10n.dl_error_aoo_text + DL.VERSION_SEL
					+ l10n.dl_error_not_available_for_text
					+ "<b>" + DL.UI_PLATFORM + "</b>."
					+ "<br />"
					+ "<b>" + l10n.dl_error_solution_text + "</b>"
					+ l10n.dl_error_please_select_1_text;
		} else {
			// Show the customized error text.
			var error_text = l10n.dl_error_custom_1_text;
		}

		DL.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( ( DL.VERSION_SEL === "4.0.1" || DL.VERSION_SEL === "4.0.0" ) && DL.PLATFORM === "mac64" ) {
		// 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.dl_error_custom_2_text === "" ) {
			// Show the default error text.
			var error_text = "<b>" + l10n.dl_error_problem_text + "</b>"
					+ l10n.dl_error_aoo_text + DL.VERSION_SEL
					+ l10n.dl_error_not_available_for_text
					+ "<b>" + DL.UI_PLATFORM + "</b>."
					+ "<br />"
					+ "<b>" + l10n.dl_error_solution_text + "</b>"
					+ l10n.dl_error_please_select_2_text;
		} else {
			// Show the customized error text.
			var error_text = l10n.dl_error_custom_2_text;
		}

		DL.showErrorMessage( error_text );
	}

	// If version is '3.4.1', create a download link that leads to the "other-3.4.1.html" webpage.
	if( DL.VERSION_SEL === "3.4.1" ) {
		// In general, hide the data for link, text and title of all elements.
		DL.hideElements();

		// Set the values for the single download text button.
		document.getElementById( "dl_f_link"	).href		= l10n.dl_aoo341_link;
		document.getElementById( "dl_f_link"	).innerHTML	= l10n.dl_full_link_archive_text;
		document.getElementById( "dl_f_link"	).title		= l10n.dl_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";

		DL.SHOW_SUB_BOX = false;
	}

	// If platform is 'other', create a download link that leads to the Porting webpage.
	if( DL.PLATFORM_SEL === "other" ) {
		// In general, hide the data for link, text and title of all elements.
		DL.hideElements();

		// Set the values for the single download text button.
		document.getElementById( "dl_f_link"	).href		= l10n.dl_porting_link;
		document.getElementById( "dl_f_link"	).innerHTML	= l10n.dl_full_link_porting_text;
		document.getElementById( "dl_f_link"	).title		= l10n.dl_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";

		DL.SHOW_SUB_BOX = false;
	}

	// If version is 'older', create a download link that leads to the archive webpage.
	if( DL.VERSION_SEL === "older" ) {
		// In general, hide the data for link, text and title of all elements.
		DL.hideElements();

		// Set the values for the single download text button.
		document.getElementById( "dl_f_link"	).href		= l10n.dl_archive_link;
		document.getElementById( "dl_f_link"	).innerHTML	= l10n.dl_full_link_archive_text;
		document.getElementById( "dl_f_link"	).title		= l10n.dl_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";

		DL.SHOW_SUB_BOX = false;
	}

	// Show no platform info text.
	document.getElementById( "platform_info" ).style.cursor		= "default";
	document.getElementById( "platform_info" ).title		= "";
	document.getElementById( "platform_info" ).text			= "";
	document.getElementById( "platform_info" ).style.display	= "none";

	return;
}