<!--BEGIN-->
<!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</title>

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

	<link href="style.css" type="text/css" rel="stylesheet" />

	<script type="text/javascript">
//<![CDATA[
function ImageUploader_BeforeUpload(){
	//Use author name as a watermark. To do it, initialize the watermark string of Thumbnail1.
	//
	//NOTE: The quote character (') in watermark text should be replaced by doubled quote character (''). 
	//Otherwise Image Uploader will not be able to parse the watermark string. 
	getImageUploader("ImageUploader1").setUploadThumbnail1Watermark("opacity=100;size=30;text='" + 
		document.getElementById("Author").value.split("'").join("''") + "'");
}
//]]>
	</script>

</head>
<body>
	<p>
		This demo application illustrates how to put watermarks on images uploaded with
		Image Uploader. It places the author name to the center of the image.</p>
	<p>
		Additionally, in this demo you will see in action the following features:
	</p>
	<ul>
		<li>Ability to insert screenshots from clipboard to upload list (ActiveX only).</li>
		<li>Delete Selected button which deletes selected files to Recycle Bin (ActiveX only).</li>
		<li>Upload of two thumbnails without original file (reduces upload size).</li>
		<li>File filter.</li>
		<li>Ability to send additional data in attached HTML form.</li>
	</ul>
	<fieldset>
		<legend>Note</legend>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.
	</fieldset>
	<form id="Form1" name="Form1" action=".">
		Author:
		<input type="text" name="Author" id="Author" size="40" value="Alex" />
	</form>

	<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 = "../ImageUploader5.cab";
iu.activeXControlVersion = "5,8,1,0";

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

iu.showNonemptyResponse = "off";

//Configure License Keys
iu.addParam("LicenseKey", "71050-40D0C-00000-071D1-29885;72050-43D0C-00000-085DA-55BEF");

//Configure appearance and behaviour.
iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("FolderView", "Thumbnails");
iu.addParam("UploadView", "Thumbnails");
iu.addParam("FolderPaneHeight", "220");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowRotate", "false");
iu.addParam("ShowDescriptions", "false");
iu.addParam("ShowUploadListButtons", "true");
iu.addParam("BackgroundColor", "#ffffff");

//Configure Paste button which will paste screenshots from a clipboard.
iu.addParam("ButtonPasteText", "Paste Screenshot");
//When a screenshot will be pasted from clipboard it will be named as 
//Screenshot.jpg, next one - Screenshot_1.jpg, etc.
iu.addParam("PasteFileNameTemplate", "Screenshot");

//Make Delete button visible.
iu.addParam("ButtonDeleteFilesText", "Delete Selected");

//Configure file mask to display images only.
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.gif;*.png;*.tif;*.tiff;*.psd");

//Append the form with author name to the upload.  
iu.addParam("AdditionalFormName", "Form1");

//Exclude the source file from the upload. Only thumbnails will be sent.
iu.addParam("UploadSourceFile", "false");

//Configure first thumbnail (large image the watermark will be applied to).
iu.addParam("UploadThumbnail1FitMode", "ActualSize");

//In this code sample watermark is configured dynamically, based on the author name 
//(see BeforeUpload event handler). If you want to put static watermark it will be 
//enough to use a similar param:
//iu.addParam("UploadThumbnail1Watermark","opacity=100;text='Watermark text'");

//Configure second thumbnail (small preview).
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "120");
iu.addParam("UploadThumbnail2Height", "120");
iu.addParam("UploadThumbnail2JpegQuality", "60");

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

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

//Add event handler.
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");

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

</body>
</html>
<!--END-->