// Aurigma Image Uploader Embedding Script 
// Version 2.0.2.0 August 21, 2006
// Copyright(c) Aurigma Inc. 2002-2006

function __Browser(){
	var a=navigator.userAgent.toLowerCase();
	this.isOpera=(a.indexOf("opera")!=-1);
	this.isKonq=(a.indexOf('konqueror')!=-1);
	this.isSafari=(a.indexOf('safari')!=-1)&&(a.indexOf('mac')!=-1);
	this.isKhtml=this.isSafari||this.isKonq;
	this.isIE=(a.indexOf("msie")!=-1)&&!this.isOpera;
	this.isWinIE=this.isIE&&(a.indexOf("win")!=-1);
	this.isCSS1Compat=(!this.isIE)||(document.compatMode&&document.compatMode=="CSS1Compat");
}

var __browser=new __Browser();

//Create set/get expando methods for ActiveX
function _createExpandoMethods(id){
	var o=document.getElementById(id);
	var props=new Array();
	var hasPaneItemApiElements=false;
	for (propName in o){
		var c=propName.charAt(0);
		if (c==c.toUpperCase()){
			props.push(propName);
			if (propName=="PaneItemDesign"){
				hasPaneItemApiElements=true;
			}
		}
	}
	for (i=0;i<props.length;i++){
		//Check whether property is indexed
		if (typeof(o[props[i]])=="unknown"){
			eval("o.set"+props[i]+"=function(i,v){this."+props[i]+"(i)=v;};");
			eval("o.get"+props[i]+"=function(i){return this."+props[i]+"(i);};");
		}
		else{
			eval("o.set"+props[i]+"=function(v){this."+props[i]+"=v};");
			eval("o.get"+props[i]+"=function(){return this."+props[i]+"};");
		}
	}
	if (hasPaneItemApiElements){
		eval("o.setPaneItemDesign = function(Pane, Index, Value){this.PaneItemDesign(Pane, Index) = Value;};");
		eval("o.getPaneItemDesign = function(Pane, Index){return this.PaneItemDesign(Pane, Index);};");		
		//eval("o.getPaneItemCount = function(Pane){return this.PaneItemCount(Pane);};");
		//eval("o.getPaneItemChecked = function(Index){return this.PaneItemChecked(Index);};");
		//eval("o.getPaneItemCanBeUploaded = function(Index){return this.PaneItemCanBeUploaded(Index);};");
		eval("o.getPaneItemSelected = function(Pane, Index){return this.PaneItemSelected(Pane, Index);};");
		eval("o.setPaneItemEnabled = function(Pane, Index, Value){this.PaneItemEnabled(Pane, Index) = Value;};");
		eval("o.getPaneItemEnabled = function(Pane, Index){return this.PaneItemEnabled(Pane, Index);};");
	}
}

//Installation instructions
function _addInstructions(obj){
	obj.instructionsEnabled=true;
	if (obj.controlClass=="FileDownloader"){
		obj.instructionsCommon="File Downloader ActiveX control is necessary to download "+
			"files quickly and easily. You will be able to select required files "+
			"in a user-friendly interface and simply click a 'Download' button. "+
			"Installation will take up to few minutes, please be patient. To install File Downloader, ";
		obj.instructionsNotWinXPSP2="please reload the page and click the \"Yes\" button " +
			"when you see the control installation dialog."
		obj.instructionsWinXPSP2="please click the Information Bar. After page reload click \"Yes\" when "+
			"you see the control installation dialog.";
	} else {
		obj.instructionsCommon="Image Uploader ActiveX control is necessary to upload "+
			"your files quickly and easily. You will be able to select multiple images "+
			"in user-friendly interface instead of clumsy input fields with Browse button. "+
			"Installation will take up to few minutes, please be patient. To install Image Uploader, ";
		obj.instructionsNotWinXPSP2="please reload the page and click the \"Yes\" button " +
			"when you see the control installation dialog."
		obj.instructionsWinXPSP2="please click on the Information Bar. After page reload click \"Yes\" when "+
			"you see the control installation dialog.";
	}
}

function ControlWriter(id,width,height){
	//Private
	this._params=new Array();
	this._events=new Array();
	
	_addInstructions(this);

	this._getObjectParamHtml=function(name,value){
		return "<param name=\""+name+"\" value=\""+value+"\" />";
	}

	this._getObjectParamsHtml=function(){
		var r="";
		var p=this._params;
		var i;
		for (i=0;i<p.length;i++){
			r+=this._getObjectParamHtml(p[i].name,p[i].value);
		}
		return r;
	}

	this._getObjectEventsHtml=function(){
		var r="";
		var e=this._events;
		for (i=0;i<e.length;i++){
			r+=this._getObjectParamHtml(e[i].name+"Listener",e[i].listener);
		}
		return r;
	}

	this._getEmbedParamHtml=function(name,value){
		return " "+name+"=\""+value+"\"";	
	}

	this._getEmbedParamsHtml=function(){
		var r="";
		var p=this._params;
		var i;
		for (i=0;i<p.length;i++){
			r+=this._getEmbedParamHtml(p[i].name,p[i].value);
		}
		return r;
	}

	this._getEmbedEventsHtml=function(){
		var r="";
		var e=this._events;
		for (i=0;i<e.length;i++){
			r+=this._getEmbedParamHtml(e[i].name+"Listener",e[i].listener);
		}
		return r;
	}

	//Public

	//Properties
	this.id=id;
	this.width=width;
	this.height=height;

	this.activeXControlEnabled=true;
	this.activeXControlVersion="";

	this.javaAppletEnabled=true;
	this.javaAppletCodeBase="./";
	this.javaAppletCached=true;
	this.javaAppletVersion="";

	this.fullPageLoadListenerName=null;

	//Methods
	this.addParam=function(paramName,paramValue){
		var p=new Object();
		p.name=paramName;
		p.value=paramValue;
		this._params.push(p);
	}

	this.addEventListener=function(eventName,eventListener){
		var p=new Object();
		p.name=eventName;
		p.listener=eventListener;
		this._events.push(p);
	}

	this.getActiveXInstalled=function(){
		if (this.activeXProgId){
			try{
				var a=new ActiveXObject(this.activeXProgId);
				return true;
			}
			catch(e){
				return false;
			}
		}
		return false;
	}

	this.getHtml=function(){
		var r="";
		if (this.fullPageLoadListenerName){
			r+="<" + "script type=\"text/javascript\">";
			r+="var __"+this.id+"_pageLoaded=false;";
			r+="var __"+this.id+"_controlLoaded=false;";
			r+="function __fire_"+this.id+"_fullPageLoad(){";
			r+="if (__"+this.id+"_pageLoaded&&__"+this.id+"_controlLoaded){";
			r+=this.fullPageLoadListenerName + "();";
			r+="}";
			r+="}";
			var pageLoadCode="new Function(\"__"+this.id+"_pageLoaded=true;__fire_"+this.id+"_fullPageLoad();\")";
			if (__browser.isWinIE){
				r+="window.attachEvent(\"onload\","+pageLoadCode+");";
			}
			else{
				r+="var r=window.addEventListener?window:document.addEventListener?document:null;";
				r+="if (r){r.addEventListener(\"load\","+pageLoadCode+",false);}";
			}
			r+="<"+"/script>";
		}		

		//ActiveX control
		if(__browser.isWinIE&&this.activeXControlEnabled){
			var v=this.activeXControlVersion.replace(/\./g,",")
			var cb=this.activeXControlCodeBase+(v==""?"":"#version="+v);

			r+="<" + "script for=\""+this.id+"\" event=\"InitComplete()\">";
			r+="_createExpandoMethods(\""+this.id+"\");";
			if (this.fullPageLoadListenerName){
				r+="__"+this.id+"_controlLoaded=true;";
				r+="__fire_"+this.id+"_fullPageLoad();";
			}
			r+="<"+"/script>";

			r+="<object id=\""+this.id+"\" name=\""+this.id+"\" classid=\"clsid:"+this.activeXClassId+"\" codebase=\""+cb+"\" width=\""+this.width+"\" height=\""+this.height+"\">";
			if (this.instructionsEnabled){
				r+=this.instructionsCommon;
				var isXPSP2=(window.navigator.userAgent.indexOf("SV1") != -1);
				if (isXPSP2){
					r+=this.instructionsWinXPSP2;
				}
				else{
					r+=this.instructionsNotWinXPSP2;
				}
			}
			r+=this._getObjectParamsHtml();
			r+="</object>";

			//Event handlers
			var e=this._events;
			var eventParams;
			for (i=0;i<e.length;i++){
				if (this.controlClass=="FileDownloader"){
					switch (e[i].name){
						case "DownloadComplete":
							eventParams="Value";
							break;
						case "DownloadItemComplete":
							eventParams="Result, ErrorPage, Url, FileName, ContentType, FileSize";
							break;
						case "DownloadStep":
							eventParams="Step";
							break;
						case "Progress":
							eventParams="PercentTotal, PercentCurrent, Index";
							break;
						case "Error":
							eventParams="ErrorCode, HttpErrorCode, ErrorPage, Url, Index";
							break;
						default:
							eventParams="";
					}
					r+="<script for=\""+this.id+"\" event=\""+e[i].name+"("+eventParams+")\">";
					r+=e[i].listener+"("+eventParams+");";
					r+="<"+"/script>";
				}
				else {
					switch (e[i].name){
						case "Progress":
							eventParams="Status, Progress, ValueMax, Value, StatusText";
							break;
						case "InnerComplete":
							eventParams="Status, StatusText";
							break;
						case "ViewChange":
						case "SortModeChange":
							eventParams="Pane";
							break;
						default:
							eventParams="";
					}
				}
				r+="<" + "script for=\""+this.id+"\" event=\""+e[i].name+"("+eventParams+")\">";
				if (e[i].name=="BeforeUpload"){
					r+="return ";
				}
				r+=e[i].listener+"("+eventParams+");";
				r+="<"+"/script>";
			}

		}
		else 
		//Java appplet
		if(this.javaAppletEnabled){
			if (this.fullPageLoadListenerName){
				r+="<" + "script type=\"text/javascript\">";
				r+="function __"+this.id+"_InitComplete(){";
				r+="__"+this.id+"_controlLoaded=true;";
				r+="__fire_"+this.id+"_fullPageLoad();";
				r+="}";
				r+="<"+"/script>";
			}

			//<object> for IE and <applet> for Safari
			if (__browser.isWinIE||__browser.isKhtml){
				if (__browser.isWinIE){
					r+="<object id=\""+this.id+"\" classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\" codebase=\""+window.location.protocol+"//java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0\" width=\""+this.width+"\" height=\""+this.height+"\">";
				}
				else{
					r+="<applet id=\""+this.id+"\" code=\""+this.javaAppletClassName+"\" java_codebase=\"../\" align=\"baseline\" archive=\""+this.javaAppletJarFileName+"\" mayscript=\"true\" scriptable=\"true\" width=\""+this.width+"\" height=\""+this.height+"\">";
				}

				if (this.javaAppletCached&&this.javaAppletVersion!=""){
					r+=this._getObjectParamHtml("cache_archive",this.javaAppletJarFileName);
					var v=this.javaAppletVersion.replace(/\,/g,".");
					//r+=this._getObjectParamHtml("cache_version",v+","+v);
					r+=this._getObjectParamHtml("cache_version",v);
				}

				r+=this._getObjectParamHtml("type","application/x-java-applet;version=1.4");
				r+=this._getObjectParamHtml("codebase",this.javaAppletCodeBase);
				r+=this._getObjectParamHtml("archive",this.javaAppletJarFileName);
				r+=this._getObjectParamHtml("code",this.javaAppletClassName);
				r+=this._getObjectParamHtml("scriptable","true");
				r+=this._getObjectParamHtml("mayscript","true");

				r+=this._getObjectParamsHtml();

				r+=this._getObjectEventsHtml();

				if (this.fullPageLoadListenerName){
					r+=this._getObjectParamHtml("InitCompleteListener","__"+this.id+"_InitComplete");
				}
				if (__browser.isWinIE){
					r+="</object>";
				}
				else{
					r+="</applet>";
				}
			}
			//<embed> for all other browsers
			else{
				r+="<embed id=\""+this.id+"\" type=\"application/x-java-applet;version=1.4\" codebase=\""+this.javaAppletCodeBase+"\" code=\""+this.javaAppletClassName+"\" archive=\""+this.javaAppletJarFileName+"\" width=\""+this.width+"\" height=\""+this.height+"\" scriptable=\"true\" mayscript=\"true\" pluginspage=\""+window.location.protocol+"//java.sun.com/products/plugin/index.html#download\"";

				if (this.javaAppletCached&&this.javaAppletVersion!=""){
					r+=this._getEmbedParamHtml("cache_archive",this.javaAppletJarFileName);
					var v=this.javaAppletVersion.replace(/\,/g,".");
					//r+=this._getEmbedParamHtml("cache_version",v+","+v);
					r+=this._getEmbedParamHtml("cache_version",v);
				}

				r+=this._getEmbedParamsHtml();

				r+=this._getEmbedEventsHtml();

				if (this.fullPageLoadListenerName){
					r+=this._getEmbedParamHtml("InitCompleteListener","__"+this.id+"_InitComplete");
				}
				r+=">";
				r+="</embed>";
			}
		}
		else
		{
			r+="Your browser is not supported.";
		}
		
		//For backward compatibility
		this.controlType=this.getControlType();
			
		return r;
	}

	this.getControlType=function(){
		return (__browser.isWinIE&&this.activeXControlEnabled)?"ActiveX":(this.javaAppletEnabled?"Java":"None");
	}
	
	this.writeHtml=function(){
		document.write(this.getHtml());
	}
}

function ImageUploaderWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private-label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="6E5E167B-1566-4316-B27F-0DDAB3484CF7";
	this.activeXProgId="Aurigma.ImageUploader.4";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.ImageUploader.class";

	//Extend
	this.showNonemptyResponse="off";
	this._getHtml=this.getHtml;
	this.getHtml=function(){
		var r="";
		if (this.showNonemptyResponse!="off"){
			r+="<" + "script type=\"text/javascript\">";
			r+="function __"+this.id+"_InnerComplete(Status,StatusText){";
			r+="if (new String(Status)==\"COMPLETE\" && new String(StatusText).replace(/\\s*/g,\"\")!=\"\"){";
			if (this.showNonemptyResponse=="dump"){
				r+="var f=document.createElement(\"fieldset\");";
				r+="var l=f.appendChild(document.createElement(\"legend\"));";
				r+="l.appendChild(document.createTextNode(\"Server Response\"));";
				r+="var d=f.appendChild(document.createElement(\"div\"));";
				r+="d.innerHTML=StatusText;";
				r+="var b=f.appendChild(document.createElement(\"button\"));";
				r+="b.appendChild(document.createTextNode(\"Clear Server Response\"));";
				r+="b.onclick=function(){var f=this.parentNode;f.parentNode.removeChild(f)};";
				r+="document.body.appendChild(f);";
			}
			else{
				var s="";
				for (var i=0;i<80;i++){s+="-";}
				r+="alert(\""+s+"\\r\\nServer Response\\r\\n"+s+"\\r\\n\"+StatusText);";
			}
			r+="}";
			r+="}";
			r+="<"+"/script>";
			this.addEventListener("InnerComplete","__"+this.id+"_InnerComplete");
		}
		return r+this._getHtml();
	}
}

function ThumbnailWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="C619C11D-333B-4379-9062-E52FC1332CA2";
	this.activeXProgId="Aurigma.ImageUploader.4";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.Thumbnail.class";
}

function ShellComboBoxWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="BBF89515-EDB6-4236-8FBB-B6045290076D";
	this.activeXProgId="Aurigma.ImageUploader.4";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.ShellComboBox.class";
}

function UploadPaneWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="ImageUploader4.cab";
	this.activeXClassId="72D36C78-CC12-445C-8169-CCC942B61100";
	this.activeXProgId="Aurigma.UploadPane.4";
	this.javaAppletJarFileName="ImageUploader2.jar";
	this.javaAppletClassName="com.aurigma.imageuploader.UploadPane.class";
}

function FileDownloaderWriter(id,width,height){
	this._base=ControlWriter;
	this._base(id,width,height);
	//These properties should be modified for private label versions only
	this.activeXControlCodeBase="FileDownloader.cab";
	this.activeXClassId="E1A26BBF-26C0-401D-B82B-5C4CC67457E0";
	this.activeXProgId="Aurigma.FileDownloader.1";
	this.javaAppletEnabled=false;
	this.controlClass="FileDownloader";
}

function getControlObject(id){
	if (__browser.isSafari){
		return document[id];
	}
	else{
		return document.getElementById(id);
	}
}

function getImageUploader(id){
	return getControlObject(id);
}

function getFileDownloader(id){
	return getControlObject(id);
}﻿// Aurigma Image Uploader 
// German Localization
// Copyright(c) Aurigma Inc. 2002-2006
// German Translation (c) Ryan Hood - Album.de

var de_resources={addParams:function(iu){

//ImageUplaoderWriter properties
//[TRANSLATE]
iu.instructionsCommon = "Image Uploader ActiveX control is necessary to upload your files quickly and easily. You will be able to select multiple images in user-friendly interface instead of clumsy input fields with Browse button. Installation will take up to few minutes, please be patient. To install Image Uploader, ";
//[TRANSLATE]
instructionsNotWinXPSP2 = "please reload the page and click the \"Yes\" button when you see the control installation dialog.";
//[TRANSLATE]
instructionsWinXPSP2 = "please click on the Information Bar. After page reload click \"Yes\" when you see the control installation dialog.";

//ImageUploader properties
iu.addParam("AddFolderDialogButtonCancelText", "Abbrechen");
iu.addParam("AddFolderDialogButtonSkipAllText", "Alle überspringen");
iu.addParam("AddFolderDialogButtonSkipText", "Überspringen");
iu.addParam("AddFolderDialogTitleText", "Füge Ordner hinzu...");
iu.addParam("AuthenticationRequestBasicText", "[Name] benötigt Authentifizierung.");
iu.addParam("AuthenticationRequestButtonCancelText", "Abbrechen");
iu.addParam("AuthenticationRequestButtonOkText", "OK");
//[TRANSLATE]
iu.addParam("AuthenticationRequestDomainText", "Domain:");
//[TRANSLATE]
iu.addParam("AuthenticationRequestLoginText", "Login:");
iu.addParam("AuthenticationRequestNtlmText", "[Name] benötigt Authentifizierung.");
iu.addParam("AuthenticationRequestPasswordText", "Passwort:");
//[REVIEW] - "Add All"
iu.addParam("ButtonAddAllToUploadListText", "Alle hinzufügen");
//[REVIEW] - "Add Files..."
iu.addParam("ButtonAddFilesText", "Dateien hinzufügen...");
//[REVIEW] - "Add Folders..."
iu.addParam("ButtonAddFoldersText", "Verzeichnisse hinzufügen...");
//[REVIEW] - "Add"
iu.addParam("ButtonAddToUploadListText", "Hinzufügen");
iu.addParam("ButtonAdvancedDetailsCancelText", "Abbrechen");
iu.addParam("ButtonDeleteFilesText", ""); //"Dateien löschen"
//[REVIEW] - "Deselect All"
iu.addParam("ButtonDeselectAllText", "Markierung aufheben");
iu.addParam("ButtonPasteText", ""); //"Einfügen"
//[REVIEW] - "Remove All"
iu.addParam("ButtonRemoveAllFromUploadListText", "Alle entfernen");
//[REVIEW] - "Remove"
iu.addParam("ButtonRemoveFromUploadListText", "Entfernen");
//[REVIEW] - "Select All"
iu.addParam("ButtonSelectAllText", "Alle auswählen");
//[REVIEW] - "Send"
iu.addParam("ButtonSendText", "Speichern");
iu.addParam("ButtonStopText", ""); //"Anhalten"
//[REVIEW] - "Cancel"
iu.addParam("DescriptionEditorButtonCancelText", "Abbrechen");
iu.addParam("DescriptionEditorButtonOkText", "OK");
//[REVIEW] - "Image is too large"
iu.addParam("DimensionsAreTooLargeText", "Die Abmessungen sind zu groß");
//[REVIEW] - "Image is too small"
iu.addParam("DimensionsAreTooSmallText", "Die Abmessungen sind zu klein");
//[REVIEW] - "Drop files here"
iu.addParam("DropFilesHereText", "Bilder hier ablegen");
//[REVIEW] - "Edit description..."
iu.addParam("EditDescriptionText", "Beschreibung ändern...");
//[REVIEW] - "File is too large"
iu.addParam("FileIsTooLargeText", "Datei zu groß");
iu.addParam("FileIsTooSmallText", "Datei ist zu klein");
//[REVIEW] - "hours"
iu.addParam("HoursText", "Stunden");
//[REVIEW] - "Include subfolders"
iu.addParam("IncludeSubfoldersText", "Unterverzeichnisse einbezihen");
//[REVIEW] - "kilobytes"
iu.addParam("KilobytesText", "Kilobytes");
//[TRANSLATE]
iu.addParam("LargePreviewGeneratingPreviewText", "Generating preview...");
//[TRANSLATE]
iu.addParam("LargePreviewIconTooltipText", "Preview Thumbnail");
//[TRANSLATE]
iu.addParam("LargePreviewNoPreviewAvailableText", "No preview available.");
iu.addParam("ListColumnFileNameText", "Name");
//[REVIEW] - "Size"
iu.addParam("ListColumnFileSizeText", "Größe");
//[REVIEW] - "Type"
iu.addParam("ListColumnFileTypeText", "Typ");
//[REVIEW] - "Modified"
iu.addParam("ListColumnLastModifiedText", "Geändert am");
iu.addParam("ListKilobytesText", "KB");
iu.addParam("LoadingFilesText", "Lade Dateien...");
//[REVIEW] - "megabytes"
iu.addParam("MegabytesText", "Megabytes");
//[REVIEW] - "Add All to Upload List"
iu.addParam("MenuAddAllToUploadListText", "Alle zur Übertragungsliste hinzufügen");
//[REVIEW] - "Add to Upload List"
iu.addParam("MenuAddToUploadListText", "Zur Übertragungsliste hinzufügen");
iu.addParam("MenuArrangeByModifiedText", "Geändert am");
iu.addParam("MenuArrangeByNameText", "Name");
iu.addParam("MenuArrangeByPathText", "Pfad");
iu.addParam("MenuArrangeBySizeText", "Größe");
iu.addParam("MenuArrangeByText", "Sortieren nach");
iu.addParam("MenuArrangeByTypeText", "Typ");
iu.addParam("MenuArrangeByUnsortedText", "Nicht sortieren");
//[REVIEW] - "Deselect All"
iu.addParam("MenuDeselectAllText", "Markierung aufheben");
//[TRANSLATE]
iu.addParam("MenuDetailsText", "Details");
//[REVIEW] - "Icons"
iu.addParam("MenuIconsText", "Symbole");
//[REVIEW] - "Invert Selection"
iu.addParam("MenuInvertSelectionText", "Auswahl umkehren");
//[REVIEW] - "List"
iu.addParam("MenuListText", "Liste");
//[REVIEW] - "Refresh"
iu.addParam("MenuRefreshText", "Aktualisieren");
//[REVIEW] - "Remove All from Upload List"
iu.addParam("MenuRemoveAllFromUploadListText", "Alle aus Übertragungsliste löschen");
//[REVIEW] - "Remove from Upload List"
iu.addParam("MenuRemoveFromUploadListText", "Aus Übertragungsliste löschen");
//[REVIEW] - "Select All"
iu.addParam("MenuSelectAllText", "Alle auswählen");
//[REVIEW] - "Thumbnails"
iu.addParam("MenuThumbnailsText", "Miniaturansicht");
iu.addParam("MessageBoxTitleText", "Image Uploader");
//[REVIEW] - "The attempt to connect to the Internet has failed."
iu.addParam("MessageCannotConnectToInternetText", "Die Internetverbindung kann nicht hergestellt werden.");
//[REVIEW] - "The image [Name] cannot be selected. This image dimensions ([OriginalImageWidth]x[OriginalImageHeight]) are too large. The image should be smaller than [MaxImageWidth]x[MaxImageHeight]."
iu.addParam("MessageDimensionsAreTooLargeText", "Das Bild [Name] kann nicht markiert werden. Die Pixelgröße dieses Bildes ([OriginalImageWidth]x[OriginalImageHeight]) ist zu Groß. Das Bild muss kleiner als [MaxImageWidth]x[MaxImageHeight] sein.");
//[REVIEW] - "The image [Name] cannot be selected. This image dimensions ([OriginalImageWidth]x[OriginalImageHeight]) are too small. The image should be larger than [MinImageWidth]x[MinImageHeight]."
iu.addParam("MessageDimensionsAreTooSmallText", "Das Bild [Name] kann nicht markiert werden. Die Pixelgröße dieses Bildes ([OriginalImageWidth]x[OriginalImageHeight]) ist zu klein. Das Bild muss größer als [MinImageWidth]x[MinImageHeight] sein.");
iu.addParam("MessageFileSizeIsTooSmallText", "Die Datei [Name] kann nicht selektiert werden. Die Dateigröße ist kleiner als das Limit ([Limit] kb).");//"Die maximale Dateianzahl wurde überschritten."
iu.addParam("MessageMaxFileCountExceededText", "Die Datei [Name] kann nicht selektiert werden. Die Dateigröße aller Dateien übersteigt das Limit ([Limit] files).");//"Die maximale Dateigröße wurde überschritten."
iu.addParam("MessageMaxFileSizeExceededText", "Die Datei [Name] kann nicht selektiert werden. Die Dateigrößer übersteigt das Limit ([Limit] kb).");//"Die maximale Gesamtdateigröße wurde überschritten."
iu.addParam("MessageMaxTotalFileSizeExceededText", "Die Datei [Name] kann nicht selektiert werden. Die Dateigröße aller Dateien übersteigt das Limit. ([Limit] kb).");
//[REVIEW] - "No Internet session was established."
iu.addParam("MessageNoInternetSessionWasEstablishedText", "Es konnte keine Internetverbindung hergestellt werden.");
//[REVIEW] - "No response from server."
iu.addParam("MessageNoResponseFromServerText", "Es ist ein Fehler bei der Übertragung aufgetreten.");
//[TRANSLATE]
iu.addParam("MessageRedirectText", "The server attempted to redirect you, but server redirects are not supported.");
iu.addParam("MessageRetryOpenFolderText", "Der zuletzt besuchte Ordner ist nicht verfügbar. Wahrscheinlich befindet er sich auf einem Wechseldatenträger (z.B. Speicherkarte der Digitalkamera). Bitte stecken Sie den Wechseldatenträger in Ihrem Computer und drücken Sie den \"Wiederholen\" Button oder klicken Sie \"Abbrechen\" um fortzufahren.");
//[REVIEW] - "The server or proxy [Name] not found."
iu.addParam("MessageServerNotFoundText", "Der Server [Name] wurde nicht gefunden.");
iu.addParam("MessageSwitchAnotherFolderWarningText", "Sie möchten auf einen anderen ordner Wechseln. Dies wird die Markierung aller bisher ausgewählten Dateien in diesem Ordner aufheben. \n\nUm fortzufahen und die Auswahl zu verlieren, klicken Sie bitte OK.\nUm die Auswahl beizubehalten und im aktuellen Ordner zu bleiben, klicken Sie bitte ABBRECHEN.");
iu.addParam("MessageUnexpectedErrorText", "Es ist ein Problem mit dem Image Uploader aufgetreten. Wenn Sie diese Nachricht sehen, kontaktieren Sie bitte den Webmaster.");
//[REVIEW] - "Upload is cancelled."
iu.addParam("MessageUploadCancelledText", "Die Übertragung wurde abgebrochen.");
//[REVIEW] - "Upload complete."
iu.addParam("MessageUploadCompleteText", "Die Übertragung wurde abgeschlossen.");
//[REVIEW] - "Upload failed (the connection was interrupted)."
iu.addParam("MessageUploadFailedText", "Die Übertragung schlug fehl.");
//[REVIEW] - "User-specified timeout has expired."
iu.addParam("MessageUserSpecifiedTimeoutHasExpiredText", "Die von dem Benutzer festgelegte Zeit wurde überschritten.");
//[REVIEW] - "minutes"
iu.addParam("MinutesText", "Minuten");
//[REVIEW] - "Cancel"
iu.addParam("ProgressDialogCancelButtonText", "Abbrechen");
//[REVIEW] - "Close"
iu.addParam("ProgressDialogCloseButtonText", "Schließen");
//[REVIEW] - "Close this dialog box when upload completes"
iu.addParam("ProgressDialogCloseWhenUploadCompletesText", "Nach Übertragung schließen");
//[REVIEW] - "Estimated time: [Current] of [Total]"
iu.addParam("ProgressDialogEstimatedTimeText", "Geschätzte Dauer: [Current] von [Total]");
//[REVIEW] - "Preparing data..."
iu.addParam("ProgressDialogPreparingDataText", "Vorbereitung der Daten");
//[REVIEW] - "Sent: [Current] of [Total]"
iu.addParam("ProgressDialogSentText", "Bytes übertragen: [Current] von [Total]	");
//[REVIEW] - "Upload Files"
iu.addParam("ProgressDialogTitleText", "Dateiübertragung");
//[REVIEW] - "Waiting for response from server..."
iu.addParam("ProgressDialogWaitingForResponseFromServerText", "Warten auf Serverantwort");
iu.addParam("ProgressDialogWaitingForRetryText", "Warte auf Wiederholung...");
iu.addParam("RemoveIconTooltipText", "entfernen");
iu.addParam("RotateClockwiseTooltipText", "Im Uhrzeigersinn drehen");
iu.addParam("RotateCounterClockwiseTooltipText", "Gegen den Uhrzeigersinn drehen");
//[REVIEW] - "seconds"
iu.addParam("SecondsText", "Sekunden");
//[REVIEW] - "Filesystem"
iu.addParam("UnixFileSystemRootText", "Dateisystem");
//[REVIEW] - "Home Folder"
iu.addParam("UnixHomeDirectoryText", "Persönliches Verzeichnis");

}}
									function beforeUploadHandler() {
										var url = "http://www.landurlaub-freunde.de/index.php?eID=fotowettbewerb&type=validate";
										var req = new Request({
											method: "post", 
											url: url,
											data: $('Form1'),
											onComplete: function showResponse(response, responseXML){
												var data = responseXML.getElementsByTagName("data");
												var status = data[0].getElementsByTagName("status")[0].firstChild.nodeValue;
												var message = data[0].getElementsByTagName("message")[0].firstChild.nodeValue;
												
												if (status == 'true') {
													getImageUploader('ImageUploader').Send();
												} else {
													alert(message);
												}
											}
										}).send();									
									}	
									
									function UploadFileCountChange() {
										if (getImageUploader('ImageUploader').getUploadFileCount() == 1){
											$('send').set("class","active");
											$('send').removeAttribute("disabled");
											$('addFile').set("class","inactive");
											$('addFile').setAttribute("disabled","disabled");
										} else {
											$('send').set("class","inactive");
											$('send').setAttribute("disabled","disabled");
											$('addFile').set("class","active");
											$('addFile').removeAttribute("disabled");
										}
									}
		
								
