printCommonStyle ("/common/style/");
addPreloadImage (
	"/common/image/header/language_selector/text_01_over.gif",
	"/common/image/header/language_selector/text_02_over.gif",
	"/common/image/header/language_selector/text_03_over.gif",
	"/common/image/header/language_selector/background_01_over.gif",
	"/common/image/header/language_selector/background_02_over.gif",
	"/common/image/header/language_selector/background_03_over.gif",
	"/common/image/header/language_selector/background_04_over.gif",
	"/common/image/header/text_01_over.gif"
);

//

function changeNavigation (name) {
	if (name.startsWith ("LanguageSelector")) {
		if (document.getElementById) {
			var image = document.images ["LanguageSelectorText" + name.substring (16)];
			changeImage (image.previousSibling, image.previousSibling.src.replace ("_over.gif", ".gif").replace (".gif", "_over.gif"));
			changeImage (image, image.src.replace ("_over.gif", ".gif").replace (".gif", "_over.gif"));
			changeImage (image.nextSibling, image.nextSibling.src.replace ("_over.gif", ".gif").replace (".gif", "_over.gif"));
		}
	} else if (name.startsWith ("GlobalNavigation")) {
		var image = document.images ["GlobalNavigationText" + name.substring (16)];
		changeImage (image, image.src.replace ("_over.gif", ".gif").replace (".gif", "_over.gif"));
	} else if (name.startsWith ("SubNavigation")) {
		var image = document.images ["SubNavigationText" + name.substring (13)];
		changeImage (image, image.src.replace ("_over.gif", ".gif").replace (".gif", "_over.gif"));
	} else if (name.startsWith ("SubSubNavigation")) {
		if (document.getElementById) {
			changeClassName (document.getElementById ("SubSubNavigationCell" + name.substring (16)), ["SubSubNavigationCellHover"]);
		}
	}
}
function restoreNavigation (name) {
	if (name.startsWith ("LanguageSelector")) {
		if (document.getElementById) {
			var image = document.images ["LanguageSelectorText" + name.substring (16)];
			restoreImage (image.previousSibling);
			restoreImage (image);
			restoreImage (image.nextSibling);
		}
	} else if (name.startsWith ("GlobalNavigation")) {
		restoreImage (document.images ["GlobalNavigationText" + name.substring (16)]);
	} else if (name.startsWith ("SubNavigation")) {
		restoreImage (document.images ["SubNavigationText" + name.substring (13)]);
	} else if (name.startsWith ("SubSubNavigation")) {
		if (document.getElementById) {
			restoreClassName (document.getElementById ("SubSubNavigationCell" + name.substring (16)));
		}
	}
}
function synchronizeNavigation () {
	for (var i = 0; i < arguments.length; i++) {
		addWindowListener ("load", "synchronizeNavigationExecute ('" + arguments [i] + "')");
	}
}
function synchronizeNavigationExecute (name) {
	if (name.startsWith ("Utility")) {
		if (document.getElementById) {
			changeClassName (document.getElementById ("UtilityText" + name.substring (7)), ["UtilityText", "Selected"]);
		}
	} else if (name.startsWith ("GlobalNavigation")) {
		var image = document.images ["GlobalNavigationText" + name.substring (16)];
		changeImage (image, image.src.replace ("_over.gif", ".gif").replace (".gif", "_over.gif"));
		deleteRestoreImage (image);
	} else if (name.startsWith ("SubNavigation")) {
		var image = document.images ["SubNavigationText" + name.substring (13)];
		changeImage (image, image.src.replace ("_over.gif", ".gif").replace (".gif", "_over.gif"));
		deleteRestoreImage (image);
	} else if (name.startsWith ("SubSubNavigation")) {
		if (document.getElementById) {
			var cell = document.getElementById ("SubSubNavigationCell" + name.substring (16));
			changeClassName (cell, ["SubSubNavigationCellHover"]);
			deleteRestoreClassName (cell);
		}
	}
}
function printFeature (index) {
	var directoryName = /([^\/]+)\.html/.test (location.pathname) ? RegExp.$1 : "index";
	var feature = Features [index - 1];
	document.write (
		'<a onmouseover="changeImage (\'FeatureHeadingImage' + index + '\', \'image/' + directoryName + '/feature/heading_0' + index + '_over.gif\');" onmouseout="restoreImage ();" href="' + feature.url + '"><img src="image/' + directoryName + '/feature/image_0' + index + '.jpg" width="160" height="34" border="0" alt="" /><br />' +
		'<img src="/common/image/_.gif" width="1" height="5" border="0" alt="" /><br />' +
		'<img name="FeatureHeadingImage' + index + '" src="image/' + directoryName + '/feature/heading_0' + index + '.gif" width="160" height="16" border="0" alt="' + feature.title + '" /><\/a><br />' +
		'<div class="SmallText2">' + feature.description + '<\/div>'
	);
}
function createPreloadedImageList () {
	var s = "";
	for (var i = 0; i < PreloadImages.length; i++) {
		s += '<img src="' + PreloadImages [i] + '"><br>';
	}
	var o = window.open ("", "PreloadImageListWindow");
	o.document.open ();
	o.document.write ("<html><head><title>Preloaded Images<\/title><\/head><body>" + s + "<\/body><\/html>");
	o.document.close ();
}
// addWindowListener ("load", createPreloadedImageList);

