last_section = false;

function rollover(imgName) {
	if (loaded) {
		currImage = document.getElementById(imgName);
		newImage = eval(imgName + "_r");
		if ((typeof currImage == 'object') && (typeof newImage == 'object')) {
			last_rollover = currImage;
			last_src = last_rollover.src;
			last_rollover.src = newImage.src;
		}
	}
}

function rollout() {
	if (loaded && last_rollover) {
		last_rollover.src = last_src;
		last_rollover = null;
	}
}

function openWin(url, width, height, winName) {
	window.open(url, winName, 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width=' + width + ', height=' + height);
}
function openRevWin(url, width, height, winName) {
	window.open(url, winName, 'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=1, resizable=1, width=' + width + ', height=' + height);
}

function close_window() {
	window.close();
}

function passwordFocus(oInput) {
	oInput.style.display = 'none';
	oInput.form.password.style.display = 'inline';
	oInput.form.password.focus();
}

function highlight_text(section) {
	lowlight_text();
	last_section = document.getElementById(section);
	last_section.style.backgroundColor = "#dddddd";
	document.location = "#" + section;
}

function lowlight_text() {
	if (last_section) {
		last_section.style.backgroundColor = "#ffffff";
		last_section = false;
	}
}

function nav_top() {
	lowlight_text();
	document.location = "#top";
}

function writeFlash(id, path, width, height, imgpath, alt) {
	path = '/en/' + path;
	flash = '';
	if (MM_FlashCanPlay) {
		flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
		flash += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"';
		flash += ' id="' + id + '"';
		flash += ' width="' + width + '"';
		flash += ' height="' + height + '">';
		flash += '<param name="movie" value="' + path + '">';
		flash += '<param name="quality" value="best">';
		flash += '<param name="bgcolor" value="#ffffff">';
		flash += '<param name="wmode" value="transparent">';
		flash += '<embed src="' + path + '"';
		flash += ' quality="best"';
		flash += ' bgcolor="#ffffff"';
		flash += ' wmode="transparent"';
		flash += ' width="' + width + '"';
		flash += ' height="' + height + '"';
		flash += ' name="' + id + '"';
		flash += ' type="application/x-shockwave-flash"';
		flash += ' pluginspace="http://www.macromedia.com/go/getflashplayer">';
		flash += '<\/embed>';
		flash += '<\/object>';
	} else {
		flash += '<img src="/en/swf/' + imgpath + '" width="' + width + '" height="' + height + '" border="0" alt="' + alt + '" />';
	}
	document.write(flash);
}

var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) {
	var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	for (var i = 0; i < words.length; ++i) {
		if (isNaN(parseInt(words[i])))
			continue;
		var MM_PluginVersion = words[i];
	}
	var MM_FlashCanPlay = (MM_PluginVersion >= MM_contentVersion);
} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}