<%@ Language="VBScript" %>
<!--#include file="../config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Aurigma Image Uploader Demos &mdash; Localization Demo</title>
	<link href="../common.css" type="text/css" rel="stylesheet" />

	<script type="text/javascript" src="../Scripts/iuembed.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.InstallationProgress.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_cs.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_de.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_en.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_fr.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_he.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_it.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_ja.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_ko.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_nl.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_no.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_ru.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_sv.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_tr.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_ua.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_zh-cn.js"></script>

	<script type="text/javascript" src="../Scripts/iuembed.Localization_zh.js"></script>

	<script type="text/javascript">
		//<![CDATA[
		function SelectLanguage_change() {
			//Reload page when the language is changed. Selected language is passed through the URL.
			var sl = document.getElementById("SelectLanguage");
			var language = sl.options[sl.selectedIndex].value;
			var url = window.location.href.substring(0, window.location.href.length - window.location.search.length);
			if (url.charAt(url.length - 1) != "?") {
				url += "?";
			}
			window.location = url + language;
		}
		//]]>
	</script>

</head>
<body>
	<form>
	<h1>
		<a href="../default.asp">Aurigma Image Uploader Demos</a> &rarr; Localization Demo</h1>
	<p>
		This demo application demonstrates how to use Image Uploader on international websites
		when several languages should be supported.
	</p>
	<div class="note">
		<h4>
			Note</h4>
		<p>
			This demo application <strong>deletes all previously uploaded files</strong>. Keep
			in mind that it is a feature of this demo, not of Image Uploader itself. If you
			<strong>do not want to delete uploaded files</strong>, you should modify the upload
			processing page specified by the <strong>Action</strong> parameter.
		</p>
	</div>
	<p>
		Select language:
		<select id="SelectLanguage" onchange="SelectLanguage_change();">
			<option value="en" selected="selected">[en] - English</option>
			<option value="cs">[cs] - Czech</option>
			<option value="de">[de] - German</option>
			<option value="fr">[fr] - French</option>
			<option value="he">[he] - Hebrew</option>
			<option value="it">[it] - Italian</option>
			<option value="ja">[ja] - Japanese</option>
			<option value="ko">[ko] - Korean</option>
			<option value="nl">[nl] - Dutch</option>
			<option value="no">[no] - Norwegian</option>
			<option value="ru">[ru] - Russian</option>
			<option value="sv">[sv] - Swedish</option>
			<option value="tr">[tr] - Turkish</option>
			<option value="ua">[ua] - Ukrainian</option>
			<option value="zh">[zh] - Traditional Chinese</option>
			<option value="zh-cn">[zh-cn] - Simplified Chinese</option>
		</select>
	</p>

	<script type="text/javascript">
		//<![CDATA[
		//Create JavaScript object that will embed Image Uploader to the page.
		var iu = new ImageUploaderWriter("ImageUploader1", 650, 500);

		//For ActiveX control full path to CAB file (including file name) should be specified.
		iu.activeXControlCodeBase = "../Scripts/ImageUploader6.cab";
		iu.activeXControlVersion = "6,5,6,0";

		//For Java applet only path to directory with JAR files should be specified (without file name).
		iu.javaAppletJarFileName = "ImageUploader6.jar";
		iu.javaAppletCodeBase = "../Scripts/";
		iu.javaAppletCached = true;
		iu.javaAppletVersion = "6.5.6.0";

		iu.showNonemptyResponse = "off";

		//Configure appearance and behavior.
		iu.addParam("BackgroundColor", "#ffffff");

		//Configure thumbnail settings.
		iu.addParam("UploadThumbnail1FitMode", "Fit");
		iu.addParam("UploadThumbnail1Width", "120");
		iu.addParam("UploadThumbnail1Height", "120");
		iu.addParam("UploadThumbnail1JpegQuality", "60");

		//Configure License Keys
		iu.addParam("LicenseKey", "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX;XXXXX-XXXXX-XXXXX-XXXXX-XXXXX");

		//Configure URL files are uploaded to.
		iu.addParam("Action", "upload.asp");

		//Configure URL where to redirect after upload.
		iu.addParam("RedirectUrl", "gallery.asp");

		//Configure miscellaneous settings.
		iu.addParam("ShowDebugWindow", "true");
		iu.addParam("AllowRotate", "false");
		iu.addParam("BackgroundColor", "#ccccff");
		iu.addParam("PaneLayout", "ThreePanes");
		iu.addParam("ShowUploadListButtons", "true");
		iu.addParam("FolderPaneHeight", "220");

		//Localization
		//Get the language to apply localization for.
		var lang = window.location.search;
		if (lang.length > 0 && lang.charAt(0) == "?") {
			lang = lang.substr(1);
		}
		switch (lang) {
			case "cs":
				cs_resources.addParams(iu);
				break;
			case "de":
				de_resources.addParams(iu);
				break;
			case "fr":
				fr_resources.addParams(iu);
				break;
			case "he":
				he_resources.addParams(iu);
				break;
			case "it":
				it_resources.addParams(iu);
				break;
			case "ja":
				ja_resources.addParams(iu);
				break;
			case "ko":
				ko_resources.addParams(iu);
				break;
			case "nl":
				nl_resources.addParams(iu);
				break;
			case "no":
				no_resources.addParams(iu);
				break;
			case "ru":
				ru_resources.addParams(iu);
				break;
			case "sv":
				sv_resources.addParams(iu);
				break;
			case "tr":
				tr_resources.addParams(iu);
				break;
			case "ua":
				ua_resources.addParams(iu);
				break;
			case "zh-cn":
				zh_cn_resources.addParams(iu);
				break;
			case "zh":
				zh_resources.addParams(iu);
				break;
			default:
				lang = "en";
				en_resources.addParams(iu);
				break;
		}

		var SelectLanguage = document.getElementById("SelectLanguage");
		for (var i = 0; i < SelectLanguage.options.length; i++) {
			if (SelectLanguage.options[i].value == lang) {
				SelectLanguage.selectedIndex = i;
				break;
			}
		}

		//Tell Image Uploader writer object to generate all necessary HTML code to embed 
		//Image Uploader to the page.
		iu.writeHtml();
		//]]>
	</script>
</body>
</html>
<!--END-->