var secoya = {
	application: {
		UID: 'bkz'
	}
};
var core = null;
var as = null;
var sfh = null;

var OSCore = "OSSecoyaCore2.082";
var GFXCore = "GFXSecoyaCore2.082/DefaultSkin/";
var JSCore = "JSSecoyaCore2.082";
var templateFolder = "Templates/default/";
var callbackInterval = 120000;

function secoyaErrorReporter() {
	this.wait();
}

secoyaErrorReporter.prototype = {
	wait: function() {
		if (window.lightCore) {
			if (!lightCore.initialized)
				lightCore.registerInit(this);
			else
				this.initialize();
		}
		else
			setTimeout('errorReporter.wait()',100);
	},

	initialize: function() {
		var msg = "";
		if (msg != '') {
			alert(msg.decodeEntities());
		}
	}
}

function secoyaTranslator() {}

secoyaTranslator.prototype = {
	fieldReplacer: new RegExp('\\[\\[([^\\]]+)\\]\\]', 'g'),

	get: function(name, fields) {
		var result = '';
		if (this.trans[name]) {
			result = this.trans[name];
			if (fields) {
				result = result.replace(this.fieldReplacer, function(all, field) {
					return fields[field] ? fields[field] : '';
				});
			}
		} else {
			result = 'unknown('+name+')';
		}
		return result;
	},

	trans: {allTags:'All tags',am:'am',cancel:'Cancel',chooseDate:'Choose date',chooseFile:'Doubleclick to choose a file',clickAny:'Click any element',confirmDelDir:'"Do you want to delete the ""[[folderName]]"" folder and all its contents?"',confirmDelFile:'"Do you  want to delete the ""[[fileName]]"" file?"',couldNotGetImg:'Could not load original image for cropping',dateInvalid:'"""[[invalidDate]]"" is not a valid date. Format should be ""dd-mm-yyyy""."',dayFri:'Fri',dayFriday:'Friday',dayMon:'Mon',dayMonday:'Monday',daySat:'Sat',daySaturday:'Saturday',daySun:'Sun',daySunday:'Sunday',dayThu:'Thu',dayThursday:'Thursday',dayTue:'Tue',dayTuesday:'Tuesday',dayWed:'Wed',dayWednesday:'Wednesday',deleteItem:'Delete',dragHere:'Drag and drop an element here',editMenuHint:'Edit the menu item hint',element:'Element',elementHeight:'The element height',elementWidth:'The element width',email:'E-mail',emailInvalid:'"""[[invalidEmail]]"" is not a valid e-mail."',execScript:'Do you want to execute the script?',externalPage:'Extern page',fieldMandatory:'Mandatory fields are marked with *.',fileName:'File name',filesDlgFilter:'Files...',fromElm:'From element',internalFile:'Internal file',internalMenu:'Internal menu',internalPage:'Internal page',invalidScript:'The script is not valid',javascript:'Javascript',language:'Language',levelUp:'Level up',lightboxImageOf:'Image [[index]] of [[count]]',linkNewWindow:'Opens a new window',linkToAnchor:'Scroll to element',linkToEmail:'E-mail: [[link]]',linkToFile:'Sending file: [[filename]]',linkToFtp:'External file-server: [[link]]',linkToHttp:'External page: [[link]]',linkToHttps:'Secure external page: [[link]]',linkToJavascript:'Javascript',linkToThickbox:'Thickbox',linkUnknownFile:'Unknown filename',loadingLanguages:'Retrieving available languages',loadingNextRows:'Loading next rows',loadingPrevRows:'Loading previous rows',login:'Log in',menuItemName:'Menu item name',monApril:'April',monAprShort:'Apr',monAugShort:'Aug',monAugust:'August',monDecember:'December',monDecShort:'Dec',monFebruary:'February',monFebShort:'Feb',monJanShort:'Jan',monJanuary:'January',monJulShort:'Jul',monJuly:'July',monJune:'June',monJunShort:'Jun',monMarch:'March',monMarShort:'Mar',monMay:'May',monMayShort:'May',monNov:'Nov',monNovember:'November',monOctober:'October',monOctShort:'Oct',monSepShort:'Sep',monSeptember:'September',mustBeChecked:'The [[checkName]] checkbox must be checked.',name:'Name',newFolder:'New folder',newPage:'New page',noElms:'No chosen elements',noHighlightElms:'No elements on this page',noResults:'No results!',numberInvalid:'"""[[fieldName]]"" must be an integer value."',ok:'OK',originalPage:'Original page',pageName:'Page name',pageURL:'Page URL',password:'Password',pm:'pm',scriptAccept:'Script accepted',scrollTo:'Scroll to element',search:'Search',selectContent:'Select within content',selectFromCSS:'Select from CSS',selectFromElm:'Select from element',selectLinkType:'Select link type',selectType:'Select type',sharerChangeName:'"Type a new name for the ""[[oldFileName]]"" folder:"',sharerFoldName:'Write a name for the new folder',showElms:'Show elements',showInNew:'New window',showInThis:'This window',size:'Size',someFieldInvalid:'Some inputs are not filled out correct. Please check the following:',status:'Status',target:'Show in',test:'Test',textsNotSame:'The texts cannot be different',thickboxElm:'Element in thickbox',thickboxGroup:'Thickbox group',title:'Title',unknownLink:'Unknown link type',uploadError:'"An error occurred with ""[[filename]]"": [[errorCode]] [[message]]"',uploadFiles:'Upload files',uploadInvalidExt:'"""[[filename]]"" cannot be selected."',uploadTooBig:'"""[[filename]]"" has a size of [[sizeKB]] KB, but the limit is [[maxKB]] KB ([[maxMB]] MB)."',uploadZeroByte:'"""[[filename]]"" is empty, and will not be uploaded."',username:'Username',waitingForServer:'Waiting for server to respond...',writePageTitle:'Page title'}
}

var errorReporter = new secoyaErrorReporter();
var sTrans = new secoyaTranslator();