

function ak(){
		this.r = true;					
	}

ak.prototype.jL = function(caseName,arg1,arg2,arg3){
		var r = true;
		if(!c.uY){return true;}
		caseName = 'this.' + caseName;
		if(!F(arg1)) {caseName = caseName + '(arg1)';}
r = eval(caseName);
			if(!r){
				t.tH(caseName); 
				return false;}		
			if(r){return true;}
		return r;	
			};

ak.prototype.ax = function(arg){
		alert(arg);
		debugger;
	};

ak.prototype.tstJsNil = function(obj){
		if(F(obj)) {debugger;}
	};

ak.prototype.wS = function(H){
if(!H.C >0) 
			{this.ax('testJs001');}
return true;
	};

ak.prototype.uT = function(H){
		if(!H.C >0) 
			{this.ax('testJs002');}
		if(F(H.tabName)) 
			{this.ax('testJs002');}
		if(F(H.rX)) 
			{this.ax('testJs002');}
		if(F(H.rX.pageNr)) 
			{this.ax('testJs002');}
		if(F(H.wR)) 
			{this.ax('testJs002');}
		if(F(H.wW)) 
			{this.ax('testJs002');}
		return true;
	};

	ak.prototype.wZ = function(H){
		this.uT(H);
	};

	ak.prototype.gZ = function(aFunc, aq){
		if(aq >0) {return true;}
		this.ax(aFunc);
		debugger;
		return false;
	};

	ak.prototype.wF = function(aq){
		return this.gZ('wF', aq);
	};
	ak.prototype.wh = function(aq){
		return this.gZ('wh', aq);
	};
	ak.prototype.wk = function(aq){
		return this.gZ('wk', aq);
	};

ak.prototype.wU = function(aPanel){
		if(F(aPanel)) 
			{this.ax('testJs020');}
		if(G(aPanel.C)) 
			{this.ax('testJs020');}
		return true;
	};

ak.prototype.tg = function(ai){
		if(F(ai)) 
			{this.ax('testJs030');}
return true;
	};

ak.prototype.sZ = function(bE){
		if(G(bE)) 
			{this.ax('testJs031');}
		return true;
	};

ak.prototype.sU = function(fileName){
if(G(fileName)) 
			{this.ax('testJs032');}
		return true;
	};

ak.prototype.xb = function(fileName){
		return this.sU(fileName + ' testJs033');
	};

ak.prototype.wX = function(pageId){
		if(F(pageId)) 
			{this.ax('testJs041');}
		if(G(pageId.pageNr)) 
			{this.ax('testJs041');}
		return true;
	};

ak.prototype.ty = function(anId){
if(F(anId)) 
			{this.ax('testJs045');}
return true;
	};

ak.prototype.pl = function(nodesArray){
if(!F(nodesArray)) 
			{this.ax('pl');}
		if(!G(nodesArray)) 
			{this.ax('pl');}
		return true;
	};


ak.prototype.gu = function(arg){
		if(F(arg)) 	{this.ax('gu');}
	};

ak.prototype.testCompaniesLoaded = function(){
		testCountLoaded(companiesStore);
		};

	ak.prototype.testCatalogsLoaded = function(){
		testCountLoaded(catalogStore);
		};

	ak.prototype.testPagesLoaded = function(){
		testCountLoaded(pagesStore);};

	ak.prototype.testCountLoaded = function(arg1){
		var count = arg1.getCount();
		if(!count > 0){debugger;}
		};





Ext.ux.TabCloseMenu = function() {
    var tabs, menu, ctxItem;
	this.init = function(tp) {
        tabs = tp;
        tabs.on('contextmenu', onContextMenu);
    };

function onContextMenu(tabPanel, tab, e) {
		if(G(this.C)) {return;}
		var items = [];
        if (tab.closable) {
            items.push({
                text: t.kK,
				C: tab.C,
				handler: function() {
				var I = a.aI(this.C);
					a.uiPages().remove(I.aO);
						}
            });
        }
        var canCloseOthers = false;
		tabPanel.items.each(function() {
            if (this != tab && this.closable) {
                canCloseOthers = true;
                return false;
            }
            return true;
        });
        if (canCloseOthers) {
            items.push({
                text: t.kM,
				C: tab.C,
				handler: function() {
                    tabPanel.items.each(function() {
						if(!G(this.C)) {
				var I = a.aI(this.C);
						if(!G(I)) {
							if(I.lQ())
								{a.uiPages().remove(I.aO);}
						}} 
                    });
                }
            });
        }

var menuButtonClose = new Ext.menu.Menu({
			items: items
        });

menuButtonClose.showAt(e.getXY());
    }
	};

var tc;								
	tc = new ak();					

function dS (data) {
var utf8Overhead = function(chr) {
        var code = chr.charCodeAt(0);
        if (code < 0x0080) {
            return 0;
        }
        if (code < 0x0800) {
             return 1;
        }
        return 2;
    };
 
 
    var error = function (type, msg, filename, line){debugger; throw new this.window[type](msg, filename, line);};

var read_until = function (data, offset, stopchr){
        var buf = [];
        var chr = data.slice(offset, offset + 1);
        var i = 2;
        while (chr != stopchr) {
            if ((i+offset) > data.length) {debugger;
                error('Error', 'Invalid');
            }
            buf.push(chr);
            chr = data.slice(offset + (i - 1),offset + i);
            i += 1;
        }
        return [buf.length, buf.join('')];
    };

var read_chrs = function (data, offset, length){
        var buf;
 
        buf = [];
        for (var i = 0;i < length;i++){
            var chr = data.slice(offset + (i - 1),offset + i);
            buf.push(chr);
            length -= utf8Overhead(chr);
        }
        return [buf.length, buf.join('')];
    };

var _unserialize = function (data, offset){
        var readdata;
        var readData;
        var chrs = 0;
        var ccount;
        var stringlength;
        var keyandchrs;
        var keys;
		var fieldDelimiter = c.toolTipDelimiter;	
 
        if (!offset) {offset = 0;}
        var dtype = (data.slice(offset, offset + 1)).toLowerCase();
 
        var dataoffset = offset + 2;
        var typeconvert = function(x) {return x;};
 
        switch (dtype){
            case 'i':
                typeconvert = function (x) {return parseInt(x, 10);};
                readData = read_until(data, dataoffset, fieldDelimiter);
                chrs = readData[0];
                readdata = readData[1];
                dataoffset += chrs + 1;
            break;
            case 'b':
                typeconvert = function (x) {return parseInt(x, 10) !== 0;};
                readData = read_until(data, dataoffset, fieldDelimiter);
                chrs = readData[0];
                readdata = readData[1];
                dataoffset += chrs + 1;
            break;
            case 'd':
                typeconvert = function (x) {return parseFloat(x);};
				readData = read_until(data, dataoffset, fieldDelimiter);
                chrs = readData[0];
                readdata = readData[1];
                dataoffset += chrs + 1;
            break;
            case 'n':
                readdata = null;
            break;
            case 's':
			ccount = read_until(data, dataoffset, ':');		
                chrs = ccount[0];
                stringlength = ccount[1];
                dataoffset += chrs + 2;					
readData = read_chrs(data, dataoffset, parseInt(stringlength, 10));
				chrs = readData[0];
                readdata = readData[1];
                dataoffset += chrs + 2;
                if (chrs != parseInt(stringlength, 10) && chrs != readdata.length){debugger;
                    error('SyntaxError', 'String length mismatch');
                }
 
                readdata = this.utf8_decode(readdata);
            break;
            case 'a':
                readdata = {};
                keyandchrs = read_until(data, dataoffset, ':');	
                chrs = keyandchrs[0];
                keys = keyandchrs[1];
                dataoffset += chrs + 2;
 
                for (var i = 0; i < parseInt(keys, 10); i++){
                    var kprops = _unserialize(data, dataoffset);
                    var kchrs = kprops[1];
                    var key = kprops[2];
                    dataoffset += kchrs;
 
                    var vprops = _unserialize(data, dataoffset);
                    var vchrs = vprops[1];
                    var value = vprops[2];
                    dataoffset += vchrs;
 
                    readdata[key] = value;
                }
 
                dataoffset += 1;
            break;
            default:
                error('SyntaxError', 'Unknown / Unhandled data type(s): ' + dtype);
            break;
        }
        return [dtype, dataoffset - offset, typeconvert(readdata)];
    };
     
    return _unserialize((data+''), 0)[2];
}

function utf8_decode ( str_data ) {
var tmp_arr = [], i = 0, ac = 0, c1 = 0, c2 = 0, c3 = 0;
    str_data += '';
    while ( i < str_data.length ) {
        c1 = str_data.charCodeAt(i);
        if (c1 < 128) {
            tmp_arr[ac++] = String.fromCharCode(c1);
            i++;
        } else if ((c1 > 191) && (c1 < 224)) {
            c2 = str_data.charCodeAt(i+1);
            tmp_arr[ac++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));
            i += 2;
        } else {
            c2 = str_data.charCodeAt(i+1);
            c3 = str_data.charCodeAt(i+2);
            tmp_arr[ac++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
            i += 3;
        }
    }
 
    return tmp_arr.join('');
}

Ext.namespace('Ext.ux.plugin');
 Ext.onReady(function(){
    
   var CSS = Ext.util.CSS;
    if(CSS){ 
        CSS.getRule('.x-hide-nosize') || 
            CSS.createStyleSheet('.x-hide-nosize{height:0px!important;width:0px!important;border:none!important;zoom:1;}.x-hide-nosize * {height:0px!important;width:0px!important;border:none!important;zoom:1;}');
        CSS.refreshCache();
    }
    
});

(function(){

      var El = Ext.Element, A = Ext.lib.Anim, supr = El.prototype; 
      var VISIBILITY = "visibility",
        DISPLAY = "display",
        HIDDEN = "hidden",
        NONE = "none";
        
      var fx = {};
    
      fx.El = {
	      	     
            setDisplayed : function(value) {
                var me=this;
                me.visibilityCls ? (me[value !== false ?'removeClass':'addClass'](me.visibilityCls)) :
	                supr.setDisplayed.call(me, value);
                return me;
	        },
            
            isDisplayed : function() {
	            return !(this.hasClass(this.visibilityCls) || this.dom.style[DISPLAY] == NONE);
	        },
	        fixDisplay : function(){
	            var me = this;
	            supr.fixDisplay.call(me);
                me.visibilityCls && me.removeClass(me.visibilityCls); 
	        },
	
	        isVisible : function(deep) {
	            return this.visible || 
                   (!this.isStyle(VISIBILITY, HIDDEN) && 
                       this.visibilityCls ? !this.hasClass(this.visibilityCls) :!this.isStyle(DISPLAY, NONE));
	        }
	    };
        
        Ext.override(El.Flyweight, fx.El);

     Ext.ux.plugin.VisibilityMode = function(opt) {

    Ext.apply(this, opt||{});
    
    var CSS = Ext.util.CSS;

    if(CSS && !Ext.isIE && this.fixMaximizedWindow !== false && !Ext.ux.plugin.VisibilityMode.MaxWinFixed){
        CSS.updateRule ( '.x-window-maximized-ct', 'overflow', '');
        Ext.ux.plugin.VisibilityMode.MaxWinFixed = true;  
    }
    
   };


  Ext.extend(Ext.ux.plugin.VisibilityMode , Object, {

       bubble              :  true,

      fixMaximizedWindow  :  true,
     
      elements       :  null,

      visibilityCls   : 'x-hide-nosize',

      hideMode  :   'nosize' ,

      ptype     :  'uxvismode', 
      init : function(c) {

        var hideMode = this.hideMode || c.hideMode,
            plugin = this,
            bubble = Ext.Container.prototype.bubble,
            changeVis = function(){

	            var els = [this.collapseEl, this.actionMode].concat(plugin.elements||[]);
	
	            Ext.each(els, function(el){
		            plugin.extend( this[el] || el );
	            },this);
	
	            var cfg = {
                    visFixed  : true,
                    animCollapse : false,
                    animFloat   : false,
		            hideMode  : hideMode,
		            defaults  : this.defaults || {}
	            };
	
	            cfg.defaults.hideMode = hideMode;
	            
	            Ext.apply(this, cfg);
	            Ext.apply(this.initialConfig || {}, cfg);
            
            };

         c.on('render', function(){

            if(plugin.bubble !== false && this.ownerCt){

               bubble.call(this.ownerCt, function(){
                  this.visFixed || this.on('afterlayout', changeVis, this, {single:true} );
               });
             }

             changeVis.call(this);

          }, c, {single:true});

     },
     extend : function(el, visibilityCls){
        el && Ext.each([].concat(el), function(e){
            
	        if(e && e.dom){
                 if('visibilityCls' in e)return;  
	             Ext.apply(e, fx.El);
	             e.visibilityCls = visibilityCls || this.visibilityCls;
	        }
        },this);
        return this;
     }

  });
  
  Ext.preg && Ext.preg('uxvismode', Ext.ux.plugin.VisibilityMode );
  Ext.provide && Ext.provide('uxvismode');
})();

Ext.override(Ext.Panel, {

   onResize : function(w, h, rw, rh){
        if(Ext.isDefined(w) || Ext.isDefined(h)){
            if(!this.collapsed){
                if(Ext.isNumber(w)){
                    this.body.setWidth(w = this.adjustBodyWidth(w - this.getFrameWidth()));
                } else if (w == 'auto') {
                    w = this.body.setWidth('auto').dom.offsetWidth;
                } else {
                    w = this.body.dom.offsetWidth;
                }

                if(this.tbar){
                    this.tbar.setWidth(w);
                    if(this.topToolbar){
                        this.topToolbar.setSize(w);
                    }
                }
                if(this.bbar){
                    this.bbar.setWidth(w);
                    if(this.bottomToolbar){
                        this.bottomToolbar.setSize(w);
                        if (Ext.isIE) {
                            this.bbar.setStyle('position', 'static');
                            this.bbar.setStyle('position', '');
                        }
                    }
                }
                if(this.footer){
                    this.footer.setWidth(w);
                    if(this.fbar){
                        this.fbar.setSize(Ext.isIE ? (w - this.footer.getFrameWidth('lr')) : 'auto');
                    }
                }

if(Ext.isNumber(h)){
                    h = Math.max(0, this.adjustBodyHeight(h - this.getFrameHeight()));
                    this.body.setHeight(h);
                }else if(h == 'auto'){
                    this.body.setHeight(h);
                }

                if(this.disabled && this.el._mask){
                    this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight());
                }
            }else{
                this.queuedBodySize = {width: w, height: h};
                if(!this.queuedExpand && this.allowQueuedExpand !== false){
                    this.queuedExpand = true;
                    this.on('expand', function(){
                        delete this.queuedExpand;
                        this.onResize(this.queuedBodySize.width, this.queuedBodySize.height);
                    }, this, {single:true});
                }
            }
            this.onBodyResize(w, h);
        }
        this.syncShadow();
        Ext.Panel.superclass.onResize.call(this, w, h, rw, rh);
    }
});



Ext.ns('Ext.ux.form');

Ext.ux.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
    initComponent : function(){
        Ext.ux.form.SearchField.superclass.initComponent.call(this);
        this.on('specialkey', function(f, e){
            if(e.getKey() == e.ENTER){
                this.onTrigger2Click();
            }
        }, this);
    },

    validationEvent:false,
    validateOnBlur:false,
    trigger1Class:'x-form-clear-trigger',
    trigger2Class:'x-form-search-trigger',
    hideTrigger1:true,
    width:180,
    hasSearch : false,
    paramName : 'query',
    params: {},

beforeClear: function(){},
    afterClear: function(){},
    beforeSeach: function(){},
    afterSeach: function(){},


    onTrigger1Click : function(){
        if(this.hasSearch){
            this.el.dom.value = '';
            var o = {start: 0};
this.store.baseParams[this.paramName] = '';
this.params[this.paramName] = '';  
			if(this.beforeClear) this.beforeClear();
            this.store.reload({params:o, callback: this.afterClear });
            this.triggers[0].hide();
            this.hasSearch = false;
        }
    },

    onTrigger2Click : function(){
        var v = this.getRawValue();
        if(v.length < 1){
            this.onTrigger1Click();
            return;
        }
        var o = {start: 0};
        this.store.baseParams = this.store.baseParams || {};
        this.store.baseParams[this.paramName] = v;
        if(this.beforeSearch) this.beforeSearch();
        this.store.reload({params:o, callback: this.afterSearch});
        this.hasSearch = true;
        this.triggers[0].show();
    }
});





Ext.ux.CSVReader = Ext.extend(Ext.data.DataReader, {		
origFields: null,									
		nrOfFields: 0,										
		read: function(xhr) {								
return this.readRecords(xhr.responseText);	
    },

readRecords: function(aL) {



if (!Ext.ux.CSVReader.prototype.testCell) {
var cell = Ext.getBody().createChild({tag: "table", cls: 'x-hide-offsets', cn: {
                tag: 'tbody', cn: {
                    tag: 'tr', cls: 'x-grid3-row', cn: {
                        tag: 'td', cls: 'x-grid3-col x-grid3-cell', cn: {
                            cls: 'x-grid3-cell-inner'
                        }
                    }
                }	
            }});	

Ext.ux.CSVReader.prototype.testCell = cell.child('td', true);
Ext.ux.CSVReader.prototype.testInner = Ext.ux.CSVReader.prototype.testCell.firstChild;
        }

		fields = this.meta.fields;
		this.nrOfFields = fields.length;

		var s_meta = this.meta;							
		if(F(this.origFields))						
			{
				this.origFields = this.meta.fields;}	
        var columns;

aL = aL.split('\n');

var headers = aL[0].split(c.lk);

			var names = new Array(this.nrOfFields);
columns = new Array(this.nrOfFields); 
for (var i = 0; i < this.nrOfFields; i++) {	
                headers[i] = headers[i].trim();
var fname = headers[i].replace(/\W/g, '');
                if (names.indexOf(fname) != -1) {
                    fname += i;}										
                names[i] = fields[i].name = fname;
                columns[i] = {
                    id: fname,
                    header: headers[i],
                    dataIndex: fname,
width: this.calculateColumnWidth(headers[i]),
                    sortable: true};
if (fields[i].type == 'date') {
                    columns[i].renderer = Ext.util.Format.dateRenderer(fields[i].dateFormat);
                } else if (fields[i].type == 'float') {
                    var f = '0.';							
                    for (var j = 0; j < fields[i].precision; j++) {
                        f += '0';}
                    columns[i].renderer = Ext.util.Format.numberRenderer(f);
                    columns[i].css = 'text-align:right;';
                } else if (fields[i].type == 'int') {
                    columns[i].css = 'text-align:right;';
                }
            }
            this.recordType = Ext.data.Record.create(fields);
            this.columnModel = new Ext.grid.ColumnModel(columns);

			var sid = this.meta ? this.meta.id : null;

var newRecord = this.recordType;				
		fields = newRecord.prototype.fields;
var fieldItems = fields.items;					
														var records = [];								
var dZ = aL.length;						
for (var rowCount = 1; rowCount < dZ; rowCount++) {	
            var currRow = aL[rowCount].trim();			
			if (!currRow.length) continue;
			currRow = currRow.split(c.lk);
			var values = {};
var id = ((sid || sid === 0) && currRow[sid] !== undefined && currRow[sid] !== "" ? currRow[sid] : null);
for (var jCount = 0; jCount < this.nrOfFields; jCount++) {
				var fField = fieldItems[jCount];		
				var k = fField.mapping !== undefined && fField.mapping !== null ? fField.mapping : jCount;
				var v = currRow[k] !== undefined ? currRow[k] : fField.defaultValue;
				v = fField.convert(v, currRow);
values[fField.name] = v;
columns[jCount].width = Math.max(columns[jCount].width, 
					this.calculateColumnWidth(this.columnModel.getRenderer(jCount).call(this, v)));
            } 
var record = new newRecord(values, id);
record.csv = currRow;
records.push(record);
        }		


		return {
            success : true,
            records : records};		
    },		
onMetaChange: Ext.emptyFn,
getColumnModel: function() {
        return this.columnModel;
    },
calculateColumnWidth: function(v) {
        this.testInner.innerHTML = v;
        return this.testCell.scrollWidth;	
    },
createFieldSpec: function(aL, fieldCount) {		
        var dataLine;								
        var finished = false;						
        var result = new Array(fieldCount);			

for (var i = 1; !finished && i < aL.length; i++) { 
            dataLine = aL[i].trim();
            if (dataLine.length) {								
                var fieldsInRow = dataLine.split(c.lk);	
this.updateFieldSpec(result, fieldsInRow);		
            }
        }

for (var ii = 0; ii < result.length; ii++) {
            if (!result[ii]) {result[ii] = {type: 'string'};}
        }
        return result;	
    },
updateFieldSpec: function(fieldSpec, row) {		
													var dateFormat;								
for (var i = 0; i < this.nrOfFields; i++) {		
var fieldValue = row[i].trim();			
													if (!fieldValue.length) continue;				
var dotPos = fieldValue.indexOf(c.ra);	
if (!fieldSpec[i]) {
                if (!isNaN(Number(fieldValue))) {			
                    if (dotPos == -1) {						
                        fieldSpec[i] = {					
                            type: 'int'};
                    } else {								
                        fieldSpec[i] = {					
                            type: 'float',
                            precision: fieldValue.length - dotPos - 1};}
                } else if (dateFormat == this.sX(fieldValue)) {		
                    fieldSpec[i] = {
                        type: 'date',					
                        dateFormat: dateFormat};
                }		

} else if (fieldSpec[i].type == 'int') {
                if (isNaN(Number(fieldValue))) {
                    fieldSpec[i].type = 'string';
                } else if (dotPos != -1) {
                    fieldSpec[i].type = 'float';
                    fieldSpec[i].precision = fieldValue.length - dotPos - 1;
                }		

} else if (fieldSpec[i].type == 'float') {
                if (isNaN(Number(fieldValue))) {
                    fieldSpec[i].type = 'string';
                } else if (dotPos != -1) {
                    fieldSpec[i].type = 'float';
                    fieldSpec[i].precision = Math.max(fieldSpec[i].precision, fieldValue.length - dotPos - 1);
                }
            }	
var nrElem = fieldSpec.length;

		if(nrElem - 1 < i) {fieldSpec[i].type = 'string';}		
		var origType = this.origFields[i].type;		
		if(F(origType)) 
			{fieldSpec[i] = {type: 'string'};}		
			else{fieldSpec[i].type = origType;}		

		}	
    },		
dateFormats: [
'd-M-Y',
        'j-M-Y',
        'd-M-y',
        'j-M-y',

'd/m/Y',
        'd/n/Y',
        'j/m/Y',
        'j/n/Y',
        'd/m/y',
        'd/n/y',
        'j/m/y',
        'j/n/y',

'm/d/y',
        'n/d/y',
        'm/d/Y',
        'n/d/Y',
        'm/j/y',
        'n/j/y',
        'm/j/Y',
        'n/j/Y'
    ],
sX: function(d) {					
		for (var i = 0; i < this.dateFormats.length; i++) {
            if (Date.parseDate(d, this.dateFormats[i])) {
                return this.dateFormats[i];
            }		
        }	
		return null;		
}	
});		



Ext.ux.CSVReaderSerial = Ext.extend(Ext.data.DataReader, {
database: null,										
		K: 'csvReaderSerial',							
		nrOfFields: 0,										

read: function(xhr) {								
if (debug) {debugger;}
	return this.readRecords(xhr.responseText);	
    },

readRecords: function(aL) {
		

		stack.add('in CSVReaderSerial start');
		stack.add(aL);

		var nrOfFields;
		var currRow;									
		var currRowArr;									
		var fieldName;
        var records = [];								
		var value;										
		var values;										

		aL = aL.split('\n');
var dZ = aL.length;						
        for (var rowCount = 0; rowCount < dZ; rowCount++) {	
			values = {};											
			currRow = aL[rowCount].trim();				
			if (!currRow.length) continue;
			currRowArr = currRow.split(c.sI);
			nrOfFields = currRowArr.length;
			for (var elemNr = 0; elemNr < nrOfFields; elemNr = elemNr+2) {
fieldName = dS(currRowArr[elemNr]+ ';^');
				value = dS(currRowArr[elemNr + 1]+ ';^');
values[fieldName] = value;
				} 
this.database.insert(values);
		}


return {
            success : true,
			records : records};		
    		} 
});		


Class("fJ", {
    has: {
        clas:					{is: "r"},			
		attributeDescriptors:	{is:"rw",			
								init: (new L)},
        clKeyDB:				{is: "r"}			
	},
classMethods: {

},

methods: {

initialize: function () {
		this.K = 'ecMAbstract';
	}

}
});

Class("ECModel",{isa: fJ,
	has: {
			lL:				{is:   "rw", init: new Date()},
			ff:				{is:   "rw"},
			ff:				{is:   "rw"}
	},
classMethods: {
	},

methods: {


nK: function(id,name){
		var instance = new DOMAElem;
		instance.Q = instance.eK(id,name);
		return instance;
	},

oE: function(id,name){
		var instance = new le;
		instance.Q = instance.eK(id,name);
		return instance;
	},

om: function(id,name){
		var instance = new ECLi;
		instance.Q = instance.eK(id,name);
		return instance;
	},


qn: function(){
		return '<div>';},
	qh: function(){
		return '</div>';}

	}
});

Class("ECConfig",{isa: fJ,
	has: {

	K:						{is: "rw", init: 'ecCfg'},			

tG:				{is: "rw", init: ','},				
	tP:				{is: "rw", init: 50},				
	areaAllShapes:				{is: "rw", init: []},

	cC:				{is: "rw", init: ' '},				
	sI:			{is: "rw", init: '^'},				
	fileExtForHTML:				{is: "rw", init: '.html'},			

	pJ:	{is: "rw", init: ':'},				
	fE:			{is: "rw", init: ' / '},			
	isRT:						{is: "rw", init: false},			
	rN:				{is: "rw", init: 'xxxxxxxx'},
	ey:				{is: "rw", init: 'pppp'},
	ra:			{is: "rw", init: ','},
	lk:		{is: "rw", init: '^'},				
	uY:					{is: "rw", init: true},				
	of:				{is: "rw", init: 'none'},			
	yA:			{is: "rw", init: false},			

toolTipDelimiter:			{is: "rw", init: '|'},				

	testOn:						{is: "rw", init: false},			
	pA:				{is: "rw", 
								init: (new L)},	
	urlParms:					{is: "rw", init: []},				
	bT:			{is: "rw", init: 0},				

	eJ:					{is: "rw", init: 25},			
	tK:			{is: "rw", init: 10},			
	xa:			{is: "rw", init: 50},			
	dN:				{is: "rw", init: 2000},			
	dI:				{is: "rw", init: 20},			

c20000: {is: "rw"},			
	c20010: {is: "rw"},			
	c20011: {is: "rw"},			
	c20020: {is: "rw"},			
	c20030: {is: "r", init: 'catalogs'},		
	c20031: {is: "r", init: 'png'},				
	c20032: {is: "r", init: 'img'},				
	c20033: {is: "r", init: 'catalogsHtml'},	
	c20035: {is: "r", init: 'articles'},		
	c20036: {is: "r", init: 'data'},			
	c20038: {is: "r", init: 'html'},			

c20060: {is: "r", init: '_lg'},				
	c20061: {is: "r", init: '_exp'},			
	c20062: {is: "r", init: '_cat'},			
	c20063: {is: "r", init: '_pg'},				
	c20079: {is: "r"},							

	c20099: {is: "r", init: '/'},				

c21000: {is: "rw", init: 600},					
	c21050: {is: "rw", init: 400},					
													c21110: {is: "rw", init: false},				
	c21115: {is: "rw", init: false},				
	c21120: {is: "rw", init: false},				

	c21140: {is: "rw", init: false},				

c30050: {is: "rw", init: 250},					
	c30052: {is: "rw", init: 130},					
	c30054: {is: "rw", init: 600},					

c30070: {is: "rw", init: 150},					
	c30072: {is: "rw", init: 50},					
	c30074: {is: "rw", init: 400},					
	c30076: {is: "rw", init: 100},					

c30110: {is: "rw", init: false},				
	c30120: {is: "rw", init: true},					
	c30130: {is: "rw", init: true},					
	c30140: {is: "rw", init: '#pop'},				
	c30150: {is: "rw", init: 10},					

	c30200: {is: "r", init: 50},					
	c30210: {is: "r", init: 100},					
	c30220: {is: "r", init: 8000},					
	c30250: {is: "r", init: 1},						

c30260: {is: "r", init: 'mainTabHome'},			
	c30261: {is: "r", init: 'mainTabContent'},		
	c30262: {is: "r", init: 'mainTabDetails'},		

c30270: {is: "rw", init: 1},					
	c30272: {is: "rw", init: 1},					
	c30274: {is: "rw", init: 1},					
	c30275: {is: "rw", init: '#ff0000'},			
	c30276: {is: "rw", init: 1},					
	c30277: {is: "rw", init: 0.0135},				

	c30280: {is: "rw", init: 1},					
	c30282: {is: "rw", init: 1},					
	c30285: {is: "rw", init: '#ffff00'},			

c30300: {is: "rw", init: 0},					
	c30305: {is: "rw", init: 0},					
	c30310: {is: "rw", init: 34},					
	c30320: {is: "rw", init: 34},					
	c30325: {is: "rw", init: 50},					
	c30330: {is: "r", init: 30},					
	c30331: {is: "r", init: 62},					

	c30335: {is: "r", init: 100},					
	c30336: {is: "r", init: 30},					

	c30340: {is: "rw", init: 0},					
	c30347: {is: "rw", init: 30},					
	c30349: {is: "rw", init: 74},					

c30410: {is: "rw", init: 1},					
	c30411: {is: "rw", init: 1},					
	c30412: {is: "rw", init: 1},					
	c30413: {is: "rw", init: 1},					
	c30414: {is: "rw", init: 1},					
	c30415: {is: "rw", init: 1},					
	c30416: {is: "rw", init: 1},					
	c30417: {is: "rw", init: 1},					
	c30418: {is: "rw", init: 1},					
	c30419: {is: "rw", init: 1},					
	c30420: {is: "rw", init: 1},					

	c30425: {is: "rw", init: 1},					

c30431: {is: "rw", init: 400},					
	c30432: {is: "rw", init: 500},					
	c30433: {is: "rw", init: 100},					
	c30434: {is: "rw", init: 50},					
	c30435: {is: "rw", init: 600},					

c30460: {is: "rw", init: 1},						
	c30464: {is: "rw", init: 'ECEnquiryInfo.html'},	

c30475: {is: "rw", init: 1},						
	c30476: {is: "rw", init: 700},					
	c30477: {is: "rw", init: 500},					
	c30478: {is: "rw", init: 250},					
	c30479: {is: "rw", init: 100},					

c30480: {is: "rw", init: 700},					
	c30481: {is: "rw", init: 500},					
	c30483: {is: "rw", init: 250},					
	c30484: {is: "rw", init: 100},					

c30486: {is: "rw", init: 700},					
	c30487: {is: "rw", init: 500},					
	c30488: {is: "rw", init: 250},					
	c30489: {is: "rw", init: 100},					

c30495: {is: "rw", init: 1},						
	c30496: {is: "rw", init: 700},					
	c30497: {is: "rw", init: 500},					
	c30498: {is: "rw", init: 250},					
	c30499: {is: "rw", init: 100},					

c30510: {is: "rw", init: false},				
	c30520: {is: "rw", init: true},					
	c30530: {is: "rw", init: true},					
	c30540: {is: "rw", init: true},					
	c30550: {is: "rw", init: false},				
	c30560: {is: "rw", init: false},				
	c30570: {is: "rw", init: false},				


c30600: {is: "rw", init: true},					
	c30605: {is: "rw"},								

	c30610: {is: "rw", init: 700},					
	c30611: {is: "rw", init: 500},					
	c30613: {is: "rw", init: 50},						
	c30614: {is: "rw", init: 50},						
	c30615: {is: "rw", init: 800},					
	c30616: {is: "rw", init: 1200},					

	c30620: {is: "rw", init: 0},						

	c30630: {is: "rw", init: []},						
	c30631: {is: "rw", init: []},						
	c30632: {is: "rw", init: []},						

	c30633: {is: "rw", init: 'searchBasicTabResultXXX'},
	c30634: {is: "rw", init: 'searchResultPreviewHtmlPanelXXX'},
	c30635: {is: "rw", init: 'searchResultPreviewsTabPanelHolderXXX'},
	c30636: {is: "rw", init: 'searchFormTopTabResultXXX'},
	c30637: {is: "rw", init: 'searchBasicTabPanelResultHolderXXX'},
	c30639: {is: "rw", init: 'searchResultPreviewsTabPanelHolderInvisibleXXX'},
	c30640: {is: "rw", init: 'searchBasicTabPreviewsHolderXX'},
	c30641: {is: "rw", init: 'searchResultPanelHtmlXXX'},
	c30642: {is: "rw", init: 'searchResultMainDataTabHolderXXX'},

	c30645: {is: "rw", init: 10},						
	c30646: {is: "rw", init: 50},						

c30706: {is: "rw", init: 'ecCssIconsCat'},			
	c30708: {is: "rw", init: 'ecCssIconsPage'},			
	c30710: {is: "rw", init: 'ecCssPicGall'},			
	c30712: {is: "rw", init: 'ecCssPicLarge'},			

c30810: {is: "rw", init: ''},						
	c30820: {is: "rw", init: ''},						
	c30821: {is: "rw", init: ''},						
	c30822: {is: "rw", init: ''},						
	c30830: {is: "rw", init: ''},						
	c30831: {is: "rw", init: ''},						
	c30832: {is: "rw", init: ''},						

c30910: {is: "rw", init: 100},					

	c30975: {is: "rw", init: 100},					
	c30976: {is: "rw", init: 800},					
	c30977: {is: "rw", init: 600},					
	c30978: {is: "rw", init: 50},						
	c30979: {is: "rw", init: 50},						

c30920: {is: "rw"},			
	c30922: {is: "rw"},			
	c30925: {is: "rw"},			


c31010: {is: "rw", init: 'act31010'},
	c31020: {is: "rw", init: ''},
	c31030: {is: "rw", init: ''},
	c31040: {is: "rw", init: ''},
	c31050: {is: "rw", init: ''},
	c31060: {is: "rw", init: ''},
	c31070: {is: "rw", init: ''},
c32010: {is: "rw", init: ''},						
	c32020: {is: "rw", init: ''},						
	c32030: {is: "rw", init: ''},						
	c32040: {is: "rw", init: ''},						
c33010: {is: "rw", init: ''},						
	c33020: {is: "rw", init: ''},						
	c33030: {is: "rw", init: ''},						
	c33040: {is: "rw", init: ''},						
c34010: {is: "rw", init: 'http://www.elehelp.com'},
	c34020: {is: "rw", init: ''},
	c34030: {is: "rw", init: ''},
	c34040: {is: "rw", init: ''},
c38010: {is: "rw", init: ''},
	c38020: {is: "rw", init: ''},
	c38030: {is: "rw", init: ''},
c39010: {is: "rw", init: ''},
	c39020: {is: "rw", init: ''},
	c39030: {is: "rw", init: ''},
	c39040: {is: "rw", init: ''},
	c39090: {is: "rw", init: true},		

c40010: {is: "rw", init: ''},
	c40020: {is: "rw", init: ''},
	c40030: {is: "rw", init: ''},
	c40040: {is: "rw", init: ''},
	c40050: {is: "rw", init: ''},
	c40060: {is: "rw", init: ''},

c40100: {is: "rw", init: 'info/ElecatInfoBrowserXX_YYY_ZZ.html'},
	c40101: {is: "rw", init: 'info/ElecatInfoBrowserInfo_ZZ.html'},
	c40102: {is: "rw", init: 'info/ElecatInfoVersionCurr_ZZ.html'},
	c40103: {is: "rw", init: 'info/ElecatInfoVersionNext_ZZ.html'},
	c40104: {is: "rw", init: 'info/ElecatInfoVersionNextServer_ZZ.html'},
	c40105: {is: "rw", init: 'info/ElecatInfoUserExpertise_ZZ.html'},
	c40106: {is: "rw", init: 'info/ElecatInfoMissingData_ZZ.html'},
	c40107: {is: "rw", init: 'info/ElecatInfoRequestedPage_ZZ.html'},

	c40110: {is: "rw", init: 'info/ElecatWelcomeHomePage_ZZ.html'},

c53010: {is: "rw", init: true},				
c51620: {is: "rw", init: true},				

																			c31000: {is: "rw", init: true},					
	c51600: {is: "rw", init: true},					

	yf:	{is: "rw"},					
	ye:	{is: "rw"},				

qf:		{is: "rw"},	
	sk:	{is: "rw"},	
	qe:	{is: "rw"},	
	qa:	{is: "rw"},	
ld:		{is: "rw"},		

ei:		{is: "rw"},	
pZ:		{is: "rw"},
	lh:		{is: "rw"},
	en:	{is: "rw"},
	lj:		{is: "rw"},
formSizeX:					{is: "rw", init: 500},
	formSizeY:					{is: "rw", init: 700}

	},

	methods: {

initialize: function(){
		this.testOn = true;
		this.mj = true;
		this.areaAllShapes['r'] = 'rect';
		this.areaAllShapes['c'] = 'circle';
		this.areaAllShapes['p'] = 'poly';
		this.areaAllShapes['t'] = 'point';			

var url		= 'http://' + ecUrlHost;
var pos = ecUrlPathname.substr(1,ecUrlPathname.length).indexOf('/');
		var urlSub = ecUrlPathname.substr(0,pos+2);
this.c20000 = url;							
		this.c20010 = urlSub;						
		this.c20011 = ecUrlPathname.substr(1,pos+1);
		this.c20020 = this.c20000 + urlSub;			
		this.c20021 = this.c20020 + 'info/';		
		this.c30920 = urlSub + 'vplay/';			
		this.c30922 = this.c20000 + urlSub + 'vplay/flowplayer-3.1.5.swf';	
		this.c30925 = urlSub + 'vdata/';			

		this.c20079 = new Array(5);
this.c20079[0] = this.c20060;
		this.c20079[1] = this.c20061;
		this.c20079[2] = this.c20062;
		this.c20079[3] = this.c20063;
		
		if(E.isIE || E.isOpera) {this.c30340 = 0;}	
		this.wL();
		this.wO();
		this.gi();		
		this.initializeLanguageFiles();	
		this.wx();	

E.BLANK_IMAGE_URL = '../images/default/s.gif';
	},

	wO: function(){
		if(!E.isOpera) {return;}
		this.c30331 = 78;							
		this.c30349 = 78;							
	},

	wL: function(){
		if(!E.isIE) {return;}
		this.c30277 = 0;							
		this.c30336 = 100;							
	},


	gi: function(){
this.c30605 = this.c20000 + '/cgi-bin/search.cgi?search';

this.c38010 = 'http://www.elehelp.com';
		this.c38020 = this.c38010 + '/ElecatReader/index.html';
		this.c38030 = this.c38010 + '/ElecatGenerator/index.html';
this.c39010 = this.c20021 + 'ReaderCurrWebsite_ZZ';
		this.c39020 = this.c20021 + 'ReaderCurrPublisher_ZZ';
		this.c39030 = this.c20021 + 'ReaderCurrCatalog_ZZ';
		this.c39040 = 'http://www.elecat.com';

this.qf =		'ElecatSystem.ini';			
this.initializeLanguageTranslation(t.languageForUI);			
		this.qe = 	'ElecatCatalogs.csv';		
		this.qa =	'ElecatCompanies.csv';		
this.ld =		'ElecatPages_zaaaaabi.csv';		
this.ei =			'ElecatCatalog_xxxxxxxx.ini';	
this.pZ =			'ElecatPage_xxxxxxxx_pppp.csv';
	this.lh =			'ElecatPage_xxxxxxxx_pppp.jpg';
	this.en =		'ElecatPages_xxxxxxxx.csv';
	this.lj =			'ElecatIcon_xxxxxxxx_pppp.jpg';

	},

	initializeLanguageFiles: function(){
		this.c39010 = this.gK(this.c39010);
		this.c39020 = this.gK(this.c39020);
		this.c39030 = this.gK(this.c39030);
	},

	initializeLanguageTranslation: function(arg){
		this.sk =		'ECTranslationsZZ.ini'.replace('ZZ',arg);
	},

wx: function(){								
this.c30630 = [this.c20033 + '*', this.c20035 + '*'];		
		this.c30631 = [this.c20033 + '*'];							
		this.c30632 = [this.c20035 + '*'];							
	},


uy: function(arg){
		return t.hb(arg);
},

bA: function(arg){
if(true) {return true;}  
		var r = eval('this.c' + arg);
		if(F(r)) {a.ecErr('gu');}
		return r;
	},

ae: function(arg){
if(arg == 32000)	{return false;}				
	if(arg == 31050)	{return false;}				
													if(true) {return true;}  
	var r = eval('this.c' + arg);
	if(G(r)) {a.ecErr('gu');}

		return r;
	},

isUserModeAdvanced: function(){
		return (this.bT == 1);
	},

isUserModeExpert: function(){
		return (this.bT == 2);
	},


isRelase01: function(){
		return (this.c21000 == 600);
	},

tx: function(){
		return a.io['sysIniStore'];
	},

xE: function(){
		return a.io['sysTransStore']; 
	},

getC40110: function(){
		return this.fileNameInLanguage(this.c40110);
	},

fI: function(){
		return [
				[0, 'en-English'], 
				[1, 'de-Deutsch']
					];
	},

hq: function(){
		return [
				[0, t.jF], 
				[1, t.jH],
				[2, t.jJ] 
					];
	},

mG: function(code){
		var codes = this.fI();
		var curr;
		for (i=0;i < codes.length;i++)
			{curr = codes[i][1];
			if(curr.substr(0,2) == code) {return curr;}
		}
		return this.cC;
	},

uI: function(){
		var val = c.bT;
		var codes = this.hq();
		return codes[val][1];
	},

uX: function(arg){
		var all = this.fI();
		var g = arg.substr(0,2).toLowerCase();
		if(g.length !== 2) {return false;}
		var curr, i;
		for (i=0; i < all.length; i++ )
			{curr = all[i];
			if(curr[1].substr(0,2) == g) {return true;}
		} 
	return false;
	},


isUrlRequestForPage: function(arg){
		return (ecLanguageRequested.substr(0,1) == '_');
	},

isUrlRequestForLanguageAndExpertMode: function(arg){
debugger; 
		return (ecLanguageRequested.substr(0,1) == '_');
	},

wY: function(aWinName){
		var r = this.tA(aWinName);
		this.pA.cV(aWinName, r + 1);
	},

tA: function(aWinName){
		var r = this.pA.at(aWinName);
		if (F(r)) {r = 0;}
		return r;
	},




ek: function(arg){
		return this.c20010 + this.c20030 + '/' + arg;
},

	bz: function(P, pageID){
		return this.c20010 + this.c20030 + '/' + P + '/'+ pageID;
},

	kP: function(P, picId){
		return this.c20010 + this.c20030 + '/' + P + '/pics/'+ picId;
},

	nh: function(arg){
		return this.c20010 + c.c20036 + c.c20099 + arg;
	},

ng: function(arg){
		return 'icons/' + arg;
	},


fN: function(arg, ap){

		var r = arg.replace(this.rN,ap);
		return r;
	},

	gk: function(arg, ap, pageNr){
		var gc = this.fN(arg, ap);
		var pageStr = this.pa(pageNr, this.ey.length);
		var r = gc.replace(this.ey,pageStr);
		return r;
	},

sS: function(sequence, browserCode){
		var fileName = c.c40100;

		fileName = fileName.replace('XX',sequence);
		fileName = fileName.replace('YYY',browserCode);
		fileName = fileName.replace('ZZ',t.languageForUI);
		return fileName;
	},

	so: function(ap, pageNr){
		var gc = this.fN(this.lj, ap);
		var pageStr = this.pa(pageNr, this.ey.length);
		var r = gc.replace(this.ey,pageStr);
		return r;
	},

	si: function(ap){
		return this.fN(this.ei, ap);
	},

	sj: function(ap){
		return this.fN(this.en, ap);
	},

	ep: function(ap, pageNr){
		return this.gk(this.pZ, ap, pageNr);
	},

	bP: function(ap, pageNr){
		return c.c20032 + c.c20099 + this.gk(this.lh, ap, pageNr);
	},

dC: function(ap, pageNr){
		var r = this.gk(this.lh, ap, pageNr);
	return this.c20031 + this.c20099 + r.replace('.jpg','.png');
	},

sp: function(ap, arg){
		return this.ek(ap) + c.c20099 + c.c20038 + c.c20099 + this.fileNameInLanguage(arg);
	},

pB: function(fW){
		var g;
		var r = [];
		var dot = fW.indexOf('.');
		if(dot < 1)
			{g = fW;}
			else{g = fW.substr(0,dot-1);}
		var pos = g.indexOf('_');
		if(pos < 1) 
			{r[1] = g;
			return r;}
		r[1] = g.substr(0,pos);
		var lC = g.substr(pos+1,g.length);
		r[2] = parseInt(lC,10);
pos = lC.indexOf('_');
		if(pos < 1) {return r;}
		var tO = lC.substr(pos+1,g.length);
		r[3] = parseInt(tO,10);
		return r;
	},


xs: function(arg, ap){
		return this.ek(ap) + c.c20099 + c.c20038 + c.c20099 + arg;
	},

cd: function(T){
		return 'clickables_' + T;
	},

	vy: function(){
		return 'galleryDiv';
	},

vs: function(T){
		return '#'+this.cd(T);
	},

	jQ: function(T){
		var cO = this.hp(T);	
		var name = this.mD(cO);
		return name;
	},

hp: function(T){
		var name = 'container_'+T;		
		return name;
		},

mD: function(aTabName){
		var name = aTabName+'_imageObj';
		return name;
		},
	
vD: function(aName){
		return aName + this.fileExtForHTML;
		},

aN: function(cfgVar, number){
		var name = eval('this.'+ cfgVar);
		if(number !== c.cC) 
			{return name.replace('XXX', number);}
	return name + '-gen-' + this.rnd(9);
		},

mS: function(arg){
		var size = arg.length;
		var pos = size - 3;
		if(arg.substr(size-2,1) > '9') {pos = size - 2;}
		if(arg.substr(size-3,1) > '9') {pos = size - 1;}
		var number = arg.substr(pos,size - pos);
		return number * 1;
		},

gK: function(aName){
		return aName.replace('ZZ',t.languageForUI) + this.fileExtForHTML;
	},

fileNameInLanguage: function(aName){
		return aName.replace('ZZ',t.languageForUI);
	},

nameForTBItemButton: function(o, C){
		return o + '_' + C;
		},


catalogAndPageFromUrl: function(anUrl){
		var args = anUrl.split('_');
		var g = args[args.length-1];
		var args1 = g.split('.');
		return [args[1],c.parseInt(args1[0])];
		},

parseInt: function(arg){
		if(this.isString(arg)) {return parseInt(arg,10);}
		return arg;
	},

pageStack: function(ay,aSymbol){

		},
	

uD: function(){

		this.gD();					
		a.gD();					

	},

pa: function(num, rK){
		var numZeropad = num + '';
		while(numZeropad.length < rK) {
			numZeropad = "0" + numZeropad;
			}
		return numZeropad;
		},

gD: function(){
		var ai = this.tx();
		tc.jL('tg', ai);							
		var dZ = ai.getCount();
		if(G(ai)) {a.ecErr('ecErr0121');}
		for (var i = 0, item; item = ai.getAt(i); i++) {	
			var key = item.get('key');
			var value = item.get('value');
		switch(key) {
	case 'nop':	break;									
			case 'cfg1': this.rY(value); break;		
			default: bC('c.', key, value); break;
			} 
		} 
	this.of = 'readIn';								
	this.vX();							

	},

vX: function(){
		a.lT = this.c30810;					
		a.dF = this.c30820;					
		a.df	 = this.c30830;					
	},

uW: function(){
		if(G(this.c30820)) {return false;}
		if(G(this.c30830)) {return false;}
		if(!this.of == 'readIn') {return false;}
		return true;
	},

rY: function(argStr){
		var size = argStr.length;
		var key, val, value;
		for (i=0;i < size + 1;i=i+5 ){
			key = argStr.substr(i,4);
			val = argStr.substr(i+4,1);
			value = true;
			if(val == 1) {value = false;}
			bC('c.c', key*10, value);
}
	},


rV: function(arg){
		var args, P, i, max, o, o1, pageNr, tmp;
		var r = Array(5);
		o = arg.indexOf('?');
		if(G(o)) {return;}
		args = arg.substr(o+1).split('&');
max = args.length;
		for (i=0;i < max ;i++ ) {
			o = args[i].split('=');
			if(o.length == 2) {
				o1 = o[0];
				tmp = [o[0], o[1]];
				r[i] = tmp;}	
		} 
max = r.length;
		for (i=0;i < max +1 ;i++ ) {
			o = r[i];
if(!F(o)) {
				if(o[0] == c.c20060) {
						ecLanguageRequested = o[1];
						t.languageForUI = o[1];}
				if(o[0] == c.c20061) {c.bT = c.parseInt(o[1]);}
				if(o[0] == c.c20062) {P = o[1];}
				if(o[0] == c.c20063) {pageNr = c.parseInt(o[1]);}
			} 
		if(!F(P) || !F(pageNr))
			{ecInitialData = ['#initialCatPage', P, pageNr];}
		} 
},

rnd: function(arg){
		return Math.floor(Math.random() * (Math.pow(10, arg)));
		},

wV: function(){
		this.c30300 = 0;
		return;
		},

wQ: function(aRow){
		var pos = (aRow -1) * this.c30320;
		this.c30300 = aRow;
		this.c30305 = pos;							
		return pos;
		},

bq: function(){
		this.c30300 = (this.c30300 +1);				
		return this.cw();
		},

cw: function(){
		var pos = (this.c30300 -1) * this.c30320;	
		this.c30305 = pos;							
		return pos;
		},

dG: function(){
		this.c30300 = (this.c30300 +1);			
	var pos = this.c30305 + this.c30325;	
		this.c30305 = pos;						
		return pos;
		},

wn: function(arg){
		var r = eval('this.'+arg);
		if(G(r)) {return false;}
		if(r == 1) {return true;}

		return false;
	},

	bM: function(arg){
		var r = eval('this.'+arg);
		if(G(r)) {return true;}
		if(r == 1) {return false;}

		return false;
	},

isString: function (arg) { 
    if(typeof arg == "string") {return true;}
    return false;
},

tQ: function(bc){

		if(bc) {return 1;}	
		return 0;					
	},

lb: function(id){
		var me = document.getElementById(id);
		if(F(me)) {return;}
		while (me.hasChildNodes())
			{if(me.firstChild !== null)
				{me.removeChild(me.firstChild);}
			else{break;}} 
		me.parentNode.removeChild(me);
		return;
	},

qk: function(){
		while (this.ml())
			{this.ml();} 
	},

ml: function(){
		var me = document.body.firstChild;
		if(!me.yS) {return false;}
		if(me.id == 'history' || me.id == 'history-form' || me.id == 'x-history-frame') {return false;}
document.body.removeChild(me);
		return true;
	},


trim: function(g, chars) {
		return this.trimLeft(this.trimRight(g, chars), chars);
	},
 
	trimLeft: function(g, chars) {
		chars = chars || "\\s";
		return g.replace(new RegExp("^[" + chars + "]+", "g"), "");
	},
 
	trimRight: function(g, chars) {
		chars = chars || "\\s";
		return g.replace(new RegExp("[" + chars + "]+$", "g"), "");
	},

htmlEncoded: function(g) {
	var aRegExp;
	var aChars = new Array ('&','','','','','','','','','','',
                         '','','','','','','','','','','',
                         '','','','','','','','','','','',
                         '','','','','','','','','','','',
                         '','','','','','','','','','','',
                         '','','','','','','','','\"','','<',
                         '>','','','','','','','','','','',
                         '','','','','','','','','','','',
                         '','','','','','','','');

  var aCharsEncoded = new Array ('amp','agrave','aacute','acirc','atilde','auml','aring','aelig','ccedil','egrave','eacute',
							'ecirc','euml','igrave','iacute','icirc','iuml','eth','ntilde','ograve','oacute','ocirc',
							'otilde','ouml','oslash','ugrave','uacute','ucirc','uuml','yacute','thorn','yuml','Agrave',
							'Aacute','Acirc','Atilde','Auml','Aring','AElig','Ccedil','Egrave','Eacute','Ecirc','Euml',
							'Igrave','Iacute','Icirc','Iuml','ETH','Ntilde','Ograve','Oacute','Ocirc','Otilde','Ouml',
							'Oslash','Ugrave','Uacute','Ucirc','Uuml','Yacute','THORN','euro','quot','szlig','lt',
							'gt','cent','pound','curren','yen','brvbar','sect','uml','copy','ordf','laquo',
							'not','shy','reg','macr','deg','plusmn','sup2','sup3','acute','micro','para',
							'middot','cedil','sup1','ordm','raquo','frac14','frac12','frac34');

  var aString = g;
for (var i = 0; i < aChars.length; i++)
	{
		aRegExp = new RegExp();
		aRegExp.compile(aChars[i],'g');
		aString = aString.replace(aRegExp, '&' + aCharsEncoded[i] + ';');
  }
  return aString;
}


}
		});
c = new ECConfig;								
	c.rV(ecUrlText);
	t.wA();


au.prototype.wv = function(){

	var tr1 = this.tr1;
	var tr2 = this.tr2;
	var tr3 = this.tr3;
	var trH3a = this.trH3a;
	var trH3z = this.trH3z;
t.uG			= tr1 + 	t.hO			+ tr2 + 	t.hP + tr3;
	t.oK		= tr1 + 	t.fV			+ tr2 + 	t.hW + tr3;
	t.oQ	= tr1 + 	t.hS	+ tr2 + 	t.hQ + tr3;
	t.oN	= tr1 + 	t.ig	+ tr2 + 	t.hR + tr3;
t.elAccPagesCompanies	= tr1 + t.hZ		+ tr2 + t.ij + tr3;
	t.elAccCatalogs			= tr1 + t.ik		+ tr2 + t.ih + tr3;
	t.elAccPagesTitles		= tr1 + t.hA	+ tr2 + t.ib + tr3;
	t.elAccPagesIcons		= tr1 + t.ic		+ tr2 + t.ia + tr3;
	t.elAccSettings			= tr1 + t.hD		+ tr2 + t.hB + tr3;
	t.elAccBasket			= tr1 + t.fV			+ tr2 + t.ie + tr3;

	t.elToolsTitle = '<b>'+ t.iM + tr3;		

	t.elVPortTitleNorth	= tr1 + t.jf		+ tr2 + trH3a + t.jh + trH3z;
	t.elVPortTitleWest		= tr1 + t.jk		+ tr2 + t.ji + tr3;
	t.elVPortTitleSouth	= tr1 + t.tS		+ tr2 + t.jj + tr3;
	t.elAccLoading			= t.hY;
	};

	t.wv();

Class("cs", {isa: ECModel,
    has: {
		area:						{is:"rw"},			
		attributes:					{is: "rw",			
									init: (new L)},
        driverNr:					{is: "rw"},			
        K:						{is: "r"},			
        keys:						{is: "r", init: []},
		C:						{is: "rw"},			
		tabName:					{is: "rw"},			
		H:						{is: "rw"},			
		mainWindow:					{is: "rw"},			
		aT:			{	is:"rw",			
									init: (new Array)},
		formPosX:					{is: "rw"},			
        formPosY:					{is: "rw"},			
		formSizeX:					{is: "rw"},			
        formSizeY:					{is: "rw"},			
        formTitle:					{is: "rw"}			
	},
	methods: {

aP: function (J) {
			this.cf(J);
},

bv: function (formPosX, formPosY, formSizeX, formSizeY) {
		this.aT['formPosX']  = formPosX;
		this.aT['formPosY']  = formPosY;
		this.aT['formSizeX'] = formSizeX;
		this.aT['formSizeY'] = formSizeY;
		this.rs();
	},

cf: function (arg) {
		this.area = arg;
	},

rs: function () {
		this.formPosX = eval('c.'+this.aT['formPosX']);
		this.formPosY = eval('c.'+this.aT['formPosY']);
		this.formSizeX = eval('c.'+this.aT['formSizeX']);
		this.formSizeY = eval('c.'+this.aT['formSizeY']);
	},

cU: function (obj,width,height) {
		if(G(this.driver)) {return;}
		if(!obj.isVisible()) {return;}
if(F(width)) {return;}
		if(F(height)) {return;}
		if(width < 100) {debugger; width = 100;}
		if(height < 60) {debugger; height = 60;}
		this.formSizeX = width;
		this.formSizeY = height;
		eval('c.'+this.driver.aT['formSizeX'] + '=width');
		eval('c.'+this.driver.aT['formSizeY'] + '=height');
		return;
	},

setPosWindow: function (obj,x,y) {
		if(G(this.driver)) {return;}
		if(!obj.isVisible()) {return;}
		this.formPosX = x;
		this.formPosY = y;
		eval('c.'+this.driver.aT['formPosX'] + '=x');
		eval('c.'+this.driver.aT['formPosY'] + '=y');
		return;
	},

getWindowTitle: function(){
		return this.formTitle;
	},

ce: function(arg){
		this.formTitle = arg;
	},


setMainWindow: function(mainWindow){
		mainWindow.driver = this;
		this.mainWindow = mainWindow;
	},

getMainWindowClose: function(){
	if(!G(this.mainWindow))
			{this.mainWindow.close();}
	},

um: function (aS) {
			this.rz(aS);
	},

uo: function (aS) {
		var driver = E.getCmp(aS).driver;
		var accessor = 'driver.'+aS+'()';
		eval(accessor);
	},

rz: function (aS) {
		var accessor = 'this.'+aS+'()';
		eval(accessor);
	},


lN: function (aS) {
		if(aS == 'cY')
			{return this.lX(aS);}
		var r = eval('t.' + aS);
		return r;
	},

rA: function (aS) {
return eval('t.m'+aS);
	},

am: function(id){
		var receiver = this;
		var myText = this.lN(id);
		var tip = this.rA(id);
		if(c.isUserModeExpert()) {tip = null;}
		var config = {
				xtype: 'button',
				driver: this,					
				text: myText,
				tooltip: tip,
				id: c.nameForTBItemButton(id, this.C),
				iconCls: 'add16',
				handler: function (){receiver.um(id);}
			};
		return config;
	},


qB: function(id, booleanVal){
		var receiver = this;
		var myText = this.lN(id);
		var config = {
				xtype: 'checkbox',
				checked: booleanVal,
				driver: this,					
				boxLabel: myText,
				id: id,
				handler: function (){receiver.uo(id);}
			};
		return config;
	},

aC: function (){
		a.closeTabAction(this.H);
		this.getMainWindowClose();
		a.gX();
	},

closeAction: function (driver){
		a.closeActionPopUp();
		a.setDriverInactive(driver);
	},

	menuNotYet: function (arg){
		var key = arg;
		if(G(arg)) {key = 'n_infoNextRelease';}	
		var text = eval('t.' + key);
		alert(text);
	},


iFrameAddOnClick: function(iFrame, me){
iFrame.getDoc().on('click', me.interceptLinks, me, 
										{stopEvent: true 
										});
	} 

	}
});




function bh(){
		this.K = 'ecCompany';					
	this.isCompEmpty = true;						
	this.companyId;								
		this.companyName;							
		this.companyNrOfCatalogs;					
		this.companyNrOfPages;						
		this.Languages;								
		this.Country;								
		this.CatalogIds;							

	this.companyIni = new Array();				

	}

bh.prototype.initialize = function(){
};

bh.prototype.qR = function(aRecord){
		this.setCompanyId(aRecord.get('companyId'));
		this.companyName			= aRecord.get('Company');
		this.companyId				= aRecord.get('Company');
		this.companyName			= aRecord.get('Company');
		this.companyNrOfCatalogs	= aRecord.get('Catalogs');
		this.companyNrOfPages		= aRecord.get('Pages');
		this.Languages				= aRecord.get('Languages');
		this.Country				= aRecord.get('Country');
		this.CatalogIds				= aRecord.get('CatalogIds');
	};

bh.prototype.setCompanyId = function(nT){
		this.companyId				= nT;
		if(!F(nT)) {this.initialize();}
	};

bh.prototype.getCompanyIni = function(aKey){
		return this.companyIni[key];
	};

bh.prototype.pH = function(){
return su;
	};


bh.prototype.createStoreForNewInitialCompany = function(){
		this.su();
	};

bh.prototype.bl = function(){
		if(!this.isCompEmpty) {return this;}
		return this.xW();
		};



Class("DOMModel",{isa: ECModel,
	has: {
		sK:					{is:   "rw"},	
		Q:					{is:   "rw"},	
		cz:					{is:   "rw"},	
		objNr:					{is:   "rw",	
								init:	0}	
	},

	methods: {

	initialize: function(){
		this.clas = DOMModel;
		this.K = 'domModel';
		this.cz = 'nop';
		return this;
	},

eK: function(id,name){
		if(E.isIE) {
			if(!G(name)) 
				{return this.vA(id,name);}}
		var Q = document.createElement(this.cz);
		Q.id = id;
		Q.name = name;			
		return Q;
	},

vA: function(id,name){
var g = "<" + this.cz + " name=" + aa(name) + ">";
		var Q = document.createElement(g);
		Q.id = id;
		return Q;
	},

setDomOnConfig: function(rcv, onConfig){
var on = onConfig['on'];
		var out = onConfig['out'];
		var over = onConfig['over'];
if (!F(on))		{rcv.onclick = on;}
		if (!F(over))	{rcv.onmouseover = over;}
		if (!F(out))	{rcv.onmouseout = over;}
	},

	setDomCssClass: function(rcv, cssClassValue){
		if(!G(cssClassValue)) {return;}
		if(E.isIE)
			{this.Q.setAttribute('className', cssCls);}
			else{this.Q.setAttribute('class', cssCls);}
	}

}
		});
Class("DOMAElem",{isa: DOMModel,
	has: {
	},

	methods: {

	initialize: function(){
		this.clas = DOMAElem;
		this.K = 'domAElem';
		this.cz = 'a';
		return this;
	},

sL: function(domParent, id, cssCls, href, key, lang, name, style, tabIdx, friend, target, title, onConfig) {
this.Q			= this.nK(id).Q;
this.Q.href	= href;
if(!F(cssCls))	{this.Q.setAttribute('class', cssCls);}
if(!F(friend))	{this.Q.friend		= friend;}
		if(!F(key))		{this.Q.accesskey	= key;}
		if(!F(lang))	{this.Q.lang		= lang;}
		if(!F(name))	{this.Q.name		= name;}
if(!F(tabIdx))	{this.Q.tabindex	= tabIdx;}
		if(!F(target))	{this.Q.target		= target;}
		if(!F(title))	{this.Q.title		= title;}
if(!G(onConfig)) {this.setDomOnConfig(this.Q,onConfig);}
debugger;
		domParent.appendChild(this.Q);
		return this.Q;
	}

}
		});
Class("DOMMap",{isa: DOMModel,
	has: {
		vN:	{	is:   "rw"},	
		vS:	{	is:   "rw"},	
		cT:			{	is:   "rw"}		
	},

	methods: {

	initialize: function(){
		this.clas = DOMMap;
		this.K = 'comMap';
		this.cz = 'map';
		this.vN = this.qn() + this.vR();
		this.vS = this.hj() + this.qh();
		this.setObjNr();
		return this;
	},

	initializeMap: function(T){
		this.cT = c.cd();
	},

setObjNr: function(){
		this.objNr = Math.floor(Math.random() * 999999);
	},

sO: function(domParent, U, name){
	if(c.bM('c30270')) {return null;}
	this.Q			= this.eK(name, name);
	this.sK			= name;
	domParent.appendChild(this.Q);
	return this.Q;
	},

vw: function(arg){
		this.cT = aa(c.cd()+arg);
		return this.cT;
	},

	zf: function(arg){
		this.cT = aa(c.cd()+arg+'ID');
		return this.cT;
	},

	xe: function(arg){
		return this.fi() + this.ni() + this.tagName() + this.gP() + this.vw(arg) + '>';
	},

vR: function(){
		return this.fi() + this.ni() + this.tagName() + this.gP() + this.cT + '>';
	},

	ni: function(){
		return ' id=' + aa(this.objNr);
	},

	tagName: function(){
		return ' name';},
	gP: function(){
		return '=';},
	fi: function(){
		return '<map ';},
	hj: function(){
		return '</map>';}
}
		});
Class("le",{isa: DOMModel,
	methods: {

	initialize: function(){
		this.clas = le;
		this.K = 'ecImg';
		this.cz = 'img';
		return this;
	},

sM: function(domParent, id, alt, border, cssCls, height, src, useMap, width, click, over, out, onConfig) {
		this.Q			= this.oE(id).Q;
this.Q.alt		= alt;
		this.Q.height	= height;
		this.Q.src		= src;

if(!F(border))	{this.Q.name	= border;}
		if(!F(cssCls))	{this.Q.setAttribute('class', cssCls);}
		if(!F(useMap))	{this.Q.useMap	= useMap;}
		if(!F(width))	{this.Q.width	= width;}
if(!F(click))	{this.Q.onclick = click;}
if(!F(over))	{this.Q.onmouseover	= over;}
		if(!F(out))		{this.Q.onmouseout		= out;}
domParent.appendChild(this.Q);
		return this.Q;
	}

}
		});
Class("ECLi",{isa: DOMModel,
	methods: {

	initialize: function(){
		this.clas = ECLi;
		this.K = 'ecLi';
		this.cz = 'li';
		return this;
	},

xp: function(domParent, id, cssCls, style, title) {
this.Q			= this.om(id).Q;
if(!F(cssCls))	{this.Q.setAttribute('class', cssCls);}
		if(!F(style))	{this.Q.style	= style;}
		if(!F(title))	{this.Q.title	= title;}
		domParent.appendChild(this.Q);
		return this.Q;
	}

}
		});
Class("aW",{isa: ECModel,
	has: {
        K:					{is:   "r"},	
        as:					{is:   "r"},	
		objNr:					{is:   "rw",	
								init:	0},	
attributes:				{is:	"rw",	
								init: (new L)},
ownerObj:				{is:   "rw"},	

		he:				{is:   "rw"},	
        xR:				{is:   "rw"},	
	cD:			{is:   "rw"},	
        dL:	{is:   "rw",	
								init: (new Array())},
		fh:				{is:   "rw"},	
        hh:			{is:   "rw"},	

        dY:			{is:   "rw"},	
		da:			{is:   "rw"},	
		hf:		{is:   "rw"},	
		cv:		{is:   "rw"},	

		pb:			{is:   "rw"},	
		xK:			{is:   "rw"},	
		definitionId:			{is:   "rw"},	
        definitionObj:			{is:   "rw"},	
		
		cE:			{is:   "rw"},	
		areaAlt:				{is:   "rw"},	
		oV:			{is:   "rw",	
								init: 100},
		hk:				{is:   "rw",	
								init: aa('rect')},
		he:				{is:   "rw",	
								init: '_self'},
        aH:				{is: "rw"},		
        slideshowGroup:			{is: "rw"},		

definitionObj:			{is:   "rw"}	
	},

classMethods: {

	classTest: function(){
		return 'ClassTest';
	},

yc: function(){
		var obj = new aW;
		var g = obj.qn() + ' id=' +aa(c.vy());
		g = g + ' '+ ' display:' + aa('none');
		g = g + obj.qh();
		return g;
	}
},
	

	methods: {

	initialize: function(){
		this.clas = aW;
		this.K = 'ecArea';
		this.as = 'nop';					
		this.aH = new L;
	},

ew: function(item,owner){
		this.initialize();
		this.ownerObj = owner;
		this.objNr		= item.get('key');				
		this.gT(item);
		this.mH(item);
		this.rv(item);
		this.rx(item);
		this.mF(item);
		this.setFieldLocal(item);
		
		this.areaAlt = aa(c.cC);
		return this;
	},

gT: function(item){
		this.dY = item.get('value');
	},

mH: function(item){
		this.pb = item.get('f4');
	},

rv: function(item){
		this.wJ(item);
	},

rx: function(item){
		this.cv = item.get('f6');
	},

mF: function(item){
		this.cE = item.get('f7');
	},

setField7HtmlFileName: function(item){
		var o = item.get('f7');
		o = c.fileNameInLanguage(o);
		if(o.indexOf('/') >= 0)
			{this.cE = o; return;}
		this.cE = c.sp(this.ownerObj.aK, o);
	},

setFieldLocal: function(item){
	},

wJ: function(item){
		this.hh = item.get('f5');						
		this.fh = aa(this.hh);	
		this.cD = this.lu(this.hh,c.tG,true);
		return this;
	},

hg: function(){
		var o = tr.translateIfNeeded(this.cv);
		return aa(o);					
		},

tw: function(){
		if(G(this.da)) {this.da = '';}
		return this.da;
	},

xh: function(){
		if(G(this.hf)) {this.hf = '';}
		return this.hf;
	},

tq: function(){
		if(G(this.hk)) {this.hk = 'rect';}
		return this.hk;
	},

po: function(){
		this.definitionObj = this.ownerObj.aE.wi(this.definitionId);
		return this.definitionObj;
	},


bI: function(){
		var g = this.ownerObj.bI();
		g = g + '_' + this.objNr;
		return g;
	},

bB: function(){
		return this.cv;
	},

bO: function(){
		var g = t.ej + this.ownerObj.pageNr + c.fE;
		g = g + t.eh + this.ownerObj.gv() + c.fE;
		g = g + t.iC + this.bw();
		return g;
	},

gW: function(){
		var blank = ' ';
		this.da = blank;
		if(c.bM('c30270')) {return;}

		var g = this.fi();
		g = g + ' id=' + aa(this.objNr) + blank;		
		g = g + this.vP() + this.tq() + blank;
		g = g + this.qL()+ this.getCoordString(this.oV) + blank;
		g = g + this.cK() +blank;
		g = g + this.vK()+ this.he +blank;
		g = g + this.tagAlt()	+ this.areaAlt +blank;
		if(c.wn('c30272')) {
			g = g + this.pw(this.hg())+blank;
			g = g + this.py()+blank;
			}
		var tmp = this.hc();
		if(!G(tmp)) {g = g + tmp;}
		g = g + this.hj();
		this.da = g;
},
sR: function(domParent, U){
		if(c.bM('c30270')) {return;}
		var strTip = "Tip(" + this.hg() + ");";
		var bj = document.createElement("area");
		bj.id			= this.objNr;
		bj.shape		= "rect";							
		bj.coords		= this.getCoordString(U);
		bj.href		= "javascript:cl('" + this.objNr + "')";

if(!E.isIE7) {
			bj.setAttribute('onmouseover', strTip);
			bj.setAttribute('onmouseout', "UnTip()");
			bj.alt	= this.areaAlt;
			} 

if(E.isIE7)	{
bj.alt	= this.cv;	
			} 

		bj.target		= this.he;
		domParent.appendChild(bj);
	},



hc: function(){
		var aD = "javascript:cl('"+ this.objNr +"')";
		var g = " onclick=" + ab(aD);
		return g;
	},

rc: function(U){
		this.oV = U;
		this.rq(U);

		return this.getCoordString();
	},

getCoordString: function(){
		return this.fh;
	},

rq: function(U){
		var ar = this.ms(this.cD, U);
		this.fh = ar[0] +','+ ar[1] +','+ ar[2] +',' + ar[3];
		return this.fh;
	},
getCoordData: function(U){
		return this.ms(this.cD, U);
	},

ms: function(ar, U){
		this.dL[0] = this.fp(ar[0], U);
		this.dL[1] = this.fs(ar[1], U);
		this.dL[2] = this.fp(ar[2], U);
		this.dL[3] = this.fs(ar[3], U);
		return this.dL;
	},

	fp: function(val, U){
		var r = Math.round((val * U / 100),0);
		return r;
	},

fs: function(val, U){
		return Math.round(((val + (val * c.c30277)) * U / 100),0);
	},

	cK: function(){
		var g = this.fC();
var aD = "javascript:cl('"+ this.objNr +"')";
		g = g + ab(aD);
		return g; 
		},

to: function(){
		return this.fC() + ab("javascript:;"); 
		},

pw: function(aText){
		var g = this.vu();
		var aD = "Tip(" + aText + ");";
		g = g + ab(aD);
		return g; 
		},

py: function(){
		var g = this.vq();
		g = g + ab('UnTip();');
		return g;
		},

lu: function(data, stopchr, isNum){
	var r = [];
	var chr = data.slice(0, 1);
	var elemNr = 0;
	var M = '';
	for (var i = 0; i < data.length; i++) {
		chr = data.slice(i, i + 1);
		if(chr != stopchr)
			{M = M + chr;}
		else{
			r[elemNr] = this.pU(M, isNum);
			elemNr = elemNr + 1;
			M = '';}
	}
	r[elemNr] = this.pU(M, isNum);
	return r;
    },

pU: function(M, isNum){
		if(isNum) {return Number(M);}
		return M;
	},

yw: function(arg){
		if(isNum) {return Number(M);}
		return M;
	},

vP: function(){
		return 'shape=';},
	qL: function(){
		return 'coords=';},
	xf: function(){
		return 'title=';},
	fC: function(){
		return 'href=';},
	vK: function(){
		return 'target=';},
	tagAlt: function(){
		return 'alt=';},
	vu: function(){
		return 'onmouseover=';},
	vq: function(){
		return 'onmouseout=';},
	gP: function(){
		return '=';},
	fi: function(){
		return '<area ';},
		hj: function(){
		return '/>';},

fT: function(ag){
		var g = ' alt=';
debugger; 
		g = g + ab(ag.bB());
		return g;
	},

vk: function(){
		return true;
		},

mu: function(page){
return true;
		},

xz: function(){
		return (this.as == 'aart');},

yR: function(){
		return (this.as = 'apage');},

yQ: function(){
		return (this.as = 'atext');},

vl: function(){
		return (this.as == 'aimg');},

	uS: function(){
		return (this.as == 'aimgal');},

	uP: function(){
		return (this.as == 'aynh');},

	uQ: function(){
		return (this.as == 'aimgyt');},

	uU: function(){
		return (this.as == 'aimgvi');},

	bi: function(code){
		return (code == c.c30140);},

	yT: function(code){
		return (code == '#tab');},

bb: function(page){
		a.lY(this);
	},

xA: function(item){
		this.ru(this.bodyText);	
		return this;
	},

ru: function(g){
		this.isBodyTextIsHtmlFile = false;				
		if(G(g)) {return;}					
		var pos = g.lastIndexOf('.');					
		if(G(pos)) {return;}					
		var ext = g.substr(pos).toLowerCase();			
		if(ext == 'html' || ext == 'htm')				
			{this.isBodyTextIsHtmlFile = true;}
		return;
	},

xq: function(){
		if(this.isBodyTextIsHtmlFile)
			{return this.sy();}
		return this.sr();
	},

sr: function(){
		var g = this.vp();
		g = g + ab(this.titleText);
		g = g + this.gg();
		return g;
	},

	sy: function(){
		var g = this.vJ();
																			return g;
	},

gg: function(){
if(G(this.po())) {alert('Problem');debugger;}
		return this.po().getTipArguments();
	},

vp: function(){
		return 'Tip(';
	},
vJ: function(){
		return 'TagTopTip';
	}

}
		});
Class("lf",{isa: aW,
	methods: {

	initialize: function(){
		this.clas = lf;
		this.K = 'ecAreaArt';
		this.as = 'aart';
	},


bd: function(code){
		if(this.bi(code)) {return new pe;}		
		return new oF;		
	},

bb: function(area){
		a.lY(this);
	}


}
		});
Class("kU",{isa: aW,
	has: {
        test:					{is: "rw"}		
	},

	methods: {

	initialize: function(){
		this.clas = kU;
		this.K = 'ecAreaPage';
		this.as = 'apage';
	},


bb: function(area){
		var pageNr = this.dY;
		a.V().bV(pageNr);
	}


}
		});
Class("kV",{isa: aW,
	has: {
	},

	methods: {

	initialize: function(){
		this.clas = kV;
		this.K = 'ecAreaText';
		this.as = 'atext';
	},


mF: function(item){
		return this.setField7HtmlFileName(item);
},

bd: function(code){
		return new kT;
	},

bb: function(area){
		a.jO(this);
	},

cK: function(){
		return this.to();
		},

hc: function(){
debugger;   
		return g;
	}

}
		});
Class("dV",{isa: aW,						

classMethods: {

newWith: function(){
		var obj = new dV;
}

},

	methods: {

	initialize: function(){
		this.clas = dV;
		this.K = 'ecAreaImg';
		this.as = 'aimg';
		this.aH = new L;
	},

bd: function(code){
		if(this.bi(code)) {return new lc;}
		return new oI;	
	},

gT: function(item){
		this.aH.bo(item.get('value'));			
	},

mH: function(item){
		this.pb = item.get('f4');
	},

tw: function(){
		this.gW();
		return this.da;
	},

bw: function(){
		return this.aH.at(1);
	},

sT: function(){
		return c.kP(this.ownerObj.aE.P, this.bw());
	},

gH: function(){
		return this.ownerObj.bJ;
	},

hc: function(){
		return null;
	},

bb: function(){
		a.lE('#pop',this);
	},



nop: function(){}
	}
		});
Class("gf",{isa: dV,
	has: {

	},

classMethods: {

newWith: function(imageColl){
		var obj = new gf;
		obj.aH.addAll(imageColl);
		return obj;
	}

},

	
	methods: {

	initialize: function(){
		this.clas = gf;
		this.K = 'ecImgal';
		this.as = 'aimgal';
		this.aH = new L;
	},

gT: function(item){
		this.ry(item);						
	},

	setFieldLocal: function(item){
},



ry: function(item){
		var val = item.get('value');						
		var r = this.lu(val,c.toolTipDelimiter,false);
		this.aH.addAll(r);
		return;
	}

}
		});
Class("dQ",{isa: aW,

	methods: {
  
	initialize: function(){
		this.clas = dQ;
		this.K = 'ecAreaYNgeneric';
		this.as = 'ayngen';
		this.aH = new L;
	},

gW: function(){
	},


mF: function(item){
		return this.setField7HtmlFileName(item);
	},

bb: function(page){
		a.jO(this);
	},


drawAreaBoxesYN: function(cp){
		var H = a.V();
		var jg  = H.getGraphics();
		var aD = ' onmouseover="Tip(' + this.hg() + ')"';
		var dB = ' onmouseout="UnTip();"';
		var rj = this.du();
		var g = aD + dB + rj;
		var image = this.dY;
		var r = this.gh(H,cp,this.cD);
		var co = this.objNr.toString();
		jg.drawImage(image, r['x'], r['y'], r['x1'], r['y1'], g, co);
		jg.paint();		
	},

gh: function(H,pagePanelObj,coordArray){
		var offsetY = pagePanelObj.body.dom.scrollTop;
		var offsetX = pagePanelObj.body.dom.scrollLeft;
		
		var prOffset = c.c30340;
		var r = [];
		r['x']  = this.fO(coordArray[0],H) - offsetX;			
		r['y']  = this.fO(coordArray[1],H)+prOffset - offsetY;	
		r['x1'] = this.fO(coordArray[2]-coordArray[0],H);		
		r['y1'] = this.fO(coordArray[3]-coordArray[1],H);		
		return r;
	},

fO: function(val,H){
		var r = Math.round((val * H.bQ() / 100),0);
		return r;
	},

du: function(){
		return ' onclick="cl(this.id)"';
		},

mu: function(page){
		return false;
		}

}
		});
Class("ge",{isa: dQ,
	has: {

	},

classMethods: {

newWith: function(imageColl){
		var obj = new ge;
		obj.aH.addAll(imageColl);
		return obj;
	}

},
	
	methods: {

	initialize: function(){
		this.clas = ge;
		this.K = 'ecImgYT';
		this.as = 'aimgyt';
		this.aH = new L;
		this.slideshowGroup = 'hsYouTube';
	},

drawAreaBoxesYN: function(cp){
		var H = a.V();
		var jg  = H.getGraphics();
		var aD = ' onmouseover="Tip(' + this.hg() + ')"';
		var dB = ' onmouseout="UnTip();"';
		var jM =  this.cK();
		var lB = this.du();
													var strEnd = ' class=' + ab('highslide');
		var g = jM + lB + aD + dB + strEnd;
		var image = this.dY;
		var r = this.gh(H,cp,this.cD);
		var co = this.objNr.toString();
		jg.drawImage(image, r['x'], r['y'], r['x1'], r['y1'], g, co);
		jg.paint();		
	},

cK: function(){
		var g = this.fC();
		g = g + ab(this.ez());
		return g; 
	},

du: function(){
		return ' onclick="cl(this.id)"';
		},

ez: function(){
		var g  = 'http://www.youtube.com/v/' + this.cE;
		return g; 
	},

bb: function(page){
		alert(t.n_infoFinalRelease);					
},




}
		});
Class("gd",{isa: dQ,
	has: {

	},

classMethods: {

newWith: function(imageColl){
		var obj = new gd;
		obj.aH.addAll(imageColl);
return obj;
	}

},
	
	methods: {

	initialize: function(){
		this.clas = gd;
		this.K = 'ecImgYT';
		this.as = 'aimgyt';
		this.aH = new L;
},

bd: function(code){
		return new oP;		
	},

drawAreaBoxesYN: function(cp){
		var H = a.V();
		var jg  = H.getGraphics();
		var aD = ' onmouseover="Tip(' + this.hg() + ')"';
		var dB = ' onmouseout="UnTip();"';
		var jM =  this.cK();
		var lB = this.du();
		var strEnd = ' class=' + ab('highslide');
		var g = jM + lB + aD + dB + strEnd;
		var image = this.dY;
		var r = this.gh(H,cp,this.cD);
		var co = this.objNr.toString();
jg.drawImage(image, r['x'], r['y'], r['x1'], r['y1'], g, co);
		jg.paint();		
	},

cK: function(){
		var g = this.fC();
		g = g + ab(this.ez());
		return g; 
	},

du: function(){
		return ' onclick="cl(this.id)"';
		},

ez: function(){
		var g  = 'http://www.youtube.com/v/' + this.cE;
		return g; 
	},

bb: function(page){
		this.expandHtml();
	},

	expandHtml: function(){
var g = 'hs.htmlExpand(null,{src:' + aa(this.ez());
		g = g + ', slideshowGroup:' + aa('hsYouTube') + ', objectType: ' + aa('swf');
		g = g + ', objectWidth: 480, objectHeight: 385, width: 480, swfOptions: { params: { allowfullscreen:' + aa('true') + ' } },';
		g = g + ' maincontentText: '+ aa('You need to upgrade your Flash player') +' } );';
eval(g);
		return g;
	}


}
		});
Class("kW",{isa: dQ,
	methods: {
  
	initialize: function(){
		this.clas = kW;
		this.K = 'ecAreaYNh';
		this.as = 'aynh';
		this.aH = new L;
},

gW: function(){
	},

bb: function(page){
		a.jO(this);
	},
		
nop: function(){
	}
	}
		});
Class("ECToolTipDefinition",{isa: aW,
	has: {
        id:						{	is:   "rw"},		
        titleText:				{	is:   "rw"},		
		argumentsRaw:			{	is:   "rw"},		
		argumentsStr:			{	is:   "rw"},		
		bodyText:				{	is:   "rw"},		
        isBodyTextIsHtmlFile:	{	is:	"rw"}			
    },
	
    methods: {

	initialize: function(){
		this.clas = ECToolTipDefinition;
		this.K = 'ecTTipDef';
		this.as = 'ttd';
		this.aH = new L;
	},

	ww: function(item){
		this.argumentsRaw	= item.get('value');		
		var arguments = this.lu(this.argumentsRaw,c.toolTipDelimiter, false);
		for(i=0; i < arguments.length+1;i=i+2) {
			this.addAttributes(arguments[i],arguments[i+1] );
		}

		this.id = this.attributes.at('ID');
		return this;
	},

	addAttributes: function(keyStr, valStr){

		if(G(keyStr)) {return;}
		if(G(valStr)) {return;}
		var key = dS(keyStr + c.toolTipDelimiter).toUpperCase();
		var val = dS(valStr + c.toolTipDelimiter);
		if(key !== 'ID' && valStr.substr(0,1) == 's') 
				{val = aa(val);}
		this.attributes.cV(key, val);
	},

	getTipArguments: function(){
		if(G(this.argumentsStr)) {this.gg();}
		return this.argumentsStr;
	},

gg: function(){
		var delimiter = ',';				
		var loopKey;
		var g = c.cC;
		var arr = this.attributes.asJsArray();
		for(loopKey in arr){
										if(loopKey !== 'remove' && loopKey !== 'ID')			
				{g = g + delimiter + loopKey + delimiter + arr[loopKey];
				}
		}
		this.argumentsStr = g;
		return g;
	},

nop: function(){
	}
	}
		});
Class("ECLink",{isa: aW,

	methods: {

	initialize: function(){
		this.clas = ECLink;
		this.K = 'ecLink';
		this.as = 'alink';
		this.aH = new L;
	},
ew: function(item){
		this.linkNr		= item.get('key');			
this.linkType	= item.get('value');		
		this.linkTitle = item.get('f4');			
		this.linkTargetId = item.get('f5');			
return this;
	},
nop: function(){
	}
	}
		});



Class("ECMenuActions",{isa: cs,
	has: {
			aTabNrToLoad: {is: "rw"}						
	},

    methods: {

	initialize: function(){
	this.K = 'ecMenuActions';				
		this.menuActions = new Array();				
		this.menuPageRefs = new Array();			
		this.menuPageRefs['cl31010'] = 'uB';
		this.menuPageRefs['cl31020'] = 'uH';
		this.menuPageRefs['cl31030'] = 'uE';
		this.menuPageRefs['cl31040'] = 'uF';
		this.menuPageRefs['cl31050'] = 'tM';
		this.menuPageRefs['cl31060'] = 'tN';
		this.bv('c30431', 'c30432', 'c30433', 'c30434');
this.formSizeX = c.formSizeX;
		this.formSizeY = c.formSizeY;
	},

mCl: function(ba){
		var code = 'this.'+ba+'();';
		if(cH(ba))			
			{eval(code);}
	},
cl31010: function(){
		this.cF('cl31010');
	},

cl31020: function(){
		this.cF('cl31020');
	},

cl31030: function(){
		this.cF('cl31030');
	},

cl31040: function(){
		this.cF('cl31040');
	},

cl31050: function(){
		this.cF('cl31050');
	},

cl31060: function(){
		this.cF('cl31060');
	},

cl31070: function(){
		if(a.wl() < c.tP)
			{return t.aU('kr');}
		var resWereDrawn = a.V().drawAreaBoxes();
		if(!resWereDrawn) {return t.aU('kq');}
	},


cF: function(arg){
		a.checkSys();											
		var catalog = this.rZ();
		var accessor = this.menuPageRefs[arg];
 		var code = 'catalog.'+accessor+';';
		var pageNr = eval(code);
		if(isNaN(pageNr)) {pageNr = 1;}
		if(G(pageNr)) 
			{alert(t.ub);
			return false;}
		a.V().bV(pageNr);
		return true;
	},

rZ: function(){
		return a.V().tabCatalogObj;
	},


cl32010: function(){
		this.dg();
	},

cl32020: function(){
		this.dg();
	},

cl32030: function(){
		this.qp();
	},

cl33010: function(){
		a.dK('#pop',this.area,null,' ');
	},

cl33020: function(){
		this.dg();
	},

cl33030: function(){
		this.qp();
	},


cl34010: function(){
		this.dg();
	},

cl34020: function(){
		this.dg();
	},

cl34030: function(){
		a.dK('#pop',null,null,' ');
	},

cl34040: function(){
		this.dg();
	},

cl39090: function(){
		debug = true;
	},


mz: function(aGrid,aRow,anEvent){
		this.qv(aGrid,aRow,anEvent, false);
	},

my: function(aGrid,aRow,anEvent){
		this.qv(aGrid,aRow,anEvent, true);
	},

qv: function(anObj,aRow,anEvent, isDouble){
		var row = a.ui['pagesGrid'].selModel.last;
		var realRow = aRow + 1;				
		var H = a.V();
		if(isDouble) {H = a.bD(null,false);}
H.bV(realRow);
	},

cG: function(aGrid,aRow,anEvent){
return a.cG(aGrid,aRow,anEvent);
	},

ur: function(aGrid,aRow,anEvent){
		var H = a.bD(null,false);
		return a.cG(aGrid,aRow,anEvent);
	},

uq: function(aGrid,aRow,anEvent){
		return a.cG(aGrid,aRow,anEvent);
	},

uk: function(aGrid,aRow,anEvent){
		var H = a.bD(null,false);
		return a.cG(aGrid,aRow,anEvent);
	},

openAccordPageIcons: function(aGrid,aRow,anEvent){
		a.icp.ug(aGrid,aRow,anEvent, false);
	},

checkNotificationOnBrowser: function(){
		if(E.isGecko3)	{return true;}
		var site = "http://www.elecat.com";				
		if(E.isChrome){return this.bx('CHR',null);}
		if(E.isGecko2){return this.bx('FF2',null);}
		if(E.isIE6)	{return this.bx('IE6',site);}
		if(E.isIE7)	{return this.bx('IE7',null);}
		if(E.isIE8)	{return this.bx('IE8',null);}
		if(E.isOpera)	{return this.bx('OPR',null);}
		if(E.isSafari){return this.bx('SAF',null);}
		return this.bx('UNK',null);	
}, 


checkNotificationOnUrlParmsCatalog: function(T){
		this.cJ(t.hX, null, 
										c.fileNameInLanguage(c.c40107), 
										null, null, c.c30435,
							function(){men.userNotificationBrowserCloseOpenTab(T);});
	}, 

sq: function(){
		this.cJ(t.fK, c.c40106, null, null, null);
	},

	sm: function(){
		if(c.bT == 2) {return ;}
		men.cJ(t.fK, c.c40105, null, null, null, 600);
		return; 
	},

	qp: function(){
		this.cJ(t.dJ, c.c40104, null, null, null);
	},

	dg: function(){
		this.cJ(t.dJ, c.c40102, null, null, null);
	},

	xc: function(){
		this.cJ(t.dJ, c.c40103, null, null, null);
	},

bx: function(browser,url){
		this.cJ(t.hX, null, 
										c.sS(1,browser), 
										c.fileNameInLanguage(c.c40101), 
										url);
	},

ss: function(url){
		if(F(this.url)) {
				this.driver = null;
					return true;}
document.location = url;
return false;
	},

userNotificationBrowserCloseOpenTab: function(){
		a.aI(this.aTabNrToLoad).aO.show();
	},

cJ: function(title1, content1Code, content1, content2, url, width, argCloseFunc){
		if(!F(content1Code)) {
			content1 = c.fileNameInLanguage(content1Code);}

		if(G(width)) {width = this.formSizeX;}
		if(width < 200) {width = 200;}
		var items = [];
            items.push({
				id: 'userNoteTab1',
				xtype: 'panel',
				cls: 'info/ElecatInfo.css',			
				title: t.t_buttonNoteTab1,
				autoLoad: content1,
				autoScroll: true					
				});
		
		if (!F(content2)){
            items.push({
				id: 'userNoteTab2',
				xtype: 'panel',
				cls: 'info/ElecatInfo.css',			
				title: t.t_buttonNoteTab2,
				autoLoad: content2,
				autoScroll: true				
			});
        } 
this.bv('c30433', 'c30434', 'c30431', 'c30432');
		var driver = this;
		if(G(argCloseFunc))
			{argCloseFunc = function(){men.ss(url);};}
		var win = new E.Window({
			layout:'fit',
			title: title1,
			width: width,
			height: this.formSizeY,
			x: this.formPosX,
			y: this.formPosY,
			closeAction:'close',
			maximizable: true,
			plain: true,
			listeners: {move: driver.setPosWindow, 
						resize: driver.cU,
						close: argCloseFunc},
			items: new E.TabPanel({
				autoTabs:true,
				activeTab:0,
				deferredRender:false,
				border:false,
				items: items
                }),
				buttons: [{
					text: t.kE,
					handler: function(){
					win.close();
					}
				}]
			});
driver.url = url;			
		win.driver = driver;
win.show(this);
		return win;
	},

ls: function(){
		var fj = a.fF();
		if(!a.fF()) {return true;}
		var eW = a.bD();			
		eW.setIsFirstPageTabTo(true);
if(fj) {
			a.gz(a.newTabObjPage(true), c.c30821, c.c30831, false);
			a.gz(a.newTabObjPage(true), c.c30822, c.c30832, false);
			a.ec(null,c.c30820, c.c30830);
			a.wN();} 
this.openAccordPageIcons();
		return eW;
	},

mE: function(an){
		var grid = a.ui['pagesGrid'];
		if (!grid.isVisible()) {return;}
},

menuActionsStoreCsv: function(url){
		var myInst = this;
		this.pageStack('ECPage start dM ');		
	    this.yo['pgCsv'] = new E.data.Store({
		reader: new E.ux.CSVReader({
					idProperty:	'key',
					root: 'rows',
					fields: [{name: 'key'},
							{name: 'value'}]
	    }),
		storeId: url,
		autoLoad: true,
		url: url,
		listeners: {load: function(){
					myPage.gF();
					a.setJobReady('#dM->'+myInst.aK+'->#'+myInst.pageNr);				
					this.ls();
					}
		}	
    });
	this.pageStack('ECPage end   dM ');
	},


bC: function(anObject, ck, ba){
		var code = anObject+ck+'='+ba+';';
		if(cH(ba))				
			{eval(code);}
	}

}
		});
var men = new ECMenuActions();





Class("ECPage",{isa: ECModel,
	has: {

	pageNr:					{	is:   "rw"},	
		pageTitle:				{	is:   "rw"},	
		mb:			{	is:   "rw"},	
		pageImageContainerId:	{	is:   "rw"},	
		cp:	{	is:   "rw"},	
		rH:	{	is:   "rw"},	
		rO:	{	is:   "rw"},	
		bP:		{	is:   "r"},		
		ep:		{	is:   "r"},		
		dC:	{	is:   "r"},		
		yj:			{	is:   "rw"},	
		yk:		{	is:   "rw"},	
		lP:		{	is:   "rw"},	
		aK:			{	is:   "rw"},	
		aE:			{	is:   "rw"},	
		lg:		{	is:   "rw"},	
		yn:			{	is:   "rw"},	
		lm:			{	is:   "rw"},	
		fM:	{	is:   "rw"},	
pageCsv:				{	is:   "rw"},	
		yl:			{	is:   "rw"},	
		pageLanguages:			{	is:   "rw"},	
		pageDate:				{	is:   "rw"},	
		az:				{	is:   "rw"},	
		fc:			{	is:   "rw"},	
		bZ:				{	is:   "rw"},	
		bJ:			{	is:   "rw"},	
		lI:			{	is:   "rw",		
									init: false},
		eF:			{	is:   "rw",		
									init: false},
		lH:			{	is:   "rw",		
									init: false},
		storePageCsv:			{	is:   "rw"}		

},
	methods: {

	initialize: function(){
		this.pageCsv = new Array();
		this.az = new L();
		this.fc = new L();
		this.bZ = new L();
		this.bJ = new L();
	this.lm = c.c30210;
	this.lg = c.c30210;
	},

	gi: function(){
		var myId = this.aK;
		var myNr = this.pageNr;
		this.ep = c.ep(myId, myNr);
		this.bP = c.bP(myId, myNr);
		this.dC = c.dC(myId, myNr);
	},

qx: function(T){
		var newObj = new DOMMap;
		newObj.initialize();
		newObj.initializeMap(T);
		return newObj;
	},

newArea: function(aClass, anItem){
		var newObj = new aClass;
		return newObj.ew(anItem,this);
	},

za: function(anItem){
		var newObj = new ECLink;
		return newObj.ew(anItem);
	},

addValues: function(pageNr, pageTitle, bP, aR){
		this.pageNr = pageNr;
		this.pageTitle = pageTitle;
		this.bP = bP;
		this.aK = aR.P;
		this.aE = aR;
		return this;
	},

setValueOfPageContainer: function(fg){
		this.pageImageContainerId = fg.id;
		this.cp = fg;
this.rH = fg.client.height;
		this.rO = fg.client.width;
return this;
	},

pS: function(){
		var r = this.aE;
		if(!F(r)) {return r;}
		this.aE = a.bf(this.aK);
		return this.aE;
	},

xw: function(){
		var r = this.lP;
		if(!F(r)) {return r;}
return r;
	},

yy: function(ho){
		this.lP = ho;
	},

gv: function(){
		if(!F(this.mb)) {return this.mb;}
		return this.pageTitle;
	},

dP: function(){
		var oc = new L;
		var area;
		var max = this.bJ.size();
		for(i=1; i < max + 1; i++){
			area = this.bJ.at(i);
			oc.addAllOc(area.aH);}
		return oc;
	},

qY: function(T){
		this.fM = T;
	},

nH: function(){
		this.fM = null;
	},

mv: function(){
		if(!G(this.fM)) 
			{a.aI(this.fM).uO(this);}
		this.nH();
		return;
	},

fH: function(){
		return false;
	},

	isPage: function(){
		return true;
	},

bI: function(){
		var g = this.aE.bI();
		g = g + '_' + this.pageNr;
		return g;
	},

bB: function(){
		return this.pageTitle;
	},

gQ: function(){
		return c.cC;
	},

pY: function(){
		return this.bP;
	},

gI: function(){
		return c.bz(this.aK,this.dC);
	},

dX: function(){
var g = "clIconPage('"+ this.pY() +"')";
		return g; 
	},

getZoom: function(){

		return this.lm;
	},

setZoom: function(aq){
		this.lm = aq;
	},

dc: function(){
		return this.bP;
	},

pm: function(){
		return this.dC;
	},

rg: function(aX){
		this.aE = aX;
		return;
	},

xF: function(){
		return this.az.count;
	},

qt: function(anId){
return this.az.at(anId);
	},

ts: function(){
		return this.fc;
	},

tu: function(){
		return this.bJ;
	},

es: function(){
		return this.bZ;
	},

qN: function(){
		if(this.lI) {return this.fc;}
		var area;
		var count = this.az.count;
		for (var i = 1; i < count +1; i++) {		
			area = this.az.at(i);
			if(G(area)) {continue;}
			if(area.vl())			{this.bJ.add(area);}
			if(area.uS(this))	{this.bJ.add(area);}
			if(area.uP())			{this.bZ.add(area);}
			if(area.uQ())			{this.bZ.add(area);}
			if(area.uU())			{this.bZ.add(area);}
			if(area.mu())		{this.fc.add(area);}
		} 
		if(this.bZ.count > 0) {this.lI = true;}
		this.eF = true;
	return true;
	},

tabTip: function(){
		var g = t.iB + this.aE.bB() + t.tt_htmlCr;
		g = g + t.iD + this.aE.gQ() + t.tt_htmlCr;
		g = g + t.ej + this.pageNr + t.tt_htmlCr;
		g = g + t.eh + this.gv();			
		return g;
	},

bO: function(){
		var g = t.ej + this.pageNr + c.fE;
		g = g + t.eh + this.gv();
		return g;
	},

bl: function(){
		if(this.eF) 
		{this.mv();
			return this;}
		return this.cN();
	},

cN: function(){
		this.wu();
		this.dM(this.ep);
		return this;
	},

gm: function(){
	this.sl = [		
			{name: 'type'},
			{name: 'key'},
			{name: 'value'},
			{name: 'f4'},
			{name: 'f5'},
			{name: 'f6'},
			{name: 'f7'}
			];
	},
wu: function(){
		this.gm();
	},
stId: function(aCode){
		return this.P+'_'+aCode;
	},

gF: function(){
		c.pageStack(this,'start gF');

		var ai = this.storePageCsv;
		if(G(ai)) {a.ecErr(ecErr041);}
		var newObj;
		for (var i = 0, item; item = ai.getAt(i); i++) {	
			var type = item.get('type');			
			newObj = null;
		switch(type) {
	case 'kv':	this.prCsvKv(item); break;
	case 'aart':	newObj = this.newArea(lf,item);break;	
			case 'apage':	newObj = this.newArea(kU,item); break;	
			case 'atext':	newObj = this.newArea(kV,item); break;	
			case 'aimg': 	newObj = this.newArea(dV,item); break;	
			case 'aimgal':	newObj = this.newArea(gf,item); break;
			case 'aimgyt':	newObj = this.newArea(ge,item); break;	
			case 'aimgvi':	newObj = this.newArea(gd,item); break;	
			case 'aynh':	newObj = this.newArea(kW,item); break;
			case 'l':		break;						
			case 'nop':		break;						
			default: break;								
			} 
if(!G(newObj)) {this.az.cV(newObj.objNr,newObj);}
		} 
		this.qN();
		this.eF = true;
t.hb('eF = true  ' + this.aK + '  '+ this.pageNr);
		this.mv();

	},

prCsvKv: function(anItem){
		var key = anItem.get('key');
		var val = anItem.get('value');
		this.pageCsv[key] = val;
		this.bC('this.', key, val);						
	},

pageStack: function(aSymbol){

	},

dM: function(url){
		var me = this;

		this.storePageCsv = new E.data.Store({
		reader: new E.ux.CSVReader({
					idProperty:	'key',
					root: 'rows',
					fields: this.sl
	    }),
		storeId: url,
		autoLoad: true,
		url: c.bz(this.aK, url),
		listeners: {exception: 
					function(arg1, arg2){me.lH = true;},
					load: function(){

					me.gF();

					men.ls();
					}	
					}	
	    });
	},



bC: function(anObject, ck, ba){
		var code = anObject+ck+'='+ba+';';
		if(cH(ba))					
			{eval(code);}
	}
}
		});
c.pageStack(this,'ECPage end   dM ');

E.ux.ECPagePanel = E.extend(E.Panel, {
    constructor: function(config) {
		config.K = 'ecPagePanel';						
		config.autoScroll = false;
		config.C = 0;									
		config.H;										
		config.cursorStyle;									
		config.hiddenFrame;									
		config.ya;							
		config.uu;									
		config.nA;									
		config.U;									
		config.messageBox;									
		config.ln;										
		config.kG;										
		config.mouseWheelEventLastTime = 0;				
		E.ux.ECPagePanel.superclass.constructor.apply(this, arguments);
    },
initialize : function() {
		this.K = 'ecPagePanel';							
		this.cursorStyle = 'pointer';
		this.mouseWheelEventLastTime = 0;
	},

ea : function(event) {
		this.mouseWheelEventLastTime = this.getBrowserEventTimestamp(event) + c.c30336 ;
this.stopEvent(event);
		event.browserEvent.cancelBubble = true;
	},

getBrowserEventTimestamp : function(event) {
		if(E.isIE) {return new Date().getTime();}
		return event.browserEvent.timeStamp;
	},

	setTabNr : function(C) {
        this.C = C;
	},

	tj : function() {
        return this.H.al;
    },

	getPage : function() {
        return this.C;
    },

    onRender: function() {
        E.ux.ECPagePanel.superclass.onRender.apply(this, arguments);
		this.initialize ();
		this.body.appendChild(this.client);
        this.client = E.get(this.client);
        this.client.on('mousedown', this.onMouseDown, this);
this.client.setStyle('cursor', this.cursorStyle);		
    },

    onMouseDown: function(e) {
		e.stopEvent();
        this.ln = e.getPageX();
        this.kG = e.getPageY();
        E.getBody().on('mousemove', this.onMouseMove, this);
this.body.on('mousewheel', this.fQ, this);		
		E.getDoc().on('mouseup', this.onMouseUp, this);
		a.checkSys();											
    },

    onMouseMove: function(e) {
        e.stopEvent();
		this.cZ();
		var x = e.getPageX();
        var y = e.getPageY();
        if (e.within(this.body)) {
	        var ut = x - this.ln;
	        var uL = y - this.kG;
	        this.body.dom.scrollLeft -= ut;
	        this.body.dom.scrollTop -= uL;
	    }
        this.ln = x;
        this.kG = y;
		this.drawAreaBoxesAll(this.H);					
	},

    onMouseUp: function(e) {
        E.getBody().un('mousemove', this.onMouseMove, this);
        E.getDoc().un('mouseup', this.onMouseUp, this);
    },

	fQ: function(event, con){
		var delta, jN, r, target, val;
		if(event.browserEvent.cancelBubble) {return true;}



		target = event.target;
r = this.getBrowserEventTimestamp(event);
		var offsetHeight = target.offsetHeight;
		var clientHeightTst = con.ownerDocument.body.offsetHeight;

if(this.mouseWheelEventLastTime > 0)
		{
			if(r < this.mouseWheelEventLastTime + c.c30336) {
					return this.ea(event);}}
		delta = this.getWheelDelta(event);

		this.stopEvent(event);

	if(event.shiftKey) {
			delta = this.deltaOneFrom(delta);
			if(event.ctrlKey) {delta = delta * 5;}
			a.V().cL(delta);
			return this.ea(event);}

	if(event.altKey || event.ctrlKey) {
			a.V().tL(this.deltaOneFrom(delta));
			return this.ea(event);}

	var scrollTop = target.offsetParent.scrollTop;
		var scrollHeight = target.scrollHeight;
if(delta > 0)
			{val = 0; 
			jN = (scrollTop + clientHeightTst + delta * c.c30335) > scrollHeight;}
		else{
			val = target.scrollHeight; 
			jN = (scrollTop + delta * c.c30335) < 0;}
		if(jN) {
			a.V().wj(this.deltaOneFrom(delta), val);
			this.ea(event);}

	target.scrollTop += (delta * c.c30335);
		if(!G(target.offsetParent)) {target.offsetParent.scrollTop += (delta * c.c30335);}
		a.bF.fr(0);				
return this.ea(event);
		}, 

deltaOneFrom: function(delta){
		if(delta < 0) {return -1;}
		return 1;
	},

	stopEvent: function(event){
		event.stopEvent();
		event.stopEvent();
		event.stopEvent();
	},

	getWheelDelta: function(event){
		arg = event.getWheelDelta() * -1;
		if(arg > 0) {return 1;}			
		if(arg < 0) {return  -1;}		
	},


qo: function() {						
		t.alertObsolete();
},

setImage: function(imgsrc, width, height, U, I) {
		I.setZoom(U);

var ay = I.al;
		if(!G(this.body)) {
		if (this.body.dom.getElementsByTagName('img').length > 0) {
			this.body.dom.removeChild(this.body.dom.getElementsByTagName('img')[0]);
			I.getGraphics().clear();
			UnTip();
       }}

		var bn = I.fB(I.C);
		this.setTitle(ay.pageTitle);
		bn.src = c.bz(ay.aK, imgsrc);
		this.clientImgCopy = bn;

		var dA = document.createDocumentFragment();
		dA.appendChild(bn);
		var imgClient = dA.firstChild;

		this.qg(imgClient, width, height, U);

		this.sG(I, dA, U);

		this.body.dom.appendChild(dA);
		this.client = E.get(bn);
		this.client.originalWidth = width;
		this.client.on('mousedown', this.onMouseDown, this);
		this.client.setStyle('cursor', 'move');			
		this.setImageSizeTo(I, width, height, U);
		return true;
		},

	sG: function(H, domParent, U){
		if(c.bM('c30270')) {return null;}

		this.nl();

		if(!H.lM()) {return false;}
		var az = H.al.az;
		if(G(az)) {return null;}
		var sP = this.tj().qx(H.C).sO(domParent, H.bQ(), c.cd(H.C));
		this.sQ(H, sP, az, U);
		return true;
	},

sQ: function(H, domParent, areas, U){
		var max = areas.count;
		if(G(max)) {return false;}				
		var area, i;
		for (i = 1; i < max + 1; i++) {					
			area = areas.at(i);
			if(G(area)) {continue;}
			area.sR(domParent, U);
		} 
		return true;
	},

uM: function(I, U) {
		var az = I.getFromDOMAreas();
if(G(az.length)) {return false;}
		var area, hi, i, max;
		max = az.length;
		for (i=0; i < max; i++) {
			area = az[i];
			hi = I.al.qt(area.id);
			if(G(hi)) {

				return false;}
			area.coords = hi.getCoordData(U);
		}
		return true;	
	},

setImageSizeTo: function(I, width, height, U) {
		var receiver = document.getElementById(c.jQ(I.C));
		this.qW(I, U);
		this.qg(receiver, width, height, U);

		this.drawAreaBoxesAll(I);
		this.uM(I, U);
		return true;
	},

qg: function(receiver, width, height, U) {
		this.uu = Math.round((height * U / 100),0);
		this.nA = Math.round((width * U / 100),0);
		this.U = U;

		receiver.style.height = "auto";
		receiver.style.width = this.nA + 'px';
	},

qW: function(I, U) {
		var i;
		var areas = I.al.az;
		var max = areas.size();
		for (i=1; i < max + 1; i++)	
			{

			areas.at(i).rc(U);}
	},

drawAreaBoxesAll: function(I){
		this.cZ(I);
		this.drawAreaBoxesYN(I);		
		this.drawAreaBoxes(I);
		I.mn();

	},

nl: function(){
		var tE = a.bF.getFromDOMMaps();
		var az = a.bF.getFromDOMAreas();
		this.nk(az);
		this.nk(tE);

	},

	nk: function(hd){
		if(G(hd.length)) {return;}
		var i;
		var node;
		var ecNodeFromDom;
		var ecParentNode; 
		var max = hd.length;
		for (i=0; i < max; i++ ) {
		node = hd[i];
		if(!F(node)) {
			ecNodeFromDom = document.getElementById(node.id);
		if(!F(ecNodeFromDom)) {
			ecParentNode = ecNodeFromDom.parentNode;
		if(!G(ecParentNode)) 
				{ecParentNode.removeChild(ecNodeFromDom);}}
			} 
		}
	},

drawAreaBoxes: function(I){
		if(c.bM('c30270')) {return true;}
		this.mk(I,c.c30275,I.al.ts(),false);
		this.mk(I,c.c30275,I.al.tu(),false);
		I.mn();
		return true;
	},

drawAreaBoxesYN: function(I){
		if(c.bM('c30280')) {return true;}
		var boxes = this.H.es();
		var area;
		var max = boxes.count;
		for (var i = 1; i < max + 1; i++) {		
			area = boxes.at(i);
			area.drawAreaBoxesYN(this);
		} 
		return true;
	},

ym: function(I){
		if(c.bM('c30276')) {return false;}
		var boxes = I.al.es();
		var max = boxes.count;
		var g = '';
		for (var i = 1; i < max + 1; i++) {		
			area = boxes.at(i);
			g = g + area.getMapString();
		} 
		return g;
	},

mk: function(I,color,boxes,isFillRect){
		if(c.bM('c30276')) {return false;}
		if(G(boxes)) {return false;}
		var max = boxes.count;
		if(G(max)) {return false;}	
		var jg = I.getGraphics();
		jg.setColor(color);
		var area;
		var ar;
		var U = I.bQ();
		for (var i = 1; i < max + 1; i++) {		
			area = boxes.at(i);
			ar = area.cD;

		var offsetY = this.body.dom.scrollTop;
		var offsetX = this.body.dom.scrollLeft;

		var offsetFromTop = c.c30340;
		if(E.isOpera) {offsetFromTop = 0;}

		var x = area.fp(ar[0],U) - offsetX;						
		var y = area.fs(ar[1],U) + offsetFromTop - offsetY;	

		var x1 = area.fp(ar[2]-ar[0],U);		
		var y1 = area.fs(ar[3]-ar[1],U);		

		if(!isFillRect)
			{jg.drawRect(x,y,x1,y1);}
else{jg.fillRect(x,y,x1,y1);
			jg.setColor('#000000');
			jg.setFont("verdana","10px",Font.BOLD);
jg.drawStringRect(t.tt_ynNote, x, y, x1-x, 'center');
			jg.setColor(color);
			}
		} 
		jg.paint();
		return true;
	},

cZ: function(I){
		if(G(I)) {I = a.bF;}
		if(!I.gR()) {return;}
		var jg = I.getGraphics();
		jg.clear();
		I.uR();
	},
nop: function(){
	}
	}
		);
	E.ComponentMgr.registerType( "pagePanel", E.ux.ECPagePanel);
E.ux.gb = E.extend(E.ux.ECPagePanel, {
    constructor: function(config) {
		config.K = 'ecImagePanel';						
		config.autoScroll = false;
		config.C = 0;									
		config.H;										
		config.hiddenFrame;									
		E.ux.gb.superclass.constructor.apply(this, arguments);
    },

	initialize : function() {
		this.K = 'ecImagePanel';							
		this.cursorStyle = 'move';
	},

	setTabNr : function(C) {
        this.C = C;
	},

    onMouseUp: function(e) {
        E.getBody().un('mousemove', this.onMouseMove, this);
        E.getDoc().un('mouseup', this.onMouseUp, this);
    },

qo: function() {
		var af = this.H.bu;
		var uv = this.H.dc();
		this.setImage(uv,a.cW,a.cI,af,this.H);
	},


setImage: function(imgsrc, width, height, zoom, I) {
if(!G(this.body)) {
		if (this.body.dom.getElementsByTagName('img').length > 0) {
			this.body.dom.removeChild(this.body.dom.getElementsByTagName('img')[0]);
		 }}

		var bn = I.fB(I.C);	
		bn.src = c.kP(I.tabCatalogId, imgsrc);
		this.clientImgCopy = bn;
		this.body.appendChild(bn);
		this.client = E.get(bn);
		this.client.originalWidth = width;
		this.client.originalHeight = height;
		this.client.on('mousedown', this.onMouseDown, this);
		this.client.setStyle('cursor', 'move');			
		var newWidth = this.client.originalWidth * zoom / 100;
this.client.setWidth(newWidth);
		I.setZoom(zoom);
		},

cZ: function(){
	},


nop: function(){
	}
	}
		);
	E.ComponentMgr.registerType( "imagePanel", E.ux.gb);
E.ux.fY = E.extend(E.ux.ManagedIFrame.Panel, {
    constructor: function(config) {
		config.K = 'ecIFrame';							
		E.ux.fY.superclass.constructor.apply(this, arguments);
    },

	initialize : function() {
		this.K = 'ecIFrame';							
	},

		 interceptLinks : function(e,targetEl){
			var me = this;
debugger;
			alter('Hurra');
href = targetEl.getAttribute('href');
t.hb(href);
				e.stopEvent();    
debugger;
},	



clSResPage: function(arg1){
debugger;
		a.dk.mc(arg1);
	},

clSResNav: function(arg1){
debugger;
		a.dk.ma(arg1);
	},

	clPg: function(argCatalogId, argPageNr){
debugger;
		a.gotoCatalogAndPage(argCatalogId, argPageNr);
	},
nop: function(){
	}
	}
		);
	E.ComponentMgr.registerType( "eciframepanel", E.ux.fY);
ECTabPanel = E.extend(E.TabPanel, {
		constructor: function(config) {
			config.K = 'ecTabPanel';				
			this.H;								
			E.TabPanel.superclass.constructor.apply(this, arguments);
			}, 
initComponent : function(){
		  this.H = null;
		  E.TabPanel.superclass.initComponent.call(this);
			},
	  setTabObj : function(H) {
        this.H = C;
		    }
	});


Class("ECPageLoader",{isa: ECPage,
	has: {
		pageNrStarted:			{	is:   "rw"},	
		lA:				{	is:   "rw"},	
		dR:		{	is:   "rw"},	
		aG:			{	is:   "rw"}		
	},
	methods: {

	initialize: function(){
		this.K = 'ecPageLoader';				
		this.aG = new L();
	},

wK: function(aF){
		this.addValues(aF.pageNr, null, null, aF.aE);
		this.pageNrStarted = aF.pageNr;
		this.initializePagesToLoad();
		aF.aE.sF();
	},

initializePagesToLoad: function(){
		var jK, neg;
		for (var i = 1; i < c.c30150 + 1; i++) {
			jK = this.pageNrStarted + Math.ceil(i / 2);
			neg = Math.floor(i / 2);
			if((neg * 2) == i) {jK = this.pageNrStarted - neg;}
			this.uc(jK); 
		} 
	this.dR = 0;
	},

uc: function(pageNr){
		if(pageNr < 1) {return;}
		if(pageNr <= this.aE.bH)
			{a.aG.add(pageNr);}
		return;
	},


kZ: function(aF){
		if(this.aK == aF.aK)
			{this.lA = aF.pageNr;}
		else{debugger; a.aG.count = 99999;}
	},

la: function(){
		if(this.dR >= a.aG.size()) {return 0;}
		this.dR = this.dR + 1;
		this.lA = a.aG.at(this.dR);
return this.lA;
	},

	at: function(index){
		return this.aG.at(index);
	},

	add: function(anObj){
		return this.aG.add(anObj);
	},

	size: function(pageNr){
		return this.aG.size();
	},

	count: function(pageNr){
		return this.aG.count = pageNr;
	}

}
		}); 



function R(){
		this.K = 'ecCatalog';					
	this.mi = true;						
	this.xL;									
		this.P;								
		this.xN;								
		this.xU;						
		this.bH;							
		this.oT;						
		this.uB;							
		this.uH;							
		this.uE;						
		this.uF;						
		this.tM;						
		this.tN;						

this.xJ;				
		this.xI;					
		this.os;				
	this.oZ = new Array();				
this.catCompanyName;						
		this.catCatalogTitle;						
		this.catCatalogLanguages;					
		this.catCatalogDate;						
		this.xM;								
		this.uC;						

	this.tJ = [];							
		this.oX = [];							
		this.dH = [];						

	this.ze = true;		
		this.yV = true;		
		this.yM = true;		
		this.zd = true;		

	this.ttDefinitions = [];					
this.mj = false;
		this.lL = new Date();
		this.ff;
		this.wT;
	}
R.prototype.initialize = function(){
		this.uC = c.c30210;
};
R.prototype.qQ = function(aRecord){
		this.qT(aRecord.get('CatalogId'));
		this.catCompanyName			= aRecord.get('Company');
		this.catCatalogTitle		= aRecord.get('Title');
		this.catCatalogPages		= aRecord.get('Pages');
		this.catCatalogLanguages	= aRecord.get('Languages');
		this.catCatalogDate			= aRecord.get('Date');
	};

R.prototype.qT = function(nV){
		this.P				= nV;
		if(!F(nV)) {this.initialize();}
	};

R.prototype.xm = function(aKey){
		return this.oZ[key];
	};

R.prototype.uV = function(){
		this.mi = false;
		return false;
	};

	R.prototype.pP = function(an){
var aF = this.cj(an);
		var rI = aF.dc();
		return rI;
		};

R.prototype.cj = function(an){
		return this.oX[an];
};

R.prototype.rf = function(aV){
		aV.rg(this);
		this.oX[aV.pageNr] = aV;
		};

R.prototype.tD = function(){
		this.bl();
		return this.dH['pgAll'];
	};

R.prototype.xS = function(aLink){
		this.tJ[aLink.linkNr] = aLink;
		return;
	};

R.prototype.yK = function(an){
		if(an > this.bH) {return false;}
		var tmp = this.cj(an);
		if(G(tmp)) {return false;}
		return true;
	};

	R.prototype.fH = function(){
		return true;
	};

	R.prototype.isPage = function(){
		return false;
	};

	R.prototype.vb = function(){
		return this.P == c.c30820;
	};

R.prototype.bI = function(){
		return this.P;
	};

R.prototype.bB = function(){
		return this.catCatalogTitle;
	};

R.prototype.gQ = function(){
		return this.catCompanyName;
	};

R.prototype.pY = function(){
		return this.ps();
	};

R.prototype.gI = function(){
		return c.bz(this.P,this.ps()); 
};

R.prototype.dX = function(){
		var g = "clIconCat('"+ this.P +"')";
		return g; 
		};

R.prototype.bO = function(){
		return this.bB() + c.fE + this.gQ();
	};

R.prototype.ps = function(){
return this.er().dc();
};

R.prototype.pm = function(){
return this.er().pm();
	};

R.prototype.xj = function(){
		var r = this.os;
		if(!F(r)) {return r;}
return r;
	};

R.prototype.yz = function(ho){
		this.os = ho;
	};

R.prototype.pH = function(){
		return this.dH['catIni'];
	};

	R.prototype.wm = function(){
		return this.dH['pgAll'];
	};

	R.prototype.gp = function(){
		var pageNr = this.oT;
		if(G(pageNr)) {pageNr = 1;}
		return pageNr;
	};

R.prototype.xu = function(){
		var pageNr = this.gp();

		return pageNr;
	};

R.prototype.bl = function(){
		if(!this.mi) {return this;}
		return this.sJ();
		};

R.prototype.sJ = function(){
		this.gm();
		this.qU(this.ei);
		this.qV(this.en);
this.uV();
		return this;
		};

R.prototype.er = function(){
		var df = this.gp();
		var av = this.cN(df);
		return av;
		};

R.prototype.cN = function(an, C){
		var aV = this.cj(an);
		aV.qY(C);
		aV.bl();
		return aV;
		};

R.prototype.xV = function(){
		var ly = a.fu;
		var yY = this.bH;
		while(this.P == a.ds){
		oe = oe + 1;
		if(oe > this.bH) {return;}
		var ay = this.cj(pageNr);
		ay.bl();
		}
	};

R.prototype.sF = function(){
		var receiver = this;
		var task = {
		    run: receiver.sD,
		    interval: 1000,					
			scope: receiver,				
repeat: c.c30150				
			};
		var runner = new E.util.TaskRunner();
		runner.start(task);
	};

R.prototype.sD = function(){
		var ly = a.la(this);
		if(G(ly)) {return;}

		var mB = this.cj(ly);
		mB.bl();
		a.kZ(mB);
	};

R.prototype.gm = function(){
		var bE = this.P;
		tc.jL('sZ', bE);	
		this.ei		= c.si(bE);
		this.en	= c.sj(bE);
		this.lj		= c.so(bE, 0);

	this.xn = [		
	        {name: 'key'},
			{name: 'value'}
			];

	this.xt = [
			{name: 'pageNr', type: 'float'},		
			{name: 'pageTitle'},
			{name: 'pageFileName'}
	        ];

	this.xo = [			
	        {name: 'PageNr'},
			{name: 'IconImg'}			
			];
	};

R.prototype.wp = function(){



		var ai = this.pH();
		var dZ = ai.getCount();
		if(G(ai)) {a.ecErr(testJs031);}
		for (var i = 0, item; item = ai.getAt(i); i++) {		
			var key = item.get('key');
			var val = item.get('value');
		switch(key) {
			case 'ttd': this.vY(item); break;
			case 'nop':	break;							
			default:
				this.oZ[key] = val;
				this.bC('this.', key, val);						
				break;
			} 
		}


	};

R.prototype.vY = function(item){
		var newObj = new ECToolTipDefinition;
		newObj.ww(item);
		var id = newObj.id;
		tc.jL('ty', id);	
		this.ttDefinitions[id] = newObj;
	};

	R.prototype.wi = function(id){
		return this.ttDefinitions[id];
	}; 

R.prototype.wq = function(){
		
		
		var ai = this.wm();
		if(G(ai)) {a.ecErr(ecErr031);}
		for (var i = 0, item; item = ai.getAt(i); i++) {		
		var aV = a.qH(this,							
							item.get('pageNr'),						
							item.get('pageTitle'), 
							item.get('pageFileName'),
							this);									
		this.rf(aV);
		}	
		this.bH = i;										
		this.er();
if(this.vb()) {a.nF(this.P);}


	
	};

R.prototype.qU = function(url){
		var me = this;



if(this.mj){
			this.ff = this.lL.getTime();
			var out = 'TIME start = '+ this.ff + '  '+this.P;
			c.uy(out);
			stack.add(out);
		}

	    this.dH['catIni'] = new E.data.Store({
reader: new E.ux.CSVReader({
					idProperty:	'key',
					fields: [{name: 'key'},
							{name: 'value'}]
				  }),
			storeId: url,
			url: c.bz(this.P, url),
			autoLoad: true,
			listeners: {load: function(){
					me.wp();

					}
		}	
    });

	};

R.prototype.qV = function(url){
		var me = this;
	    this.dH['pgAll'] = new E.data.Store({
			reader: new E.ux.CSVReader({
					idProperty:	'pageFileName',
					fields: [
						{name: 'pageNr', type: 'float'},		
						{name: 'pageTitle'},
						{name: 'pageFileName'}]
					  }),
			storeId: url,
			url: c.bz(this.P, url),
			autoLoad: true,
			listeners: {load: function(){ 
me.wq();

					}
			}	
    });
	};

R.prototype.bC = function(anObject, ck, ba){
		var code = anObject+ck+'='+ba+';';
		if(cH(ba))								
			{eval(code);}
		};


Class("lw",{isa: fJ,
	has: {
		K:						{is: "rw", init: 'ecApp'},		
lT: 			{is:"rw", init: ' '},			
		dF: 			{is:"rw", init: ' '},			
		df:				{is:"rw", init: ' '},			
bU: 				{is:"rw", init: 0},				
		bF: 				{is:"rw"},						
		ds: 			{is:"rw", init: ' '},			
		gV: 			{is:"rw"},						
		dz: 			{is:"rw", init: ' '},			
		yg: 			{is:"rw", init: ' '},			
		fu: 				{is:"rw"},						
		bY:		{is:"rw"},						
		dk:	{is:"rw"},						
		mC: 		{is:"rw", init: new Array()},	
		mf: 	{is:"r", init: 0},				
be: 					{is:"rw", 
									init: new L()},	
		nQ: 				{is:"rw", init: new Array()},	
		fe: 				{is:"rw", init: new Array()},		
		gO: 				{is:"rw", 
									init: new L()},	
		gN: 			{is:"rw", 
									init: new L()},	
		oW: 					{is:"rw", init: new Array()},	
		aG:				{is:"rw"},						
		lazy: 						{is:"rw", init: new Array()},	
		ui:							{is:"rw", init: new Array()},	
		uiEl:						{is:"rw"},						
		io:							{is:"rw", init: new Array()},	
		icc:						{is:"rw"},						
		icp:						{is:"rw"},						
		keys:						{is:"rw"},						
		dbt:						{is:"rw"},						

jobsReady:					{is: "rw", 
									init: new L()},	

		cW:					{is: "rw", init: 924},			
		cI:					{is: "rw", init: 600},			

		startTime:					{is:"rw"}						

	  },
	
    methods: {

	initialize: function(){
		this.ui['accordionItems'] = new Array(); 	
		this.md();
	},

wc: function(){
		this.wd();
	E.MessageBox.show({
		msg: t.kd,
		progress: true,
		progressText: t.kf,
		width: 300,
		wait: true,
		waitConfig: {interval:200},
		icon:'ext-mb-download',		
		animEl: 'mb7'
       });
	setTimeout(function(){
		E.MessageBox.hide();		
		}, c.c30220); 



	E.QuickTips.init();								
	if(!E.isIE) {E.History.init();}
	a.keys = new cr();						
	},

wN: function(){
		if(c.bA(53010)) {E.get('mainTabHome').show();}	
c.gi();
		c.initializeLanguageFiles();	
		men.checkNotificationOnBrowser();
		this.initializeApplicationUrlParmsCatalog();
	},

initializeApplicationUrlParmsCatalog: function(){
		if(G(ecInitialData)) {return;}
		if(ecInitialData[0] !== '#initialCatPage') {return;}
		var I = a.newTabObjPage(true);
		this.gz(I, ecInitialData[1], ecInitialData[2], true);
men.aTabNrToLoad = I.C;
		men.checkNotificationOnUrlParmsCatalog();
	},

wd: function(){
		if(!E.isIE) {this.initializeApplicationIndexLoadingInfo();}
	if(E.isIE8 || E.isIE7){
			c.qk();
			c.lb('ecIEInfo');
			this.initializeApplicationIndexLoadingInfo();
			c.qk();
		}
	},

	initializeApplicationIndexLoadingInfo: function(){
		c.lb('ecLoadingInfoText');
		c.lb('ecLoadingInfo');
	},
qC: function(aClass, T,aType){
		var newObj = new aClass;
		newObj.initialize();
		newObj.setTabType(aType);
newObj.testIfTabExists(T);
		this.be.cV(T,newObj);
		newObj.C = T;
		return newObj;
	},

	newTabObjPage: function(bc){
		return this.eW('#page', bc);
	},

eW: function(aType, bc){
		var newObj = new ECTab;
		newObj.initialize();
		newObj.setTabType(aType);
		newObj.setIsFirstPageTabTo(bc);
		this.tF(newObj);
		return newObj;
	},

vF: function(companyId){
		var newObj;
		newObj = new bh;
		newObj.initialize();				
		newObj.companyId = companyId;
		this.setCompany(newObj);				
		return newObj;
	},

vE: function(P){
		var newObj;
		newObj = new R;
		newObj.initialize();				
		newObj.P = P;


		this.qS(newObj);				
		return newObj;
	},

qH: function(aR, pageNr, pageTitle, pageFileName){
		var newObj = new ECPage;
		newObj.initialize();				
		newObj.pageNr = pageNr;
		newObj.aK = aR.P;
		newObj.pageTitle = pageTitle;
		newObj.lz = pageFileName;
		newObj.aE = aR;
		newObj.gi();
		return newObj;
	},

bD: function(qu){
		var P, pageNr;
		var fj = this.fF();
		var aM = this.newTabObjPage(fj);
		var newTabNr = aM.C;

		if(fj){
		P = this.dF;
				pageNr = this.df;
				this.bU = newTabNr;
		}else{
				P = this.ds;
				pageNr = this.fu;
		}
		return this.gz(aM, P, pageNr, false);
	},


gz: function(fl, P, pageNr, qu){
		if(G(P)) {return fl;}
		if(G(pageNr)) {return fl;}
		var aM;
		if(G(fl)) 
			{aM = this.newTabObjPage(false);}
			else{aM = fl;}		
var aV = this.tk(P,pageNr);
		aM.gS(aV);
		aM.uj();
if(qu) {this.qZ();}
		if(aM.C > 1) {c.wy(aM);}
		return aM;
	},

closeActiveTab: function(){
		var I = this.gw();
		if(I.lQ()) 
			{return this.uiPages().remove(I.aO);}
	return alert(t.ke);
	},

qE: function(aPanel){
		return this.fZ(ECTab,1, '#home', aPanel);
	},

qF: function(aPanel){
		return this.fZ(ECTab,2, '#content', aPanel);
	},

qy: function(aPanel){
		return this.fZ(ECTab,3, '#details', aPanel);
	},

qJ: function(T){
		var newObj = new ECTabPop;
		newObj.initialize();				
		newObj.setTabType('#imagePop');
		newObj.C = T;
		return newObj;
	},

fZ: function(aClass,T, panelType, aPanel){
		a.ui[aPanel.id] = aPanel;
		this.setTabNrToExtPanel(T,aPanel);
		var aM = this.qC(aClass,T,panelType);
		aM.setTabPanelObj(aPanel);
		return aM;
	},

qK: function(){
		var r = new E.Panel({
		id: 'subTabContentCatalogsIcons',
		title: '<h1>'+t.hC + '</h1>',
		tabTip: t.tt('iu'),
		layout: 'fit',					
		closable: false,				
		labelWidth: 40,
		autoScroll: true,				
		cls: 'ecImageGallery',		
		html: ' ',						
		listeners: {activate: function() {a.icc.uh();}}	
		});
		a.ui['subTabContentCatalogsIcons'] = r;
		return r;
    },

qD: function(){
		var r = new E.Panel({
		id: 'subTabContentCatalogsListBig',
		title: '<h1>'+t.hv + '</h1>',
		tabTip: t.iw,
		layout: 'fit',					
		closable: false,				
		labelWidth: 40,
		autoScroll: true,				
		defaults: {
	        xtype: 'panel',
			layout: 'fit'
			},	
		items:[{id: 'accordCatalogList', 
				title: t.fX, 
				items: a.ui['catalogsGridLarge']}
			]
		});
		a.ui['subTabContentCatalogsListBig'] = r;
		return r;
    },


rJ: function(){
		if(F(this.dk)) {
			this.dk = new oO;}
		return this.dk.show();
	},

lY: function(J){
		this.bd(c.c30140,J).ef(J);
},

qA: function(code,J){
		var driver = this.bd(code,J);
		driver.aQ(J);
		return;
	},

jO: function(J,fileName){
var driver = new kT;
		driver.aQ(J);
	},

lE: function(code,J,anOptGalleryColl){
		var driver = this.bd(code,J);
		driver.aQ(J, anOptGalleryColl);
		return;
	},

uJ: function(J){
		var driver = this.bY;
		return driver.ef(J);
	},

yu: function(J, fileName){
		var driver = this.bd(null,J);
		driver.aQ(J, fileName);
	},

dK: function(code, J, fileName,htmlContent){
		E.ux.TinyMCE.initTinyMCE();		
		var bp;
		if(code == '#pop') {bp = kQ;}
		if(code == '#tab') {bp = oH;}
		var driver = new bp;
		driver.aQ(J, fileName,htmlContent);
	},

bd: function(code, J){
		if(this.uZ(code, J)) 
			{return this.bY;}
		var driver = J.bd(code);
		if(code == c.c30140) {this.bY = driver;}
		this.tI(driver);	
		if(driver.bi) {this.bY = driver;}
		return driver;
	},

uZ: function(code, J){
		if(G(this.bY)) {return false;}
		return (this.bY.K == J.bd(code).K);
	},

yv: function(){
		var aX = this.gV;
		var r = new E.Panel({
		id: 'subTabContentPageIcons_' +aX.id,
		title: '<h1>'+t.vB + '</h1>', 
		layout: 'fit',					
		closable: false,				
		labelWidth: 40,
		autoScroll: true,				
		tooltip: t.tt('tt_ecPanelTitleCatalogsTab'),			
		defaults: {
		    autoScroll: true,
			margins: '0 0 0 0'
	    },
		items:[{id: 'pageIconsPanelLarge' +aX.id,
				xtype: 'panel',
				title: t.hz,
				deferredRender: true,							
				cls: 'ecImageGallery',
listeners: {activate: function() {a.icp.xT();}}
				},
				{id: 'accordPagesList', 
				title: t.fX, 
				items: a.ui['pagesGridLarge']}
			]
		});
		return r;
    },

qz: function(C,file){
		var bG = false;
		if(C > 1) {bG = true;}
		var r = new E.Panel({
		id: 'detailsTabsECsub'+C,
		title: '<h1>'+t.fG + C + '</h1>',
		layout: 'fit',					
		closable: bG,			
		labelWidth: 40,
		autoScroll: true,				
		tabTip: t.tt('fy'),
		autoLoad: file,	
		plugins: new E.ux.TabCloseMenu()	
	});
		return r;
    },

setTabNrToExtPanel: function(T,aPanel){
		aPanel.C = T;
		return;
	},

key: function(ga){
		if(!this.vG()) {return true;}		
		a.keys.key(ga); return this.vH();
	},
vI: function(){
		if(this.vj())
			{this.eD(1);}
		else{this.eD(this.cR()+1);}
		return;
	},

vM: function(){
		if(this.vo())
			{this.eD(this.be.size());}
		else{this.eD(this.cR()-1);}
		return;
	},


checkSys: function(){
	if(!this.numberOfTabsPages() > 0) {this.bD();}
	},

md: function(){
		this.aG = new ECPageLoader();
		this.aG.initialize();
	},

rP: function(aF){
		this.md();
		this.aG.wK(aF);
	},

kZ: function(aF){
		this.aG.kZ(aF);
	},

la: function(aR){
		if(aR.P == this.aG.aE.P)
			{return this.aG.la();}
		return 0;
	},

yr: function(idProperty, fields){
		var newReader = new E.ux.CSVReader({
			idProperty:	idProperty,
			root: 'rows',
			fields: fields
			});		
		return newReader;
	},

	yq: function(reader, storeId, url, listeners){
		var test = listeners;
		var myListeners = 'function(){' + listeners + '};';
var ai = new E.data.Store({
			reader: reader,
			storeId: storeId,								
			url: url,
			autoLoad: false,								
			listeners: {load: myListeners}
				});
		return ai;
	},

gs: function(){
		var currCatObj = this.fo();			
		return currCatObj.pP(this.fu);
	},

tI: function(eS){
		var count = this.gN.add(eS);
		eS.id = 'driver_'+count;
		eS.driverNr = count;
		return eS;
	},

sY: function(){
		return this.dk;
	},

lW: function(){
		var helpPanel = E.getCmp('helpPage');
		if(F(helpPanel)) {return true;}
		return false;
	},

fF: function(){
		var r = false;
		for (i= 1; i <  this.be.size() + 1; i++ )
			{if(this.aI(i).ca()) {return false;}
			}
		return true;
	},

numberOfTabsPages: function(){
		var r = 0;
		for (i= 1; i <  this.allTabsSize() + 1; i++ )
			{if(this.aI(i).ca()) {r = r + 1;}
			}
		return r;
	},

aI: function(T){
		return this.be.at(T);
	},

tF: function(I){
this.be.add(I);
		I.C = this.allTabsSize();
		return I.C;
	},

allTabsSize: function(){
		return this.be.size();
	},



allTabsRemoveTabNr: function(C){
		var H = this.aI(C);
		return this.allTabsRemove(this.aI(C));
		},

by: function(o,arg){
		return this.allTabsRemove(this.aI(arg.C));
	},

allTabsRemove: function(I){
		if(G(I)) {return false;}
		if(!I.ca()) {return false;}
		if(I.eC()) {return false;}
	this.be.cV(I.C, null);
		this.be = this.be.copyNonEmptyElements();
		return true;
	},

eL: function(aPanel){
		var id = aPanel.id;
		var C = this.oU(id);
		var bW			= this.aI(C);
		a.checkSys();											
		if(!bW.ca()) {return;}
	var vz			= bW.tabCatalogId;
		var hs			= this.bf(vz);
		this.lF(hs.P);
		this.bU			= C;
		this.bF			= bW;
		bW.nx();
		this.ec(hs, hs.P, bW.bK);
bW.cg(bW.bK);

		return;
	},

gy: function(){
		var H = this.bF;
		if(!F(H)) 
		{
			if(H.ca()) {return H;}}
		return this.be.at(this.bU);
	},

activateTabInCenter: function(aTabName){
		var C = a.oU(aTabName);
		var tabPanel = E.getCmp('pagesTabsEC');					
		tabPanel.show();
		tabPanel.setActiveTab(C - 1);	
	},

gR: function(){
		return this.gy().gR();
	},

	xk: function(){
		var H = this.gy();
		return H;
	},

fo: function(){
		var dm = this.gV;
		if(!F(dm)) {return dm;}
		var sH = this.tz();
		return this.bf(sH);
	},

wl: function(){
return this.bF.bQ();
	},


uiPages: function(){
		return this.ui['pagesTabsEC'];
	},

uiMainTabDetails: function(){
		return this.ui['mainTabDetails'];
	},

uiSearchFormViewport: function(){
		return E.getCmp('searchFormMainViewport');
	},

pq: function(){
		return this.bF.al;
	},

	sV: function(anId){
		return this.pq().qt(anId);
	},

getCompanyById: function(companyId){
		return this.nQ[companyId];
	},

setCompany: function(nU){
		this.nQ[nU.companyId]=nU;
	},

bf: function(P){
		return this.fe[P];
	},

qS: function(aX){
this.fe[aX.P]=aX;
		this.gO.add(aX.P);
	},

xy: function(){
if(F(this.fe)) {return 0;}
		return this.fe.length;
	},

tk: function(P,an){
		var cat = this.bf(P);
return cat.cN(an, null);
	},

	getZoom: function(C){
		return this.oW[C];
	},

setZoom: function(C, aq){
		var H = this.aI(C);
		H.setZoom(aq);						
		this.oW[C] = aq;
	},

uW: function(){
		if(G(this.dF)) {return false;}
		if(G(this.df)) {return false;}
return true;
	},

eR: function(){

		return false;
	},

dT: function(anId){
		var accordAll = a.ui['westAccordion'];
		var accordObj = accordAll.get(anId);
		return accordObj;
	},

xi: function(anId){
		var accordObj = this.dT(inId);
		return accordObj;
	},


op: function(anObj){
		this.mC[anObj.K] = anObj;
	},

xv: function(K){
		return this.mC[K];
	},

rd: function(aRow,tT){
		this.op(tT);
	return;
	},

ow: function(aCatObj){
		this.op(aCatObj);
		this.rr(aCatObj);
		return;
	},

rn: function(tZ){
		this.dz = tZ;
		return;
	},

xC: function(){
		if(F(this.dz)) {return this.dz;}
		return this.dz;
	},

rr: function(aCatObj){
		this.ec(aCatObj,aCatObj.P,aCatObj.oT);
	},

ec: function(aCatObj,ap,an){
		this.gV	= aCatObj;
		this.ds	= ap;
		this.fu		= an;
	},

tz: function(){
		if(F(this.ds)) {return this.dF;}
		return this.ds;
	},

tm: function(){
		var dm = this.fo();
		var maxpage = dm.bH;
		return maxpage;
},

yP: function(){
		return G(this.bU);
	},

closeTabAction: function(I){
		if(!G(I)) {I.closeTabAction();}
		this.gX();							
	},

closeActionPopUp: function(){
		this.gX();							
	},

gX: function(){
		this.bY = null;
	},

setDriverActive: function(driver){
		if(F(driver)) {return;}						 
		var dr = this.pR();
if(!F(dr)) {dr.setDriverActive();}
	},

setDriverInactive: function(driver){
		if(F(driver)) {return;}
		var dr = this.pR();
		if(!F(dr)) {dr.setDriverInactive();}
	},

pR: function(driver){
		if(F(driver)) {return null;}
		var max = this.gN.size();	
		if(G(max)) {return null;}
		var i, curr;
		for (i=1;i < max +1 ;i++ )				
			{curr = this.gN.at(i);
			if(curr.id == driver.id) {return curr;}
		} 
		return null;
	},

bb: function(co){
		var page = this.pq();
		return this.sV(co).bb(page);
	},

rB: function(wt){
		var r = c.pB(wt);
		var catalog = this.bf(r[1]);
		var page = catalog.cj(r[2]);
		var area = page.az.at(r[3]);
return this.uJ(area);
	},

mA: function(P){
		var aCatObj = this.bf(P);
		this.ow(aCatObj);
		var lZ = aCatObj.er();
		var ee = this.gy();
ee.rm(aCatObj,lZ.pageNr);
		ee.cg(lZ.pageNr);
		return;
	},

yx: function(aRow,anArtObj){
		return;
	},

yC: function(aRow,anObj){
return;
	},

	cG: function(aGrid,aRow,anEvent){
if(F(aRow)) {err.add('errMain20');}
		var record = this.io['catalogStore'].getAt(aRow);
		var P = record.get('CatalogId');
		this.mA(P);
		this.lF(P);
		return;
	},

gotoCatalogAndPage: function(argCatalogId, argPageNr){
		this.mA(argCatalogId);
		this.V().bV(argPageNr);
	},

fd: function(aGrid,aRow,anEvent){
var record = a.io['companiesStore'].getAt(aRow);
		var companyId = record.get('CompanyId');
		var companyObj = a.getCompanyById(companyId);           
companyObj.bl();
		this.rd(aRow, companyObj);
		this.rn(companyObj.companyId);
		return;
	},

clickGalleryOnIconLarge: function(iconName){
var r = c.pB(iconName);
		var aR = this.bf(r[1]); 
		var pageNr = r[2];				
		if(G(pageNr)) 
			{pageNr = aR.gp();}
		a.ec(aR, pageNr);
		this.lF(aR.P);
		aR.cN(pageNr, this.qr());
	},

gM: function(arg){
	a.V().gM(arg);
},

us: function(comboBox,selectedRecord,recordNr){
		var store = c.fI();
		var selected = store[recordNr];
		var selectedCode = selected[1];
		var selectedLangCode = selectedCode.substr(0,2);
		if(t.languageForUI == selectedCode.substr(0,2))
			{return t.aU('kt');}
var r = t.mr(t.ku);
		if(!r)
			{var M = E.getCmp('comboPorECLanguage');
			M.setValue(c.mG(t.languageForUI));
			return r;}
		t.languageForUI = selectedLangCode;
		a.reloadApplication();
		return true; 
	},

uw: function(comboBox,selectedRecord,recordNr){
		var store = c.hq();
		var selected = store[recordNr];
		var selectedCode = selected[0];
		if(c.bT == selectedCode)
			{return t.aU('kl');}
		var r = t.mr(t.km);
if(!r) {return r;}
		c.bT = selectedCode;
		a.reloadApplication();
		return true; 
	},

reloadApplication: function(){
		var newUrl = c.c20020 + "index.html?&" + c.c20060 +'='+ t.languageForUI + '&' + c.c20061 +'='+ c.bT;
		window.location = newUrl;
	},


activeTabPanel: function(){
		var tab = a.uiPages().getActiveTab();
		if(this.fF()) {tab = men.ls();}
		return tab;
	},

qr: function(){
		var C = this.cR();
return this.lv(C);
	},

cR: function(){
		var aO = this.activeTabPanel();
		return this.re(aO);
	},

nR: function(){
		return this.lv(this.cR());
	},

lv: function(bk){
		if(this.lW()) {return bk;}
		if(bk !== this.bU)
		{var rM = this.aI(this.bU);
			rM.aO.show();}
		return this.bU;
	},

eD: function(T){
		var H = this.aI(T);
		H.aO.show();
	},

V: function(){
	a.checkSys();											
		return this.gw();
	},

gw: function(){
		var bk = this.qr();
		var setActive = false;
		if(isNaN(bk)) 
		{bk = 1;
			setActive = true;}
		var H = this.aI(bk);
		if(setActive) {H.show();
			this.eL(H.aO);}
		return H;
	},

xQ: function(){
		var tabID = this.activeTabPanel().id;	
		return tabID;
	},

tU: function(){
		var bk;
		var nX;
		bk = this.qr();
		nX = this.aI(bk);
		return nX;
	},

xP: function(){
		var I = this.V();
		var wo = I.eB;
		return wo;
	},

xO: function(){
		var activePage = this.tU();
		var imageFileName = activePage.lz;
		return imageFileName;
	},

vj: function(){
		var T = this.cR();
		var vr = this.allTabsSize();
		return (T == vr);
	},

vo: function(){
		var T = this.cR();
		return (T == 1);
	},

yF: function(tabName){
var max = this.allTabsSize();					
		for (i=1; i <= max + 1; i++){					
		ee = this.aI(i);
		var nB = ee.al;
if(nB.tabName == tabName){
				return nB;
			}
		}
	return null;
	},

re: function(aPanel){
		var C = aPanel.C;
		if(!isNaN(C)) {if(C > 0) {return C;}}

return 1;
},

oU: function(aString){
		if(aString == c.c30260) {return 1;}
		if(aString == c.c30261) {return 2;}
		if(aString == c.c30262) {return 3;}
		var pos = aString.indexOf('_');
		var C = Number(aString.substr(pos+1));
		return C;
	},

setJobReady: function(aSymbol){

	},

nF: function(P){
		var aCatObj = this.bf(P);
		aCatObj.bl();
		this.ow(aCatObj);
		var ai = aCatObj.tD();
		this.rk(ai);
		return aCatObj;
	},

lF: function(P){
		this.nF(P);
		this.qO();
	},

rk: function(ai){
		var grid = this.ui['pagesGrid'];
		var colModel = grid.getColumnModel();
		grid.reconfigure(ai, colModel);
	},

yp: function(aX){
	    var store = new E.data.Store({
		reader: pagesReader,
		storeId: aX.P,									
		url: c.bz(aX.P),
		listeners: {'load': function(){
					a.setJobReady('#pagesReader');}	
					}	
		});	
		return store;
	},

qO: function(){
		this.dT('accPageTitles').expand();
	},

qZ: function(){
		if(!c.c30520) {return;}
		this.dT('accCatalogs').expand();
	},

yG: function(){
		if(!c.c30510) {return;}
		this.dT('accCompanies').expand();
	},

yH: function(){
		if(!c.c30550) {return;}
		this.dT('accBasket').expand();
	},

ecErr: function(errCode){
		err.add(errCode);
		alert('Error '+errCode);
	},

gD: function(){
		this.lT	= c.c30810;		
		this.dF	= c.c30820;		
		this.df		= c.c30830;		
this.dz	= c.c30810;		
		this.ec(null,c.c30820,c.c30830);
	},

ua: function(){
		var ai = this.io['companiesStore']; 

		for (var i = 0, item; item = ai.getAt(i); i++) {		
			var newComp = this.vF(item.get('CompanyId'));
			newComp.qR(item);
		}

	},

tV: function(){
		var ai = this.io['catalogStore'];
		
		for (var i = 0, item; item = ai.getAt(i); i++) {		
		var tmp = this.bf(item.get('CatalogId'));
		if(tmp !== undefined) {debugger;}							
			var mU = this.vE(item.get('CatalogId'));
			mU.qQ(item);					
			mU.bl();								
		}

	},










vH: function(){
		return this.mf = new Date().getTime();
	},

vG: function(){
		var next = this.mf + 500;
		var now = new Date().getTime();
		return (next < now);
	},

nop: function(){
	}

}
});
app = new lw();									
	a = app;											

lq = E.extend(lw, {
	  constructor: function() {
this.K = 'ecAppCont';							
		lq.superclass.constructor.apply(this, arguments);
    },
  
  C : 0,
	setTabNr : function(C) {
        this.C = C;
		this.K = 'ecAppCont';							
		}
	}
	);

	appCnt = new lq();								

	




a.io['sysIniReader'] = new E.ux.CSVReader({
		idProperty:	'key',
		fields: [
			{name: 'key'},
			{name: 'value'}
			]
	    });

if(c.c30510) {										
    a.io['companiesReader'] = new E.ux.CSVReader({
		idProperty:	'CompanyId',
fields: [
			{name: 'CompanyId'},
			{name: 'Company'},
            {name: 'Catalogs', type: 'float'},
            {name: 'Pages', type: 'float'},
			{name: 'Languages'},
			{name: 'Country'},
			{name: 'CatalogIds'}							
]
    });
	}	

a.io['catalogReader'] = new E.ux.CSVReader({
		idProperty:	'CatalogId',
		fields: [
			{name: 'CatalogId'},
			{name: 'Company'},
			{name: 'Title'},
            {name: 'Pages', type: 'float'},
	        {name: 'Languages'}
]		
    });

a.io['pagesReader'] = new E.ux.CSVReader({
		idProperty:	'pageNr',
		fields: [
			{name: 'pageNr', type: 'float'},		
			{name: 'pageTitle'},
			{name: 'pageFileName'}
]
    });

a.io['sysIniStore'] = new E.data.Store({
		reader: a.io['sysIniReader'],
		storeId: 'sysIniStore',									
		url: c.nh(c.qf),			
		autoLoad: true,											
		listeners: {load: function(){
					c.uD();}}
	    });

if(c.c30510) {											
    a.io['companiesStore'] = new E.data.Store({
		reader: a.io['companiesReader'],
		storeId: 'companiesStore',								
		url: c.nh(c.qa),
		autoLoad: true,											
		listeners: {load: function(){
					a.ua();				
					a.setJobReady('#companiesReader');}		
		}
    });
	}	

if(c.c30520) {											
	a.io['catalogStore'] = new E.data.Store({
		reader: a.io['catalogReader'],
		storeId: 'catalogStore',							
		url: c.ek(c.qe),		
		autoLoad: true,											
		listeners: {load: function(){
					a.tV();					
					a.setJobReady('#catalogReader');}			
		}
    });
	}	

a.io['pagesStore'] = new E.data.Store({
		reader: a.io['pagesReader'],
		storeId: 'pagesStore',									
		autoLoad: true,											
		url: c.ek(c.ld),				
		listeners: {load: function(){
					a.setJobReady('#pagesReader->'+c.ld);
					}
		}
    });


if(c.c30510) {												
	a.ui['companiesGrid'] = new E.grid.GridPanel({
        store: a.io['companiesStore'],
		id: 'companiesGrid',
		columns: [
            {id:'Company', header: 'Company', width: 150, sortable: true, dataIndex: 'Company'},
			{id:'Catalogs', header: 'Cat', width: 40, sortable: true, align: 'right', dataIndex: 'Catalogs'},
            {id:'Pages', header: 'Pages', width: 40, sortable: true, align: 'right', dataIndex: 'Pages'},
            {id:'Languages', header: 'Lang', width: 80, sortable: true, dataIndex: 'Languages'},
            {id:'Country', header: 'In', width: 40, sortable: true, dataIndex: 'Country'}
],
        stripeRows: true,
        autoExpandColumn: 'Company',
        height: 500,
        width: 600,
		listeners: {
			rowclick : function (grid, row, e) {
				fd(grid, row, e);
			}}
    });
	}	

if(c.c30520) {												
	a.ui['catalogsGrid'] = new E.grid.GridPanel({
        store: a.io['catalogStore'],
		id: 'catalogsGrid',
		columns: [				
            {id: 'Title', header: 'Title', width: 250, sortable: true, dataIndex: 'Title'},
			{id: 'Company', header: 'Company', width: 100, sortable: true, dataIndex: 'Company'},
			{id: 'Pages', header: 'Pages', width: 50, sortable: true, align: 'right', dataIndex: 'Pages'},
            {id: 'Languages',header: 'Lang', width: 50, sortable: true, dataIndex: 'Languages'},
            {id: 'CatalogId',header: 'Id', width: 70, sortable: true, dataIndex: 'CatalogId'}
		        ],
        stripeRows: true,
        autoExpandColumn: 'Title',
        height: 500,
        width: 600,
		listeners: {
			rowclick : function (grid, row, e) {
				men.cG(grid, row, e);},
			rowdblclick : function (grid, row, e) {
				men.ur(grid, row, e);}
				}
    });

a.ui['catalogsGridLarge'] = new E.grid.GridPanel({
        store: a.io['catalogStore'],
		id: 'catalogsGridLarge',
		columns: [				
            {id: 'Title', header: 'Title', width: 250, sortable: true, dataIndex: 'Title'},
			{id: 'Company', header: 'Company', width: 100, sortable: true, dataIndex: 'Company'},
			{id: 'Pages', header: 'Pages', width: 50, sortable: true, align: 'right', dataIndex: 'Pages'},
            {id: 'Languages',header: 'Lang', width: 50, sortable: true, dataIndex: 'Languages'},
            {id: 'CatalogId',header: 'Id', width: 70, sortable: true, dataIndex: 'CatalogId'}
		        ],
        stripeRows: true,
        autoExpandColumn: 'Title',
        height: 500,
        width: 800,
		listeners: {
			rowclick : function (grid, row, e) {
				men.uq(grid, row, e);},			
			rowdblclick : function (grid, row, e) {
				men.uk(grid, row, e);}		
				}
    });

	}	

a.ui['pagesGrid'] = new E.grid.GridPanel({
        store: a.io['pagesStore'],
		id: 'pagesGrid',
        columns: [
            {id:'pageNr', header: 'No', width: 30, sortable: true, align: 'right', dataIndex: 'pageNr'},
            {id: 'pageTitle', header: 'Page title', width: 250, sortable: true, dataIndex: 'pageTitle'}
		        ],
        stripeRows: true,
        autoExpandColumn: 'pageTitle',
        height: 500,
        width: 300,
		listeners: {
rowdblclick : function (grid, row, e) {
				men.my(grid, row, e);},
			rowclick : function (grid, row, e) {
				men.mz(grid, row, e);}
				}
    });

a.ui['pagesGridLarge'] = new E.grid.GridPanel({
        store: a.io['pagesStore'],
		id: 'pagesGridLarge',
        columns: [
            {id:'pageNr', header: 'No', width: 30, sortable: true, align: 'right', dataIndex: 'pageNr'},
            {id: 'pageTitle', header: 'Page title', width: 250, sortable: true, dataIndex: 'pageTitle'}
		        ],
        stripeRows: true,
        autoExpandColumn: 'pageTitle',
        height: 500,
        width: 300,
		listeners: {
			rowdblclick : function (grid, row, e) {
				men.my(grid, row, e);},
			rowclick : function (grid, row, e) {
				men.mz(grid, row, e);}
				}
    });




Class("ECTab",{isa: cs,
    has: {
		C:						{is: "rw"},		
		tabName:					{is: "rw"},		
		tabCatalogId:				{is: "rw"},		
		tabCatalogObj:				{is: "rw"},		
		al:					{is: "rw"},		
		bK:					{is: "rw"},		
eB:	{is: "rw"},		
		aB:	{is: "rw"},		
		rG:		{is: "rw"},		
		aO:				{is: "rw"},		
		bN:				{is: "rw"},		
		tabTitle:					{is: "rw"},		
tabType:					{is: "rw"},		
		lJ:				{is: "rw",		
									init: false},
		bu:				{is: "rw"},		
		tabAreasDrawn:				{is: "rw",		
									init: false},
		gA:			{is: "rw"},		
		hsHtml:						{is: "rw"},		
		tabJg:						{is: "rw"}		
  },
	
    methods: {

	initialize: function(){
		this.K = 'ecTab';
		this.hsHtml = new L();	
		this.gA = E.ux.ECPagePanel;
		this.keys = [37, 38, 38, 40, 107, 109];
	this.bu = c.c30210;
		return this;
	},

lM: function(){
		return true;
	},

fB: function(T){
		var bL = document.createElement('img');
	    bL.src = this.gs();
		bL.id = c.jQ(T); 
bL.useMap = c.vs(this.C);		
		this.rG = bL;
		return bL;
		},

gs: function(){
		this.bN = this.tabCatalogObj.pP(this.bK);
		return c.bz(this.tabCatalogId, this.bN);
	},

gS: function(ay){
		this.al = ay;
		this.bK = ay.pageNr;
		this.tabTitle = ay.pageTitle;
		this.hl(ay.pS());
a.ec(ay.aE,ay.aK,ay.pageNr);
		this.hm(this.bK);
		return this;
	},

hl: function(bs){
		this.tabCatalogId = bs.P;
		this.tabCatalogObj = bs;
		return this;
	},

rm: function(bs,an){
		this.hl(bs);
		var av = bs.cN(an, this.C);
		this.gS(av);
		return av;
	},

testIfTabExists: function(T){

	},

xH: function(){
		return this.al.lz;
	},

xB: function(C){
		var panelName = this.fD(C);
		var tabPanel = a.uiPages().get(panelName); 

		return tabPanel;
	},

eC: function(){
		return this.lJ;
	},

setIsFirstPageTabTo: function(bc){
		return this.lJ = bc;
	},

setTabPanelObj: function(aPanel){
		return this.aO = aPanel;
	},

closeTabAction: function(){
	},

setTabType: function(aSymbol){
		return this.tabType = aSymbol;
	},

ca: function(){
		return (this.tabType == '#page');
	},

yN: function(){
		return (this.tabType == '#home');
	},

yJ: function(){
		return (this.tabType == '#content');
	},

yO: function(){
		return (this.tabType == '#details');
	},

lQ: function(){
		if(!this.ca()) {return false;}
		if(this.eC()) {return false;}
		return true;
	},

gR: function(){
		return this.tabAreasDrawn;
	},

mn: function(){
		return this.tabAreasDrawn = true;
	},
uR: function(){
		return this.tabAreasDrawn = false;
	},

getGraphics: function(){
		if(F(this.tabJg)) 
			{var objName = c.hp(this.C);
			this.tabJg = new jsGraphics(objName);}
		return this.tabJg;
	},

drawAreaBoxes: function(){
tr.alertObsolete();		
		return this.aB.drawAreaBoxesAll(this);		
	},

bQ: function(){
return this.bu;
	},

yB: function(anInteger){
		this.xd = anInteger;
		return;
	},

setZoom: function(aq){
		this.bu = aq;
		if(!F(this.al))
			{this.al.setZoom(aq);}			
		this.oY(aq);
	},

show: function(){
		this.aO.show();
	},

cZ: function(){
		if(G(this.aB)) {return;}
		this.aB.cZ(this);
	},

tC: function(){
		a.nR();
		return this.al.pS();
	},

xg: function(){
		a.nR();
		return this.al.aK;
	},

dc: function(){
		return this.al.lz;
	},

es: function(){
		return this.al.bZ;
	},

getFromDOMAreas: function(){
		return this.aB.body.dom.getElementsByTagName('area');
	},

getFromDOMMaps: function(){
		return this.aB.body.dom.getElementsByTagName('map');
	},

yd: function(){
		if(!a.eR()) {return;}

	},


yh: function(){
		if(!a.eR()) {return;}

	},


yi: function(){
		if(!a.eR()) {return;}

	},


createNewPageContainer: function(){
		var cO = c.hp(this.C);
		var lK = c.mD(cO);		
		var ao = this.qw(cO, lK, this.C);
return ao;
	},

qw: function(cO, lK, T){
var cssClass;
		var me = this;
		cssClass = '.map';
		var bL = this.fB(this.C);
		var ao = new this.gA({		
		id: cO,					
		setTabNr: T,					
		cls: cssClass,						
		border: false,
	H: this,						
client: bL,					
		clientImgCopy: bL,			
		x: 0, y: 0,							
	    listeners: {
render: function(ao) {
			new E.Resizable(ao.getEl(), {
	                handles: 'all',					
	                pinned: true,					
					baseCls: 'x-grid-picPagePane',	
	                transparent: true,
					resizeElement: function() {
						var box = this.proxy.getBox();
	                    ao.updateBox(box);
		                if (ao.layout) {
			                ao.doLayout();}
	                    return box;}
	           }).on('resize', resize());			
	       }	
       }		
    });			
	return ao;
	},

qo: function() {
t.alertObsolete();
this.cg(this.bK);
},

	fm: function(){
		return this.dn(c.eJ);},

	eV: function(){
		return this.dn(c.eJ * (-1));},

	tL: function(arg){
		return this.dn(c.tK * (arg));},

	dn: function(ht){
		return this.fr(ht);},

	fr: function(jG){
		var af =  Number(this.bu) + Number(jG);
		return this.dp(af);},

dp: function(af){

		if(af < c.dI)	
			{af = c.dI;}
		if(af > c.dN)
			{af = c.dN;}
		this.aY(af);
return this;
	},

cX: function(){
		var val = new Array();
		var container = this.aB;
		var imgObj = container.client;	
		val['container'] = container;
		val['imgObj'] = imgObj;
		var srcObj = container.clientImgCopy;
		val['clientHeight'] = srcObj.clientHeight;
		val['clientWidth'] = srcObj.clientWidth;

		val['clientHeightCont'] = imgObj.dom.clientHeight;
		val['clientWidthCont'] = imgObj.dom.clientWidth;

		val['parentHeight'] = srcObj.parentNode.clientHeight;
		val['parentWidth'] = srcObj.parentNode.clientWidth;
		val['parentClientHeight'] = srcObj.parentNode.clientHeight;
		val['parentClientWidth'] = srcObj.parentNode.clientWidth;
		val['parentScrollHeight'] = srcObj.parentNode.scrollHeight;
		val['parentScrollWidth'] = srcObj.parentNode.scrollWidth;

		var tst = srcObj.naturalHeight;
		val['naturalHeight'] = srcObj.naturalHeight;
		val['naturalWidth'] = srcObj.naturalWidth;
		val['scrollHeight'] = srcObj.scrollHeight;
		val['scrollWidth'] = srcObj.scrollWidth;

		val['scrollTop'] = container.body.dom.scrollTop;
		val['scrollLeft'] = container.body.dom.scrollLeft;

		val['lastHeight'] = container.lastSize.height;
		val['lastWidth'] = container.lastSize.width;

		val['winHeight'] = a.cI;
		val['winWidth'] = a.cW;
		return val;
		},

aY: function(af){
	a.setZoom(this.C, af);								
	var rcv = this.aB;
	rcv.setImageSizeTo(this, a.cW, a.cI, af);
	this.nx();
		},


gM: function(arg){
		var ll = arg.pressed;
		c.c30276 = c.tQ(ll);
		if(ll) {this.aB.drawAreaBoxesAll(this);}
		if(!ll) {
			this.cZ();
			this.aB.drawAreaBoxesYN(this);}
		},

mT: function(obj){
		this.aY(this.al.lg);
		},

uA: function(obj){
		var val = this.cX();
var diff = val['parentHeight'] / val['clientHeight'];
		var factor = diff * 100;
		var af = 100 - Math.round(factor);
this.aY(af);
		},

up: function(obj){
		var val = this.cX();
		var diff = val['winWidth'] - val['lastWidth'];
		var factor = diff / val['winWidth'] * 100;
		var af = 100 - Math.round(factor);
		this.aY(af);
		},

ql: function(){
		var val = this.cX();
		var curr = val['scrollLeft'];
		this.nj(curr - 100);
		},

	nb: function(){
		var val = this.cX();
		var curr = val['scrollLeft'];
		this.nj(curr + 100);
		},

	lo: function(){
		var val = this.cX();
		var curr = val['scrollTop'];
		this.nI(curr - 100);
		},

	qm: function(){
		var val = this.cX();
		var curr = val['scrollTop'];
		this.nI(curr + 100);
		},

	nj: function(val){
		this.aB.body.dom.scrollLeft = val;
		this.aY(this.bQ());
		},

	nI: function(val){
this.nC(val);
		this.aY(this.bQ());
		},

	nC: function(val){
		this.aB.body.dom.scrollTop = val;
		this.aY(this.bQ());
		},

cL: function(arg){
		var dq = this.gr(arg);
		this.cg(dq);
		},

wj: function(arg, val){
		this.nC(val);
		this.cL(arg);
		},

fU: function(){
		var dq = this.gr(1);
		this.cg(dq);
		},

	fS: function(){
		var dq = this.gr(-1);
		this.cg(dq);
		},

gr: function(uf){
		var cQ = this.bK;

		cQ += uf;
		var maxPage = a.tm();		
		if(cQ < 1) {cQ = 1;}				
		if(cQ > maxPage) {cQ = maxPage;}	
		return cQ;
		},

bV: function(an){
	if(c.c30110) {a.bD();}
		this.cg(an);
		},
cg: function(an){
	this.aB.nl();
	
	var dm = this.tC();
	var av = dm.cN(an, this.C);
men.mE(an);
	},

uO: function(av){
	if(av.lH) {return men.sq();}
this.aO.show();
	this.gS(av);
	var vC = av.dc();
	var af = this.bQ();
	this.aB.setImage(vC, a.cW, a.cI, af, this);
	this.hm(av.pageNr);
	this.uN(av);
	this.qM(av);
	av.nH();
a.rP(av);
return false; 
	},

uN: function(av){
	var titleButton = this.aO.getTopToolbar().get(c.nameForTBItemButton('cY', this.C));
	titleButton.setText(this.lX());
this.aO.setTitle(this.eb(av));
	},

uj: function(){
		var me = a.uiPages();
		var av = this.al;
		var ao = this.createNewPageContainer();		
		av.setValueOfPageContainer(ao);			
		this.eB = ao.id;		
		this.aB = ao;

var bG = true;
		if(this.eC()) {bG = false;}
		var panelName = this.fD(this.C);		
		var tmp = a.uiPages();
		if(!F(tmp)) {tmp.remove('helpPage');}

a.uiPages().add({					
			title: this.eb(av),
			id: panelName,							
			autoScroll: false,						
			layout: 'fit',							
			iconCls: 'tabs',
			tbar: this.aZ(),
			tabTip: av.tabTip(),
		    closable: bG,
			listeners: {
				activate: function(tabPanel){a.eL(tabPanel);},
				beforeremove: function(arg1,arg2){a.by(arg1,arg2);}
					}, 
			items: ao	
			});							
			var tabPanel = a.uiPages().get(panelName);	
		if(c.bA(53480)) {a.uiPages().add(this.uz());}
this.setTabPanelObj(tabPanel);
		this.setTabType('#page');	

		a.setTabNrToExtPanel(this.C,tabPanel);

		if(!this.eC()) {
			tabPanel.show();
			this.aY(this.al.lg);
			E.MessageBox.hide();		
			} 
		return this;
	    },
	

uz: function(){
		var nP = new E.Panel({
			id: 'helpPage',
		    border: false,
			title: t.hG,
			tabTip: t.iz,
			autoLoad: 'HelpIndex.html'
});
a.ui['helpTab'] = nP;
		return nP;
		},

aZ: function(){
		var M = new L;
		M.addMenu(this.am('eH'),c.c21110);
		M.add(this.am('gx'));
		M.addMenu(this.am('gG'),c.c21115);
		M.addMenu(this.am('gE'),c.c21120);
		M.addMenu(this.am('gB'), c.c21140);
		M.add(this.am('cY'));
		return M.asJsArray();
	},

lX: function () {
		return eo(this.al.pageTitle);
	},


ri: function(T){
		t.ri();			
		return 'tab_'+T;
	},

fD: function(T){
		return '#pagePanel_'+T;
		},

yW: function(T){
		return '#pagePanelDetails_'+T;
		},

xG: function(){
		return this.fD(this.C);
		},

eb: function(ay){
	var result = '';
		if(c.c30250 !== 1) {men.rF(); return false;}
		if(c.c30250 == 1) {result = t.fL + ay.pageNr;}
		return eo(result);
		},

	nZ: function(ay){
	var result = '';
		if(c.c30250 !== 1) {men.rF(); return false;}
		if(c.c30250 == 1) {result = t.fL + ay.pageNr;}
		return eo(result);
		},

qM: function(ay){
		var g = ay.tabTip();
		var panel = E.getCmp(this.fD(this.C));
		E.fly(panel.tabEl).child('span.x-tab-strip-text', true).qtip = g;
	},

nx: function(){
		this.hm(this.bK);
		this.oY(this.bu);
		},

hm: function(an){
		var spinnerObj = E.getCmp('buttonPorECToolsGotoPage');
		if(G(spinnerObj)) {return;}
		var aMaxValue = this.tabCatalogObj.bH;
		men.mE(an);
		spinnerObj.maxValue = aMaxValue;
		this.pz(spinnerObj,an);
		},

	pz: function(anObj, aq){
		if(F(anObj)) {return false;}
		if(F(aq)) {return false;}
		anObj.setValue(aq);
		anObj.show();
		return anObj;
		},

	oY: function(aq){
		var spinnerObj = E.getCmp('buttonPorECToolsZoomSet');
		return this.pz(spinnerObj,aq);
		},
eH: function (){
		this.menuNotYet();
	},

gx: function (){
		var dP = this.al.bJ;
		if(G(dP) || G(dP.size())) 
				{return this.menuNotYet('kn');}
	a.lE(c.c30140,dP.at(1),dP);
return true;
	},

gG: function (){
		this.menuNotYet('kp');
	},

gE: function (){
		this.menuNotYet('ko');
	},

gB: function (){
		this.menuNotYet();
	},

cY: function (){
		var o = this.al.tabTip();
		o = o.replace(/<br>/g, "\n");
		alert(o);
	}

}
});
Class("ECTabPop",{isa: ECTab,
    has: {
		driver:						{is: "rw"}		
	  },
	
    methods: {

	initialize: function(){
		this.K = 'ecTabPop';
		this.hsHtml = new L();	
		this.gA = E.ux.gb;
		this.bu = c.c30210;
		return this;
	},

lM: function(){
		return false;
	},


gs: function(){
		return c.kP(this.tabCatalogId, this.bN);
	},

dc: function(){
		return this.bN;
	},

	rp: function(anUrl){
		var rcv = this.aB;
		rcv.title = this.eb();
		rcv.setImage(anUrl, a.cW, a.cI, this.bu, this);
	},

es: function(){
		return [];
	},

	eb: function(){
		return eo(t.hH + ' ' + this.bN);
		},




mT: function(obj){
		this.aY(100);
		},

		aY: function(af){
		this.aB.setImage(this.bN,a.cW,a.cI,af,this);
		},


closeTabAction: function(){
	a.allTabsRemove(this);
	},

testIfTabExists: function(T){
		}



}
});


E.History.on('change', function(token){
		if(token){
            var parts = token.split(c.pJ);
            var tabPanel = E.getCmp(parts[0]);
			var tabId = parts[1];
            tabPanel.show();
            tabPanel.setActiveTab(tabId);
        }else{
            a.lv(1);
        }
    });



	E.ns('E.ux.form');

E.ux.Spinner = E.extend(E.util.Observable, {
    incrementValue: 1,
    alternateIncrementValue: 5,
    triggerClass: 'x-form-spinner-trigger',
    splitterClass: 'x-form-spinner-splitter',
    alternateKey: E.EventObject.shiftKey,
    defaultValue: 0,
    accelerate: false,

    constructor: function(config){
        E.ux.Spinner.superclass.constructor.call(this, config);
        E.apply(this, config);
        this.mimicing = false;
    },

    init: function(field){
        this.field = field;

        field.afterMethod('onRender', this.doRender, this);
        field.afterMethod('onEnable', this.doEnable, this);
        field.afterMethod('onDisable', this.doDisable, this);
        field.afterMethod('afterRender', this.doAfterRender, this);
        field.afterMethod('onResize', this.doResize, this);
        field.afterMethod('onFocus', this.doFocus, this);
        field.beforeMethod('onDestroy', this.doDestroy, this);
    },

    doRender: function(ct, position){
        var el = this.el = this.field.getEl();
        var f = this.field;

        if (!f.wrap) {
            f.wrap = this.wrap = el.wrap({
                cls: "x-form-field-wrap"
            });
        }
        else {
            this.wrap = f.wrap.addClass('x-form-field-wrap');
        }

        this.trigger = this.wrap.createChild({
            tag: "img",
            src: E.BLANK_IMAGE_URL,
            cls: "x-form-trigger " + this.triggerClass
        });

        if (!f.width) {
            this.wrap.setWidth(el.getWidth() + this.trigger.getWidth());
        }

        this.splitter = this.wrap.createChild({
            tag: 'div',
            cls: this.splitterClass,
            style: 'width:13px; height:2px;'
        });
        this.splitter.setRight((E.isIE) ? 1 : 2).setTop(10).show();

        this.proxy = this.trigger.createProxy('', this.splitter, true);
        this.proxy.addClass("x-form-spinner-proxy");
        this.proxy.setStyle('left', '0px');
        this.proxy.setSize(14, 1);
        this.proxy.hide();
        this.dd = new E.dd.DDProxy(this.splitter.dom.id, "SpinnerDrag", {
            dragElId: this.proxy.id
        });

        this.initTrigger();
        this.initSpinner();
    },

    doAfterRender: function(){
        var y;
        if (E.isIE && this.el.getY() != (y = this.trigger.getY())) {
            this.el.position();
            this.el.setY(y);
        }
    },

    doEnable: function(){
        if (this.wrap) {
            this.wrap.removeClass(this.field.disabledClass);
        }
    },

    doDisable: function(){
        if (this.wrap) {
            this.wrap.addClass(this.field.disabledClass);
            this.el.removeClass(this.field.disabledClass);
        }
    },

    doResize: function(w, h){
        if (typeof w == 'number') {
            this.el.setWidth(w - this.trigger.getWidth());
        }
        this.wrap.setWidth(this.el.getWidth() + this.trigger.getWidth());
    },

    doFocus: function(){
        if (!this.mimicing) {
            this.wrap.addClass('x-trigger-wrap-focus');
            this.mimicing = true;
            E.get(E.isIE ? document.body : document).on("mousedown", this.mimicBlur, this, {
                delay: 10
            });
            this.el.on('keydown', this.checkTab, this);
        }
    },

    checkTab: function(e){
        if (e.getKey() == e.TAB) {
            this.triggerBlur();
        }
    },

    mimicBlur: function(e){
        if (!this.wrap.contains(e.target) && this.field.validateBlur(e)) {
            this.triggerBlur();
        }
    },

    triggerBlur: function(){
        this.mimicing = false;
        E.get(E.isIE ? document.body : document).un("mousedown", this.mimicBlur, this);
        this.el.un("keydown", this.checkTab, this);
        this.field.beforeBlur();
        this.wrap.removeClass('x-trigger-wrap-focus');
        this.field.onBlur.call(this.field);
    },

    initTrigger: function(){
        this.trigger.addClassOnOver('x-form-trigger-over');
        this.trigger.addClassOnClick('x-form-trigger-click');
    },

    initSpinner: function(){
        this.field.addEvents({
            'spin': true,
            'spinup': true,
            'spindown': true
        });

        this.keyNav = new E.KeyNav(this.el, {
            "up": function(e){
                e.preventDefault();
                this.onSpinUp();
            },

            "down": function(e){
                e.preventDefault();
                this.onSpinDown();
            },

            "pageUp": function(e){
                e.preventDefault();
                this.onSpinUpAlternate();
            },

            "pageDown": function(e){
                e.preventDefault();
                this.onSpinDownAlternate();
            },

            scope: this
        });

        this.repeater = new E.util.ClickRepeater(this.trigger, {
            accelerate: this.accelerate
        });
        this.field.mon(this.repeater, "click", this.onTriggerClick, this, {
            preventDefault: true
        });

        this.field.mon(this.trigger, {
            mouseover: this.onMouseOver,
            mouseout: this.onMouseOut,
            mousemove: this.onMouseMove,
            mousedown: this.onMouseDown,
            mouseup: this.onMouseUp,
            scope: this,
            preventDefault: true
        });

        this.field.mon(this.wrap, "mousewheel", this.fQ, this);

        this.dd.setXConstraint(0, 0, 10)
        this.dd.setYConstraint(1500, 1500, 10);
        this.dd.endDrag = this.endDrag.createDelegate(this);
        this.dd.startDrag = this.startDrag.createDelegate(this);
        this.dd.onDrag = this.onDrag.createDelegate(this);
    },

    onMouseOver: function(){
        if (this.disabled) {
            return;
        }
        var middle = this.getMiddle();
        this.tmpHoverClass = (E.EventObject.getPageY() < middle) ? 'x-form-spinner-overup' : 'x-form-spinner-overdown';
        this.trigger.addClass(this.tmpHoverClass);
    },

    onMouseOut: function(){
        this.trigger.removeClass(this.tmpHoverClass);
    },

    onMouseMove: function(){
        if (this.disabled) {
            return;
        }
        var middle = this.getMiddle();
        if (((E.EventObject.getPageY() > middle) && this.tmpHoverClass == "x-form-spinner-overup") ||
        ((E.EventObject.getPageY() < middle) && this.tmpHoverClass == "x-form-spinner-overdown")) {
        }
    },

    onMouseDown: function(){
        if (this.disabled) {
            return;
        }
        var middle = this.getMiddle();
        this.tmpClickClass = (E.EventObject.getPageY() < middle) ? 'x-form-spinner-clickup' : 'x-form-spinner-clickdown';
        this.trigger.addClass(this.tmpClickClass);
    },

    onMouseUp: function(){
        this.trigger.removeClass(this.tmpClickClass);
    },

    onTriggerClick: function(){
        if (this.disabled || this.el.dom.readOnly) {
            return;
        }
        var middle = this.getMiddle();
        var ud = (E.EventObject.getPageY() < middle) ? 'Up' : 'Down';
        this['onSpin' + ud]();
    },

    getMiddle: function(){
        var t = this.trigger.getTop();
        var h = this.trigger.getHeight();
        var middle = t + (h / 2);
        return middle;
    },

    isSpinnable: function(){
        if (this.disabled || this.el.dom.readOnly) {
            E.EventObject.preventDefault(); 
            return false;
        }
        return true;
    },

    fQ: function(e){
        if (this.wrap.hasClass('x-trigger-wrap-focus') == false) {
            return;
        }

        var delta = e.getWheelDelta();
        if (delta > 0) {
            this.onSpinUp();
            e.stopEvent();
        }
        else
            if (delta < 0) {
                this.onSpinDown();
                e.stopEvent();
            }
    },

    startDrag: function(){
        this.proxy.show();
        this._previousY = E.fly(this.dd.getDragEl()).getTop();
    },

    endDrag: function(){
        this.proxy.hide();
    },

    onDrag: function(){
        if (this.disabled) {
            return;
        }
        var y = E.fly(this.dd.getDragEl()).getTop();
        var ud = '';

        if (this._previousY > y) {
            ud = 'Up';
        } 
        if (this._previousY < y) {
            ud = 'Down';
        } 
        if (ud != '') {
            this['onSpin' + ud]();
        }

        this._previousY = y;
    },

    onSpinUp: function(){
        if (this.isSpinnable() == false) {
            return;
        }
        if (E.EventObject.shiftKey == true) {
            this.onSpinUpAlternate();
            return;
        }
        else {
            this.spin(false, false);
        }
        this.field.fireEvent("spin", this);
        this.field.fireEvent("spinup", this);
    },

    onSpinDown: function(){
        if (this.isSpinnable() == false) {
            return;
        }
        if (E.EventObject.shiftKey == true) {
            this.onSpinDownAlternate();
            return;
        }
        else {
            this.spin(true, false);
        }
        this.field.fireEvent("spin", this);
        this.field.fireEvent("spindown", this);
    },

    onSpinUpAlternate: function(){
        if (this.isSpinnable() == false) {
            return;
        }
        this.spin(false, true);
        this.field.fireEvent("spin", this);
        this.field.fireEvent("spinup", this);
    },

    onSpinDownAlternate: function(){
        if (this.isSpinnable() == false) {
            return;
        }
        this.spin(true, true);
        this.field.fireEvent("spin", this);
        this.field.fireEvent("spindown", this);
    },

    spin: function(down, alternate){
        var v = parseFloat(this.field.getValue());
        var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
        (down == true) ? v -= incr : v += incr;

        v = (isNaN(v)) ? this.defaultValue : v;
        v = this.fixBoundries(v);
        this.field.setRawValue(v);
    },

    fixBoundries: function(value){
        var v = value;

        if (this.field.minValue != undefined && v < this.field.minValue) {
            v = this.field.minValue;
        }
        if (this.field.maxValue != undefined && v > this.field.maxValue) {
            v = this.field.maxValue;
        }

        return this.fixPrecision(v);
    },

    fixPrecision: function(value){
        var nan = isNaN(value);
        if (!this.field.allowDecimals || this.field.decimalPrecision == -1 || nan || !value) {
            return nan ? '' : value;
        }
        return parseFloat(parseFloat(value).toFixed(this.field.decimalPrecision));
    },

    doDestroy: function(){
        if (this.trigger) {
            this.trigger.remove();
        }
        if (this.wrap) {
            this.wrap.remove();
            delete this.field.wrap;
        }

        if (this.splitter) {
            this.splitter.remove();
        }

        if (this.dd) {
            this.dd.unreg();
            this.dd = null;
        }

        if (this.proxy) {
            this.proxy.remove();
        }

        if (this.repeater) {
            this.repeater.purgeListeners();
        }
    },
validator: function(){
        var value = this.getValue();
        
        if (value != this.spinner.fixBoundries(value))
        {
            this.spinner.spin.call(this.spinner, null, false);
        }
        
        return true;
    }
});

E.form.Spinner = E.ux.Spinner;

E.ns('E.ux.form');

E.ux.form.SpinnerField = E.extend(E.form.NumberField, {
    actionMode: 'wrap',
    deferHeight: true,
    autoSize: E.emptyFn,
onBlur: E.emptyFn,
    adjustSize: E.BoxComponent.prototype.adjustSize,

	constructor: function(config) {
		var spinnerConfig = E.copyTo({}, config, 'incrementValue,alternateIncrementValue,accelerate,defaultValue,triggerClass,splitterClass');

		var spl = this.spinner = new E.ux.Spinner(spinnerConfig);

		var plugins = config.plugins
			? (E.isArray(config.plugins)
				? config.plugins.push(spl)
				: [config.plugins, spl])
			: spl;

		E.ux.form.SpinnerField.superclass.constructor.call(this, E.apply(config, {plugins: plugins}));
	},

    getResizeEl: function(){
        return this.wrap;
    },

    getPositionEl: function(){
        return this.wrap;
    },

    alignErrorIcon: function(){
        if (this.wrap) {
            this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]);
        }
    },

    validateBlur: function(){
        return true;
    }
});

E.reg('spinnerfield', E.ux.form.SpinnerField);

E.form.SpinnerField = E.ux.form.SpinnerField;


E.ux.Spinner.Strategy = function(config){
	E.apply(this, config);
};

E.extend(E.ux.Spinner.Strategy, E.util.Observable, {
	defaultValue : 0,
	minValue : undefined,
	maxValue : undefined,
	incrementValue : 1,
	alternateIncrementValue : 5,
	
	onSpinUp : function(field){
		this.spin(field, false, false);
	},

	onSpinDown : function(field){
		this.spin(field, true, false);
	},

	onSpinUpAlternate : function(field){
		this.spin(field, false, true);
	},

	onSpinDownAlternate : function(field){
		this.spin(field, true, true);
	},

	spin : function(field, down, alternate){
	},

	fixBoundries : function(value){
		return value;
		}
});


E.ux.Spinner.NumberStrategy = function(config){
	E.ux.Spinner.NumberStrategy.superclass.constructor.call(this, config);
};

E.extend(E.ux.Spinner.NumberStrategy, E.ux.Spinner.Strategy, {

    allowDecimals : false,
spin : function(field, down, alternate){
		E.ux.Spinner.NumberStrategy.superclass.spin.call(this, field, down, alternate);

		var v = parseFloat(field.getValue());
		var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;

		(down == true) ? v -= incr : v += incr ;
		v = (isNaN(v)) ? this.defaultValue : v;
		v = this.fixBoundries(v);
		field.setRawValue(v);
},

	fixBoundries : function(value){
		var v = value;

		if(this.minValue != undefined && v < this.minValue){
			v = this.minValue;
		}
		if(this.maxValue != undefined && v > this.maxValue){
			v = this.maxValue;
		}

		return this.fixPrecision(v);
	},
	
    fixPrecision : function(value){
        var nan = isNaN(value);
        if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){
            return nan ? '' : value;
        }
        return parseFloat(parseFloat(value).toFixed(this.decimalPrecision));
    }
});

E.ux.Spinner.DateStrategy = function(config){
	E.ux.Spinner.DateStrategy.superclass.constructor.call(this, config);
};

E.extend(E.ux.Spinner.DateStrategy, E.ux.Spinner.Strategy, {
	defaultValue : new Date(),
	format : "Y-m-d",
	incrementValue : 1,
	incrementConstant : Date.DAY,
	alternateIncrementValue : 1,
	alternateIncrementConstant : Date.MONTH,

	spin : function(field, down, alternate){
		E.ux.Spinner.DateStrategy.superclass.spin.call(this);

		var v = field.getRawValue();
		
		v = Date.parseDate(v, this.format);
		var dir = (down == true) ? -1 : 1 ;
		var incr = (alternate == true) ? this.alternateIncrementValue : this.incrementValue;
		var dtconst = (alternate == true) ? this.alternateIncrementConstant : this.incrementConstant;

		if(typeof this.defaultValue == 'string'){
			this.defaultValue = Date.parseDate(this.defaultValue, this.format);
		}

		v = (v) ? v.add(dtconst, dir*incr) : this.defaultValue;

		v = this.fixBoundries(v);
		field.setRawValue(E.util.Format.date(v,this.format));
	},
	
	fixBoundries : function(date){
		var dt = date;
		var min = (typeof this.minValue == 'string') ? Date.parseDate(this.minValue, this.format) : this.minValue ;
		var max = (typeof this.maxValue == 'string') ? Date.parseDate(this.maxValue, this.format) : this.maxValue ;

		if(this.minValue != undefined && dt < min){
			dt = min;
		}
		if(this.maxValue != undefined && dt > max){
			dt = max;
		}

		return dt;
	}

});

E.ux.Spinner.TimeStrategy = function(config){
	E.ux.Spinner.TimeStrategy.superclass.constructor.call(this, config);
};

E.extend(E.ux.Spinner.TimeStrategy, E.ux.Spinner.DateStrategy, {
	format : "H:i",
	incrementValue : 1,
	incrementConstant : Date.MINUTE,
	alternateIncrementValue : 1,
	alternateIncrementConstant : Date.HOUR
});



(function() {

	E.namespace("E.ux");

	var tmceInitialized = false;

	E.ux.TinyMCE = E.extend(

	function(cfg) {

			var config = {
				tinymceSettings: {
					accessibility_focus: false
				}
			};

			E.apply(config, cfg);

			this.addEvents({
				"editorcreated": true
			});

			E.ux.TinyMCE.superclass.constructor.call(this, config);
		},

	E.form.Field,

	{
		tinymceSettings: null,

		allowBlank: true,
		invalidText: "The value in this field is invalid",
		invalidClass: "invalid-content-body",
		minLengthText : 'The minimum length for this field is {0}',
		vx : 'The maximum length for this field is {0}',
		blankText : 'This field is required',

		hideMode: 'offsets',
		defaultAutoCreate: {
			tag: "textarea",
			style: "width:1px;height:1px;",
			autocomplete: "off"
		},

		initComponent: function() {
			this.tinymceSettings = this.tinymceSettings || {};
			E.ux.TinyMCE.initTinyMCE({ language: this.tinymceSettings.language });
		},

		initEvents: function() {
			this.originalValue = this.getValue();
		},

		onRender: function(ct, position) {
			E.ux.TinyMCE.superclass.onRender.call(this, ct, position);

			var el = this.getEl();
			if (E.type(this.width) == "number") {
				this.tinymceSettings.width = this.width;
			}
			if (E.type(this.height) == "number") {
				this.tinymceSettings.height = this.height;
			}

			this.el.dom.setAttribute('tabIndex', -1);
			this.el.addClass('x-hidden');
			
			this.textareaEl = this.el;
			var wrapElStyle = { overflow: "hidden" };
			if( E.isIE ) { 
				wrapElStyle["margin-top"] = "-1px";
				wrapElStyle["margin-bottom"] = "-1px";
			}
			this.wrapEl = this.el.wrap({ style: wrapElStyle });
			this.actionMode = "wrapEl"; 
			
			
			var id = this.getId();

			this.ed = new tinymce.Editor(id, this.tinymceSettings);

			var validateContentTask = new E.util.DelayedTask( this.validate, this );
			this.ed.onKeyPress.add(function(ed, controlManager) {
				validateContentTask.delay( 250 );
			} .createDelegate(this));

			this.ed.onBeforeRenderUI.add(function(ed, controlManager) {
				ed.controlManager = new ControlManager(this, ed);
			} .createDelegate(this));

			this.ed.onPostRender.add(function(ed, controlManager) {
				var s = ed.settings;

				var tbar = E.get(E.DomQuery.selectNode("#" + this.ed.id + "_tbl td.mceToolbar"));
				if( tbar != null ) {
					var tbars = tbar.select("> table.mceToolbar");
					E.DomHelper
						.append( tbar,
							{ tag: "div", id: this.ed.id + "_xtbar", style: { overflow: "hidden"} }
							, true )
						.appendChild(tbars);
				}
				
				ed.windowManager = new WindowManager(this.ed);
				E.get(ed.getContentAreaContainer()).addClass('patch-content-body');

				E.Element.fly(s.content_editable ? ed.getBody() : (tinymce.isGecko ? ed.getDoc() : ed.getWin()))
					.on("focus", this.onFocus, this);

				E.Element.fly(s.content_editable ? ed.getBody() : (tinymce.isGecko ? ed.getDoc() : ed.getWin()))
					.on("blur", this.onBlur, this,
						this.inEditor && E.isWindows && E.isGecko ? { buffer: 10} : null
					);

			} .createDelegate(this));

			this.ed.onChange.add(function(ed, l) {
				this.fireEvent("change", ed, l);
			} .createDelegate(this));

			this.ed.render();
			tinyMCE.add(this.ed);
			
			(function fixEditorSize() {
			
				if( !this.isVisible() ) {
					arguments.callee.defer( 50, this );
					return;
				}
				
				var size = this.getSize();
				this.withEd( function() {
					this._setEditorSize( size.width, size.height );
				});
			}).call( this );

			this.fireEvent("editorcreated");
		},

		getResizeEl: function() {
			return this.wrapEl;
		},

		getName: function() {
			return this.rendered && this.textareaEl.dom.name
				? this.textareaEl.dom.name : (this.name || '');
		},

		initValue: function() {

			if (!this.rendered)
				E.ux.TinyMCE.superclass.initValue.call(this);
			else {
				if (this.value !== undefined) {
					this.setValue(this.value);
				}
				else {
					var v = this.textareaEl.value; 
					if ( v )
						this.setValue( v );
				}
			}
		},

		beforeDestroy: function() {
			if (this.ed) tinyMCE.remove(this.ed);
			E.ux.TinyMCE.superclass.beforeDestroy.call(this);
		},

		getRawValue : function(){
	
			if( !this.rendered || !this.ed.initialized )
				return E.value( this.value, '' );
				
			var v = this.ed.getContent();
			if(v === this.emptyText){
				v = '';
			}
			return v;
		},

		getValue: function() {

			if( !this.rendered || !this.ed.initialized )
				return E.value( this.value, '' );

			var v = this.ed.getContent();
			if( v === this.emptyText || v === undefined ){
				v = '';
			}
			return v;
		},

		setRawValue: function(v) {
			this.value = v;
			if (this.rendered)
				this.withEd(function() {
					this.ed.undoManager.clear();
					this.ed.setContent(v === null || v === undefined ? '' : v);
					this.ed.startContent = this.ed.getContent({ format: 'raw' });
				});
		},

		setValue: function(v) {
			this.value = v;
			if (this.rendered)
				this.withEd(function() {
					this.ed.undoManager.clear();
					this.ed.setContent(v === null || v === undefined ? '' : v);
					this.ed.startContent = this.ed.getContent({ format: 'raw' });
					this.validate();
					});
		},

		isDirty: function() {
			if (this.disabled || !this.rendered) {
				return false;
			}
			this.withEd(function() {
				return this.ed.isDirty();
			});
		},

		syncValue: function() {
			if (this.rendered && this.ed.initialized)
				this.ed.save();
		},

		getEd: function() {
			return this.ed;
		},

		disable: function() {
			this.withEd(function() {
				var bodyEl = this.ed.getBody();
				bodyEl = E.get(bodyEl);

				if (bodyEl.hasClass('mceContentBody')) {
					bodyEl.removeClass('mceContentBody');
					bodyEl.addClass('mceNonEditable');
				}
			});
		},

		enable: function() {
			this.withEd(function() {
				var bodyEl = this.ed.getBody();
				bodyEl = E.get(bodyEl);

				if (bodyEl.hasClass('mceNonEditable')) {
					bodyEl.removeClass('mceNonEditable');
					bodyEl.addClass('mceContentBody');
				}
			});
		},

		onResize: function(aw, ah) {
			if( E.type( aw ) != "number" ){
				aw = this.getWidth();
			}
			if( E.type(ah) != "number" ){
				ah = this.getHeight();
			}
			if (aw == 0 || ah == 0)
				return;

			if (this.rendered) {
				this.withEd(function() { this._setEditorSize( aw, ah ); });
			}
		},
		
		_setEditorSize: function( width, height ) {
		
			if( height < 100 ) height = 100;
			
			var div = E.get(this.ed.id + "_xtbar");
			if( div )
				div.setWidth( width - 2 );
				
			this.ed.theme.resizeTo( width, height );
		},

		focus: function(selectText, delay) {
			if (delay) {
				this.focus.defer(typeof delay == 'number' ? delay : 10, this, [selectText, false]);
				return;
			}

			this.withEd(function() {
				this.ed.focus();
				});

			return this;
		},

		processValue : function( value ){
			return E.util.Format.stripTags( value );
		},
		
		validateValue: function( value ) {
			if(E.isFunction(this.validator)){
				var msg = this.validator(value);
				if(msg !== true){
					this.markInvalid(msg);
					return false;
				}
			}
			if(value.length < 1 || value === this.emptyText){ 
				 if(this.allowBlank){
					 this.clearInvalid();
					 return true;
				 }else{
					 this.markInvalid(this.blankText);
					 return false;
				 }
			}
			if(value.length < this.minLength){
				this.markInvalid(String.format(this.minLengthText, this.minLength));
				return false;
			}
			if(value.length > this.maxLength){
				this.markInvalid(String.format(this.vx, this.maxLength));
				return false;
			}	
			if(this.vtype){
				var vt = E.form.VTypes;
				if(!vt[this.vtype](value, this)){
					this.markInvalid(this.vtypeText || vt[this.vtype +'Text']);
					return false;
				}
			}
			if(this.regex && !this.regex.test(value)){
				this.markInvalid(this.regexText);
				return false;
			}
			return true;
		},

		withEd: function(func) {

			if (!this.ed) this.on(
				"editorcreated",
				function() { this.withEd(func); },
				this);

			else if (this.ed.initialized) func.call(this);

			else this.ed.onInit.add(function() { func.defer(10, this); } .createDelegate(this));
		}
	});

	E.apply(E.ux.TinyMCE, {

		tinymcePlugins: "safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

		initTinyMCE: function(settings) {
			if (!tmceInitialized) {

				var s = {
					mode: "none",
					plugins: E.ux.TinyMCE.tinymcePlugins,
					theme: "advanced"
				};
				E.apply(s, settings);

				if (!tinymce.dom.Event.domLoaded)
					tinymce.dom.Event._pageInit();

				tinyMCE.init(s);
				tmceInitialized = true;
			}
		}
	});

	E.ComponentMgr.registerType("tinymce", E.ux.TinyMCE);


	var WindowManager = E.extend(

		function(editor) {
			WindowManager.superclass.constructor.call(this, editor);
		},

		tinymce.WindowManager,

		{
			alert: function(txt, cb, s) {
				E.MessageBox.alert("", txt, function() {
					if (!E.lG(cb)) {
						cb.call(this);
					}
				}, s);
			},

			confirm: function(txt, cb, s) {
				E.MessageBox.confirm("", txt, function(btn) {
					if (!E.lG(cb)) {
						cb.call(this, btn == "yes");
					}
				}, s);
			},

			open: function(s, p) {

				s = s || {};
				p = p || {};

				if (!s.type)
					this.bookmark = this.editor.selection.getBookmark('simple');

				s.width = parseInt(s.width || 320);
				s.height = parseInt(s.height || 240) + (tinymce.isIE ? 8 : 0);
				s.min_width = parseInt(s.min_width || 150);
				s.min_height = parseInt(s.min_height || 100);
				s.max_width = parseInt(s.max_width || 2000);
				s.max_height = parseInt(s.max_height || 2000);
				s.movable = true;
				s.resizable = true;
				p.mce_width = s.width;
				p.mce_height = s.height;
				p.mce_inline = true;

				this.features = s;
				this.params = p;

				var win = new E.Window(
				{
					title: s.name,
					width: s.width,
					height: s.height,
					minWidth: s.min_width,
					minHeight: s.min_height,
					resizable: true,
					maximizable: s.maximizable,
					minimizable: s.minimizable,
					modal: true,
					stateful: false,
					constrain: true,
					layout: "fit",
					items: [
					{
						xtype: "iframepanel",
						border: false,
						defaultSrc: s.url || s.file,
						stateful: false
					}
					]
				});

				p.mce_window_id = win.getId();

				win.show(null,
					function() {
						if (s.left && s.top)
							win.setPagePosition(s.left, s.top);
						var pos = win.getPosition();
						s.left = pos[0];
						s.top = pos[1];
						this.onOpen.dispatch(this, s, p);
					},
					this
				);

				return win;
			},

			close: function(win) {

				if (!win.tinyMCEPopup || !win.tinyMCEPopup.id) {
					WindowManager.superclass.close.call(this, win);
					return;
				}

				var w = E.getCmp(win.tinyMCEPopup.id);
				if (w) {
					this.onClose.dispatch(this);
					w.close();
				}
			},

			setTitle: function(win, ti) {

				if (!win.tinyMCEPopup || !win.tinyMCEPopup.id) {
					WindowManager.superclass.setTitle.call(this, win, ti);
					return;
				}

				var w = E.getCmp(win.tinyMCEPopup.id);
				if (w) w.setTitle(ti);
			},

			resizeBy: function(dw, dh, id) {

				var w = E.getCmp(id);
				if (w) {
					var size = w.getSize();
					w.setSize(size.width + dw, size.height + dh);
				}
			},

			focus: function(id) {
				var w = E.getCmp(id);
				if (w) w.setActive(true);
			}

		}
	);

	var ControlManager = E.extend(

	function(control, ed, s) {
			this.control = control;
			ControlManager.superclass.constructor.call(this, ed, s);
		},

	tinymce.ControlManager,

	{
		control: null,

		createDropMenu: function(id, s) {
			var r = ControlManager.superclass.createDropMenu.call(this, id, s);

			var orig = r.showMenu;
			r.showMenu = function(x, y, px) {
				orig.call(this, x, y, px);
				E.fly('menu_' + this.id).setStyle("z-index", 200001);
			};

			return r;
		},

		createColorSplitButton: function(id, s) {
			var r = ControlManager.superclass.createColorSplitButton.call(this, id, s);

			var orig = r.showMenu;
			r.showMenu = function(x, y, px) {
				orig.call(this, x, y, px);
				E.fly(this.id + '_menu').setStyle("z-index", 200001);
			};

			return r;
		}
	});
})();

E.ns('E.ux');

E.ux.SearchField = E.extend(E.form.TwinTriggerField, {
    initComponent : function(){
        E.ux.SearchField.superclass.initComponent.call(this);
        this.on('specialkey', function(f, e){
            if(e.getKey() == e.ENTER){
                this.onTrigger2Click();
            }
        }, this);
    },

    validationEvent: false,
    validateOnBlur: false,
    trigger1Class:'x-form-clear-trigger',
    trigger2Class:'x-form-search-trigger',
	hideTrigger1: false,
    width: 180,
    hasSearch : false,
    paramName : 'query',
    params: {},

beforeClear: function(){},
    afterClear: function(){},
    beforeSeach: function(){},
    afterSeach: function(){},

onTrigger1Click : function(){
		var field = E.getCmp(this.id);
		field.reset()
		this.hasSearch = false;
},

onTrigger2Click : function(){
		var v = this.getRawValue();
        if(v.length < 1){
            this.onTrigger1Click();
			t.aU('ft');
			return;
        }
		a.sY().sB();
}
});

function mN(arg1,arg2,arg3){
		if(F(arg1)) {return;}
		var field = arg1.id;
		var value = arg1.getValue();
		a.V().bV(realRow);
		}

	function mx(arg1){
		if(F(arg1)) {return;}
		var field = arg1.id;
		var value = arg1.getValue();
		a.V().bV(value);
		}

	function og(arg1){
		var value = arg1.field.getValue();
		a.V().bV(value);
		}

	function mt(arg1){
		var value = arg1.getValue();
		a.V().dp(value);
		}

	function mV(arg1){
		var value = arg1.field.getValue();
		a.V().dp(value);
		}




E.ECMenuButton = E.extend(E.SplitButton, {
			scale: 'medium',
			height: c.c30347,
			width: c.c30349,
			x: 0,
	        arrowAlign:'bottom',
			constructor: function(config) {
				E.SplitButton.superclass.constructor.apply(this, arguments);
			} 
		}
	);	

Class("oL",{isa: cs,

	has: {
		tmp:					{	is:"rw"}						
	},
	
	methods: {

	initialize: function () {
		this.mp();
		this.wg();
		this.vn();
		this.wG();
		this.wH();
		this.wE();
		this.wB();
		this.wC();
		this.wD();
		this.mp();
	},

	menuReset: function (){
		this.tmp = [];
	},

menuAdd: function (num,trans){
		var r = [];
		var g = 'c.ae(' + num + ')';
		if(!eval(g)) {return;}
g = [];
this.tmp.push(eval(g));
	},

wg: function () {
	a.ui['buttonPorECToolsUp'] = new E.Button({
			id: 'buttonPorECToolsUp',
			icon: 'picECToolsArrowUp.gif',
			iconAlign: 'top',
			iconCls: 'buttonPorECToolsUp',
			cls: 'csButtonECTools',
			tooltip: t.tt('kj'),
			scale: 'medium',
			x: 0,
			y: c.bq(),
			handler: function (){a.V().fS();}
	});
	
	a.ui['buttonPorECToolsDown'] = new E.Button({
			id: 'buttonPorECToolsDown',
			icon: 'picECToolsArrowDown.gif',
			iconAlign: 'top',
			iconCls: 'buttonPorECToolsDown',
			cls: 'csButtonECTools',
			tooltip: t.tt('kF'),
			scale: 'medium',
			x:c.c30310,
			y:c.cw(),
			handler: function (){a.V().fU();}
	});

	a.ui['buttonPorECToolsGotoPage'] = new E.ux.form.SpinnerField({
            name: 'buttonPorECToolsGotoPage',
			id: 'buttonPorECToolsGotoPage',
			cls: 'csButtonECZoomSet',
			tooltip: t.tt('mm_buttonPorECToolsZoomSet'),
			scale: 'medium',
			allowDecimals: false,
			minValue: 1,
			maxValue: 5,
			incrementValue: 1,
			alternateIncrementValue: 10,
			accelerate: false,
			autoWidth: false,
			labelWidth: 30,
			height: c.c30330,
			width: c.c30331,
			x: 3,		
			y: c.bq() + 5,
			strategy: new E.ux.Spinner.NumberStrategy({minValue:'1', maxValue:'3'}),
			listeners: {blur: mx, change: mx, spin: og}	
		});

a.ui['bX'] = new E.Button({
			id: 'bX',
			icon: 'picECToolsZoomMinus.gif',
			iconAlign: 'top',
			iconCls: 'bX',
			cls: 'csButtonECTools',
			tooltip: t.tt('fk'),
			scale: 'medium',
			x: 0,
			y:c.bq(),
			handler: function (){a.V().eV();}
	});

	a.ui['bS'] = new E.Button({
			id: 'bS',
			icon: 'picECToolsZoomPlus.gif',
			iconAlign: 'top',
			iconCls: 'bS',
			cls: 'csButtonECTools',
			tooltip: t.tt('fv'),
			scale: 'medium',
			x:c.c30310,
			y:c.cw(),
			handler: function (){a.V().fm();}
	});

a.ui['buttonPorECToolsZoomSet'] = new E.ux.form.SpinnerField({
            name: 'buttonPorECToolsZoomSet',
			id: 'buttonPorECToolsZoomSet',
			fieldLabel: 'Z%',			
			cls: 'csButtonECZoomSet',
			tooltip: t.tt('mm_buttonPorECToolsZoomSet'),
			allowDecimals: false,
			minValue: c.dI,
			maxValue: c.dN,
			incrementValue: 10,
			alternateIncrementValue: 25,
			accelerate: true,
			autoWidth: false,
			labelWidth: 30,
			height: 40,
			height: c.c30330,
			width: c.c30331,
			x: 3,	
			y: c.bq() + 5,
			listeners: {blur: mt, change: mt, spin: mV},
handler: function (){debugger; a.V().wP(this);}
		});

a.ui['buttonPorECToolsPageSpawn'] = new E.Button({
			id: 'buttonPorECToolsPageSpawn',
			icon: 'picECToolsPageSpawn.gif',
			iconAlign: 'top',
			iconCls: 'buttonPorECToolsPageSpawn',
			cls: 'csButtonECTools',
			scale: 'medium',
			tooltip: t.tt('ki'),
			x: 0,
			y: c.bq(),
			handler: function (){a.bD();}
	});

	a.ui['buttonPorECToolsHand'] = new E.Button({
			id: 'buttonPorECToolsHand',
			enableToggle: 'true',				
			iconAlign: 'top',
			scale: 'medium',
			icon: 'picECToolsHand.gif',
			pressed: 'true',
			iconCls: 'buttonPorECToolsHand',
			cls: 'csButtonECTools',
			tooltip: t.tt('kH'),
			x:c.c30310,
			y: c.cw(),
			handler: function (){a.gM(this);}		
});

a.ui['buttonPorECToolsPageActual'] = new E.Button({			
			id: 'buttonPorECToolsPageActual',
			icon: 'picECToolsPageActual.gif',
			iconAlign: 'top',
			iconCls: 'buttonPorECToolsPageActual',
			cls: 'csButtonECTools',
			tooltip: t.tt('kJ'),
			scale: 'medium',
			x: 0,
			y: c.bq(),
			handler: function (){a.V().mT(this);}
	});

	a.ui['buttonPorECToolsPageFit'] = new E.Button({				
			id: 'buttonPorECToolsPageFit',
			iconAlign: 'top',
			scale: 'medium',
			icon: 'picECToolsPageFit.gif',
			iconCls: 'buttonPorECToolsPageFit',
			cls: 'csButtonECTools',
			tooltip: t.tt('kI'),
			x: c.c30310,
			y: c.cw(),
			handler: function (){a.V().uA(this);}
	});

if(c.bA(51600)) {
	a.ui['buttonPorECToolsPageFitWidth'] = new E.Button({			
			id: 'buttonPorECToolsPageFitWidth',
			icon: 'picECToolsPageFitWidth.gif',
			iconAlign: 'top',
			iconCls: 'buttonPorECToolsPageFitWidth',
			cls: 'csButtonECTools',
			scale: 'medium',
			tooltip: t.tt('kh'),
			x: 0,
			y: c.bq(),
			handler: function (){a.V().up(this);}
	});

	a.ui['buttonPorECToolsSearch'] = new E.Button({				
			id: 'buttonPorECToolsSearch',
			icon: 'picECToolsSearch.gif',
			iconAlign: 'top',
			iconCls: 'buttonPorECToolsSearch',
			cls: 'csButtonECTools',
			tooltip: t.tt('kk'),
			scale: 'medium',
			x:c.c30310,
			y: c.cw(),
			handler: function (){a.rJ(this);}	
	});
	}
	}, 

vn: function () {
a.ui['comboPorECLanguage'] = new E.form.ComboBox({
			id: 'comboPorECLanguage',
			emptyText: t.kL,
			editable: false,
labelStyle: 'font-weight:bold',					
			forceSelection: true,							
			hiddenName: 'comboPorECLanguageSelection',		
			hiddenValue: t.languageForUI.toUpperCase(),
			mode: 'local',
			selectOnFocus: true,
			readOnly: false,								
			triggerAction: 'all',							
			width:	120,
			listeners: {select: a.us},
			store: c.fI(),
			value: c.mG(t.languageForUI),	
			valueField: 'comboSelectedLanguage'				
			});
a.ui['comboPorECUserExpertise'] = new E.form.ComboBox({
			id: 'comboPorECUserExpertise',
			emptyText: t.eI,
			editable: false,
			labelStyle: 'font-weight:bold',					
			forceSelection: true,							
			mode: 'local',
			selectOnFocus: true,
			readOnly: false,								
			triggerAction: 'all',							
			width:	100,
			listeners: {focus: men.sm,
						select: a.uw},
			store: c.hq(),
			value: c.uI()				
			});
}, 

wG: function () {
		if(!c.ae(31000)) {return;}
		var tmp = [];
		if(c.ae(31010)) {tmp.push({id: 'men31010', text: t.ka, href:"javascript:men.mCl('cl31010')"});}
        if(c.ae(31020)) {tmp.push({id: 'men31020', text: t.jz, href:"javascript:men.mCl('cl31020')"});}
		if(c.ae(31030)) {tmp.push({id: 'men31030', text: t.jv, href:"javascript:men.mCl('cl31030')"});}
        if(c.ae(31040)) {tmp.push({id: 'men31040', text: t.jx, href:"javascript:men.mCl('cl31040')"});}
        if(c.ae(31050)) {tmp.push({id: 'men31050', text: t.jD, href:"javascript:men.mCl('cl31050')"});}
        if(c.ae(31060)) {tmp.push({id: 'men31060', text: t.jw, href:"javascript:men.mCl('cl31060')"});}
        if(c.ae(31070)) {tmp.push({id: 'men31070', text: t.jy, href:"javascript:men.mCl('cl31070')"});}
		
	a.ui['kz'] = new E.ECMenuButton({
			id: 'kz',
			cls: 'csButtonECTools',
			arrowTooltip: t.tt('eY'),
			tooltip: t.tt('eY'),
			y:c.bq(),
			text: t.kz,
			menu: new E.menu.Menu({items: [tmp]})
	});
	}, 

	wH: function () {
		if(!c.ae(32000)) {return;}
tmp = [];
		if(c.ae(32010)) {tmp.push({id: 'men32010', text: t.kC, href:"javascript:men.mCl('cl32010')"});}
		if(c.ae(32020)) {tmp.push({id: 'men32020', text: t.kA, href:"javascript:men.mCl('cl32020')"});}
		if(c.ae(32030)) {tmp.push({id: 'men32030', text: t.kB, href:"javascript:men.mCl('cl32030')"});}
	a.ui['ky'] = new E.ECMenuButton({
			id: 'ky',
			cls: 'csButtonECTools',
			arrowTooltip: t.tt('eZ'),
			tooltip: t.tt('eZ'),
			y:c.dG(),
			text: t.ky,
			menu: new E.menu.Menu({items: [tmp]})
	});
	}, 

	wE: function () {
		if(!c.ae(33000)) {return;}
		tmp = [];
		if(c.ae(33010)) {tmp.push({id: 'men33010', text: t.jB, href:"javascript:men.mCl('cl33010')"});}
		if(c.ae(33020)) {tmp.push({id: 'men33020', text: t.jo, href:"javascript:men.mCl('cl33020')"});}
		if(c.ae(33030)) {tmp.push({id: 'men33030', text: t.jp, href:"javascript:men.mCl('cl33030')"});}
	a.ui['kv'] = new E.ECMenuButton({
			id: 'kv',
			cls: 'csButtonECTools',
			arrowTooltip: t.tt('fa'),
			tooltip: t.tt('fa'),
			y:c.dG(),
			text: t.kv,
			menu: new E.menu.Menu({items: [tmp]})
	});
	}, 

	wB: function () {
		if(!c.ae(34000)) {return;}
		tmp = [];
if(c.ae(34010)) {tmp.push({id: 'men34010', text: t.jt, href:"javascript:men.mCl('cl34010')"});}
		if(c.ae(34020)) {tmp.push({id: 'men34020', text: t.jm, href:"javascript:men.mCl('cl34020')"});}
		if(c.ae(34030)) {tmp.push({id: 'men34030', text: t.jl, href:"javascript:men.mCl('cl34030')"});}
		if(c.ae(34040)) {tmp.push({id: 'men34040', text: t.ju, href:"javascript:men.mCl('cl34040')"});}
	a.ui['kw'] = new E.ECMenuButton({
			id: 'kw',
			cls: 'csButtonECTools',
			arrowTooltip: t.tt('eU'),
			tooltip: t.tt('eU'),
			height: c.c30347,
			width: c.c30349,
			y:c.dG(),
			text: t.kw,
			menu: new E.menu.Menu({items: [tmp]})
	});
	}, 

	wC: function () {
		if(!c.ae(38000)) {return;}
		tmp = [];
		if(c.ae(38010)) {tmp.push({id: 'men38010', text: t.jC, href: c.c38010, hrefTarget: '_blank'});}
		if(c.ae(38020)) {tmp.push({id: 'men38020', text: t.jE, href: c.c38020, hrefTarget: '_blank'});}
		if(c.ae(38030)) {tmp.push({id: 'men38030', text: t.jA, href: c.c38030, hrefTarget: '_blank'});}
	a.ui['kx'] = new E.ECMenuButton({
			id: 'kx',
			cls: 'csButtonECTools',
			arrowTooltip: t.tt('fb'),
			tooltip: t.tt('fb'),
			y:c.dG(),
			text: t.kx,
			menu: new E.menu.Menu({items: [tmp]})
	});
	}, 

	wD: function () {
		if(!c.ae(39000)) {return;}
		tmp = [];
		if(c.ae(39010)) {tmp.push({id: 'men39010', text: t.js, href: c.c39010, hrefTarget: '_blank'});}
		if(c.ae(39020)) {tmp.push({id: 'men39020', text: t.jq, href: c.c39020, hrefTarget: '_blank'});}
		if(c.ae(39030)) {tmp.push({id: 'men39030', text: t.jT, href: c.c39030, hrefTarget: '_blank'});}
		if(c.ae(39040)) {tmp.push({id: 'men39040', text: t.jr, href: c.c39040, hrefTarget: '_blank'});}
		if(a.eR()) {
			if(c.ae(39090)) 
								{tmp.push({id: 'men39090', text: t.jn, href:"javascript:men.mCl('cl39090')"});}
						}
	a.ui['kD'] = new E.ECMenuButton({
			id: 'kD',
			cls: 'csButtonECTools',
			arrowTooltip: t.tt('eT'),
			tooltip: t.tt('eT'),
			y:c.dG(),
			text: t.kD,
			menu: new E.menu.Menu({items: [tmp]})
	});
	}, 

mp: function () {
	a.ui['buttonPorECTextZoom'] = new E.form.TextField({	
			id: 'buttonPorECTextZoom',
			cls: 'ecToolsTexts',
			labelStyle: 'font-weight:bold;',
			readOnly: true,
			value: 'Zoom %',
			x:0,
			y:300
});

	a.ui['m_buttonPorECToolsCheckInNewPage'] = new E.form.Checkbox({
			id: 'm_buttonPorECToolsCheckInNewPage',
			name: 'm_buttonPorECToolsCheckInNewPage',
			boxLabel: t.iQ,
			hideLabel: true,
			checked: true,
			tooltip: t.tt('kg'),
			inputValue: c.c30110,
			tooltip:'New page in new tab',
			handler: function (){checkBoxSet(this);}
		});

	a.ui['m_buttonPorECToolsCheckClick'] = new E.form.Checkbox({
			id: 'm_buttonPorECToolsCheckClick',
			name: 'm_buttonPorECToolsCheckClick',
			boxLabel: t.iK,
			hideLabel: true,
			checked: true,
			inputValue: c.c30120,
			cls: 'csButtonECTools',
			tooltip:'New page in new tab',										
			handler: function (){checkBoxSet(this);}
		});

	a.ui['m_buttonPorECToolsIsHelpPanel'] = new E.form.Checkbox({
			id: 'm_buttonPorECToolsIsHelpPanel',
			name: 'buttonPorECToolsIsHelpPanel',
			boxLabel: t.iO,
			hideLabel: true,
			checked: true,
			cls: 'csButtonECTools',
			tooltip:'Is help panel ???',									
			handler: function (){checkBoxSet(this);}
		});

	a.ui['fieldPorECToolsZoomDefault'] = new E.form.Field({			
			id: 'fieldPorECToolsZoomDefault',
			itemId: 'fieldPorECToolsZoomDefault',			
			name: 'fieldPorECToolsZoomDefault',				
			labelWidth: 100,
			fieldLabel: t.iP,
			value: c.c30200,
			labelStyle: 'font-weight:bold',					
			tooltip:'New page in new tab',
			width: 50,										
			handler: function (){checkBoxSet(this);},
			listeners: {blur: mN}				
			});
} 

}
});
var tmp = new oL;





Class("bg",{isa: cs,
	has: {
		isBodyTextIsHtmlFile:	{is:	"rw"},	
		bi:			{is:	"rw", init: true},	
		classForPanel:			{is:	"rw"},	
		mainWindow:				{is:	"rw"},	
		mainPanelCloseAction:	{is:	"rw", init: 'close'},	
		mainPanelLayout:		{is:	"rw", init: 'border'},	
		tbMenuItems:			{is:	"rw",	
								init: (new L)}				
    },

    methods: {

	initialize: function(){
		this.K = 'ecDrDetails';
		this.bi = true;		
		this.keys = [];					
		return this;
	},

aJ: function(){
debugger;		
		var title = this.getWindowTitle();
		var mainWindow = this.di(title,this.id);
		mainWindow.show();
		return false;
	},

dD: function(){
		var config = new L;
														config.bo(this.bm('hw','DetailsPopDetails.html','c30410'));
		config.bo(this.bm('hy','DetailsPopDetails2.html','c30411'));
		config.bo(this.bm('hx','DetailsPopDetails3.html','c30412'));
		config.bo(this.bm('hJ','DetailsPopPictures.html','c30413'));
		config.bo(this.bm('hM','DetailsPopTech.html','c30414'));
		config.bo(this.bm('hN','DetailsPopRelated.html','c30415'));
		config.bo(this.bm('hL','DetailsPopPricing.html','c30416'));
		config.bo(this.bm('hK','DetailsPopOrder.html','c30419'));
		return config.asJsArray();
	},

aZ: function(){
		var M = new L;
		M.add(this.am('eE'));
		M.add(this.am('eP'));
		M.add(this.am('eO'));
if(this.bi) {
			M.add(this.am('cq'));
			M.add(this.am('aC'));}
		return M.asJsArray();
	},

di: function(title, id){
	var driver = this;
	var panelClass = this.classForPanel;
	var panel = new panelClass({
		title: title,
		id: id,
		closeAction: this.mainPanelCloseAction,
		driver: this,
layout: this.mainPanelLayout,
		width: this.formSizeX,
		height: this.formSizeY,
		x: this.formPosX,			
		y: this.formPosY,
		maximizable  : true,
		collapsible  : true,
		plain: true,
		bt: true,
autoScroll: true,
		iconCls: 'tabs',
tbar: this.aZ(),
		closable: true,			
		plugins: new E.ux.TabCloseMenu(),	
		listeners: {move: driver.setPosWindow, 
					resize: driver.cU,
					close: function(){driver.closeAction(driver);},
					show: function(){driver.showActions(driver);},
					activate: function(){a.setDriverActive(driver);}
},
		items: this.fq()
	});
		this.setMainWindow(panel);
		return panel;
	},

showActions: function(){
	},


fq: function(){
	var r = {
			xtype: 'tabpanel',
			region:'center',
frame: true,
			border: false,
			bt: true,
autoScroll: true,
			activeItem: 0,
			closable: true,			
			items: this.dD()
			};
return r;
		},

bm: function(title, aFileName,cfgVar){
		if(eval('c.'+cfgVar) != '1') {return null;}
		var id = this.id + cfgVar;
		var tip = eval('t.t'+title);
		var titleText = eval('t.'+title);						
		var config = {
				xtype: 'panel',
title: ('<h1>'+titleText+'</h1>'),
				id: (id + this.id),								
				frame: false,
				border: true,
				autoScroll: true,
				autoLoad: aFileName,
tabTip: tip  
			};
		return config;
	},

cB: function(){
		var title = this.getWindowTitle();
		this.mainWindow = this.di(title,this.id);
		return this.mainWindow;
	},

eN: function(aPanel){
a.ui['mainTabDetails'].add(aPanel);
		a.ui['mainTabDetails'].show();
		aPanel.show();
	},

cq: function (){
			this.aC();
			a.qA(2,this.area);
		  },

eE: function (){
		a.dK(c.c30140,this.area,null,' ');
		this.cq();
	},


eP: function (){
		this.menuNotYet();
	},

lO: function (){
		this.menuNotYet();
	},

eO: function (){
		this.menuNotYet('n_infoNextReleaseServer');
	},

lS: function (){
			this.menuNotYet('n_infoNextReleaseServer');
	},

yU: function(code){
		return false;
	}

}
		});
Class("oF",{isa: bg,
    methods: {

	initialize: function(){
		this.K = 'ecDrDetailsTab';
		this.classForPanel = E.Panel;
		this.formSizeX = c.formSizeX;
		this.formSizeY = c.formSizeY;
		this.bi = false;
		this.keys = [];					
		return this;
	},

aP: function (J) {
		this.cf(J);
		this.ce(this.area.objNr);
	},

cU: function (obj,width,height) {
},

setPosWindow: function (obj,x,y) {
},


getMainWindowClose: function(){
},

aQ: function (J) {
		this.initialize();
		this.aP(J);
		this.aJ();
	  },


aJ: function(){
		this.mainWindow = this.cB();
		this.eN(this.mainWindow);
		return false;
	},


eE: function (){
		a.dK(c.c30140,this.area,null,' ');
	}


}

		});
Class("pe",{isa: bg,
	has: {
		classForPanel:			{is:	"rw"}			
	},
	
	methods: {

	initialize: function(){
		this.K = 'ecDrDetailsPop';
		this.classForPanel = E.Window;
		this.bv('c30483', 'c30484', 'c30480', 'c30481');
		this.keys = [];	
		return this;
	},

aP: function (J) {
		this.cf(J);							
		this.ce(t.iS + this.area.hg());
	},

aQ: function (J) {
		this.initialize();
		this.aP(J);
		this.aJ();
		  },

ef: function (J) {
		this.getMainWindowClose();
		this.aQ(J);
	  },

aJ: function(){
		this.cB().show();
	}

}

});
Class("kT",{isa: bg,
	has: {
		fileName:			{is:	"rw"}			
    },

	methods: {

	initialize: function(){
		this.K = 'ecDrDetailsPopHtml';
		this.classForPanel = E.Window;
		this.bv('c30488', 'c30489', 'c30486', 'c30487');
		return this;
	},

aP: function (J) {
		this.cf(J);
		this.fileName = J.cE;
		this.ce(t.iV);
	},

aQ: function (J) {
		this.initialize();
		this.aP(J);
		this.aJ();
		  },

aJ: function(){
		this.cB().show();
	},

aZ: function(){
		var r = [];
		r[0] = this.am('aC');
		return r;
	},

dD: function(){
		var subConfigPanel = [];
		subConfigPanel[0] = this.bm('hF',this.fileName,'c30425');
		return subConfigPanel;
	}

}

});
Class("lc",{isa: bg,
	has: {
		imagePrim:				{is:	"rw"},			
		imageGallery:			{is:	"rw"},			
		dU:	{is:	"rw"},			
		driverIconsList:		{is:	"rw"}			
	},
	
	methods: {

	initialize: function(){
		this.K = 'ecDrImagesPop';
		this.classForPanel = E.Window;
		this.bv('c30978', 'c30979', 'c30976', 'c30977');
		this.imageGallery = new L;
		this.dU = 1;
		this.driverIconsList = new kX;
		this.keys = [37, 38, 38, 40, 107, 109];
		return this;
	},

aP: function (J) {
		this.cf(J);
		this.ce(t.iU + this.area.objNr);
	},

wM: function (J) {
		this.imagePrim = J.bw();
		this.imageGallery = J.gH();
	},

ci: function () {
		return 'ImageDriver' + c.rnd(6);
	},

	bw: function () {
		return this.imagePrim;
	},

	gH: function () {
		return this.imageGallery;
	},

wr: function () {
		var max = this.imageGallery.count;
		var next = this.dU + 1;
		if(next > max) {next = 1;}
		this.dU = next;
		return next;
	},


ws: function () {
		var max = this.imageGallery.count;
		var next = this.dU - 1;
		if(next < 1) {next = max;}
		this.dU = next;
		return next;
	},

aQ: function (J,anOptGalleryColl) {
		this.initialize();
		this.aP(J);
		this.wM(J);
		if(G(J)) 
			{return t.aU('kb');}
this.aJ();
		var yZ = this.mainWindow;
		return true;
		  },

ef: function (J) {
		this.H.bN = J.bw();
		this.H.rp(J.bw());
	  },



ql: function(){
debugger;
		},

	nb: function(){
debugger;
		},

	lo: function(){
debugger;
	this.H.lo();
		},

	qm: function(){
debugger;
		},




aJ: function(){
		var H = this.qI();
		H.hl(this.area.ownerObj.aE);
		this.H = H;
		var title = this.getWindowTitle();
		var argMainWindow = this.di(title,this.ci());
		this.mo(argMainWindow);
		return false;
	},

	mo: function(argMainWindow){
	argMainWindow.show();
	},

	qI: function(){
		var H = a.qJ(1001);
	this.H = H;
		H.driver = this;
	H.bN = this.imagePrim;
		this.C = H.C;
		return H;
	},

fq: function(){
		return this.pj();
	},

pj: function(){
	var driver = this;
		var r = [];
	r.push(new E.TabPanel({
			xtype: 'tabpanel',
			region:'center',
			id: 'centerImages',
			driver: this,
width: this.formSizeX,
			height: this.formSizeY,
frame: true,
			border: false,
			split: true,						
			bt: true,
autoScroll: true,
			activeItem: 0,
			closable: true,			
			items: [this.createNewPageContainer(),
					this.vO()]
			}));
	r.push(new E.Panel({
			xtype: 'panel',
			region: 'west',
			title: t.il,
			id: 'westImages',
			frame: true,
			border: true,
			width: 250,							
			split: true,						
			autoScroll: true,
			collapsible: true,
html: this.driverIconsList.qi(this.bw(),this.gH()),
			listeners: {move: driver.setPosWindow, resize: driver.cU}
			}));		
		return r;
		},

	vO: function(){
		var file = c.vD(this.bw());
		var r = new E.Panel({
			id: 'gJ' + this.driverNr,
			title: t.gJ,
			layout: 'fit',					
			autoScroll: true,				
			tabTip: t.it,
			autoLoad: file
			});
		return r;
	},

aZ: function(){
		var M = new L;
		M.add(this.am('eG'));
		M.add(this.am('eA'));
		M.add(this.am('aC'));	
		M.add(this.bX());
		M.add(this.bS());
return M.asJsArray();
	},

bX: function(){
		var r = {
			xtype: 'button',
			driver: this,
			id: 'buttonPorECToolsZoomMinusImage',			
			icon: c.ng('picECToolsZoomMinus.gif'),
			iconAlign: 'top',
			iconCls: 'bX',
			cls: 'csButtonECTools',
			tooltip: t.tt('fk'),
			scale: 'medium',
			x: 0,
			y:c.bq(),
			handler: function (){this.driver.eV();}
		}; 
	return r;
	},


bS: function(){
		var r = {
			xtype: 'button',
			driver: this,
			id: 'buttonPorECToolsZoomPlusImage',			
			icon: c.ng('picECToolsZoomPlus.gif'),
			iconAlign: 'top',
			iconCls: 'bS',
			cls: 'csButtonECTools',
			tooltip: t.tt('fv'),
			scale: 'medium',
			x:c.c30310,
			y:c.cw(),
			handler: function (){this.driver.fm();}
		}; 
	return r;
	},


createNewPageContainer: function(){
		var ao = this.H.createNewPageContainer();
		ao.title = this.H.eb();
ao.driver = this;
		this.H.eB = ao.id;
		this.H.eB = ao.id;
		this.H.aB = ao;
		return ao;
	},

lV: function (){
this.menuNotYet();
	},

cq: function (){
			this.aC();
			a.lE('#tab',this.area);
		  },

eG: function (){
		return this.mg(this.ws());
	},

eA: function (){
		return this.mg(this.wr());
	},

mg: function (nr){
		var area = this.imageGallery.at(nr);
		return this.ef(area);
	},


fm: function(){
		return this.dn(c.eJ);},

	eV: function(){
		return this.dn(c.eJ * (-1));},

	dn: function(ht){
		return this.fr(ht);},

	fr: function(jG){
		var oldZoom = this.H.bu;
		var af =  Number(oldZoom) + Number(jG);
		return this.dp(af);},

dp: function(af){
		var C = this.C;
		if(af < c.dI)	
			{af = c.dI;}
		if(af > c.dN)
			{af = c.dN;}
		c.c30975 = af;
		this.H.aY(af);
		return this;
	}

}

});
Class("oI",{isa: lc,
	has: {
	},
	
	methods: {

	initialize: function(){
		this.K = 'ecDrImagesTab';
		this.classForPanel = E.Panel;
		this.bv('c30978', 'c30979', 'c30976', 'c30977');
		this.imageGallery = new L;
		this.driverIconsList = new kX;
		this.bi = false;
		this.keys = [37, 38, 38, 40, 107, 109];
	},

fq: function(){
		var r = this.pj();
var res2=[];
		res2[0] = r[0];
		return res2;
	},


aZ: function(){
		var M = new L;
		M.add(this.bX());
		M.add(this.bS());
		return M.asJsArray();
	},

mo: function(aPanel){
		this.eN(aPanel);
	}


}

});
Class("oP",{isa: bg,
	has: {
		filmsShown:				{is: "rw"},			
		fileName:				{is:	"rw"}			
    },

	methods: {

	initialize: function(){
		this.K = 'ecDrDetailsPopVideo';
		this.classForPanel = E.Window;
		this.filmsShown = new L;
		this.bv('c30498', 'c30499', 'c30496', 'c30497');
		return this;
	},

aP: function (J) {
		this.cf(J);
		this.fileName = J.cE;
		this.ce(this.area.objNr);
	},

aQ: function (J,fileName) {
		this.initialize();
this.fileName = fileName;
		this.cB().show();
		  },

cB: function(){
		var title = this.getWindowTitle();
debugger;
this.mainWindow = new Demo.FlowPlayer;		
		return this.mainWindow;
	},

aZ: function(){
		var r = [];
		r[0] = this.am('aC');
		return r;
	},

	zg: function(){
	var config = new E.Panel({
      title     : 'Flowplayer with ux.Media.Flash',
      width     : 645,
      height    : 469,
      maximizable  : true,
		collapsible  : true,
		layout    : 'fit',
		html : 'Some text in Html'});
	  return config;
	},



dD: function(){


debugger;
		return videoPanel;
	},


getWindowTitle: function(J){
return t.iZ;
	},

di: function(title, id){
	var driver = this;
	var panelClass = this.classForPanel;
	var panel = new panelClass({
		title: title,
		id: id,
		driver: this,
		layout: 'border',
		width: this.formSizeX,
		height: this.formSizeY,
		x: this.formPosX,
		y: this.formPosY,
		maximizable  : true,
		collapsible  : true,
		plain: true,
		autoScroll: true,
closable: true,			
		listeners: {move: driver.setPosWindow, resize: driver.cU},
		items: [
	{
			xtype: 'tabpanel',
			region:'center',
			frame: true,
			border: false,
			autoScroll: true,
			items: centerItems
			},
	{
			xtype: 'panel',
			region: 'east',
			title: 'Playlist',					
			id: 'west',
			layout: 'fit',		
			frame: true,
			border: false,
			width: 130,
			split: true,
			collapsible: true
}
		]
	});
		this.setMainWindow(panel);
		return panel;
	},

newWindowPlaylist: function(title, id, centerItems){
	var driver = this;
	var panelClass = this.classForPanel;
	var panel = new panelClass({
id: id,
		driver: this,
		layout: 'border',
		width: 180,
		height: 120,
		x: 300,
		y: 300,
		plain: true,
		items: [{
			xtype: 'panel',
			region:'center',
			frame: true,
			border: false,
			html: 'kasdhklsajh dlksahlk'
			}
			]
	});
		return panel;
	}

	}
});
Class("kQ",{isa: bg,
	has: {
		editorInForm:			{is: "rw"},			
		fileName:				{is: "rw"},			
		formIdRichText:			{is: "rw"},			
		htmlContent:			{is: "rw"}			
	},

	methods: {

	initialize: function(){
		this.K = 'ecDrEditor';
		this.classForPanel = E.Window;
		this.bi = true;		
		this.keys = [];					
	},

	ci: function () {
		return 'EditorDriver' + c.rnd(6);
	},


aP: function (J,fileName,htmlContent) {
		if(!G(J)) {
			this.cf(J);
			if(G(fileName)) 
				{this.fileName = J.cE;}
		}
		this.htmlContent = htmlContent;
		this.bv('c30478', 'c30479', 'c30476', 'c30477');
		this.ce(t.iR);
	},

setHtmlContent: function(htmlContent){
		return this.htmlContent = htmlContent;
	},

getHtmlContent: function(){
		return this.htmlContent;
	},

aQ: function (J,fileName,htmlContent) {
this.initialize();
this.aP(J);
		this.setHtmlContent(htmlContent);
this.fileName = fileName;
		this.aJ().show();
	},

getEditorInput: function () {
tinyMCE.triggerSave();
		var r = this.editorInForm.getForm().submit({
					url: "/",
					method: "GET"
					});
		E.getCmp(this.formIdRichText).syncValue();
		var value = r.getFieldValues();
return value;
	},


cq: function (){
		var htmlContent = this.getEditorInput();
		this.aC();
		a.dK('#tab',this.area,this.file,htmlContent);
	},

bR: function (){
var htmlContent = this.getEditorInput();
t.aU('hV');
	return htmlContent;
	},
eQ: function (){
		return this.aC();
	},

aJ: function(){
		var title = this.getWindowTitle();
		var mainWindow = this.di(title,this.ci());
		return mainWindow;
	},

dD: function(){
		var M = new L;
	var file = 'Details1.html';		
		M.add(new E.Panel({
			id: 'fP' + this.ci(),
			title: t.fP,
			layout: 'fit',					
			autoScroll: true,				
			tabTip: t.tt('ix'),
			autoLoad: c.c30464
			}));

		M.add(new E.Panel({
			id: 'fR' + this.ci(),
			title: t.fR,
			layout: 'fit',					
			autoScroll: true,				
			tabTip: t.tt('ip'),
			autoLoad: file
			}));

M.add(this.editorForm());

return M.asJsArray();
	},

di: function(title, id){
	var driver = this;
	var panelClass = this.classForPanel;
	var panel = new panelClass({
		title: title,
		id: id,
		driver: this,
		layout: 'border',
		width: this.formSizeX,
		height: this.formSizeY,
		x: this.formPosX,
		y: this.formPosY,
		maximizable  : true,
		collapsible  : true,
		plain: true,
		autoScroll: true,
		tbar: this.aZ(),
		closable: true,			
		listeners: {move: driver.setPosWindow, 
					resize: driver.cU,
					close: function(){driver.closeAction(driver);},
					activate: function(){a.setDriverActive(driver);}},
		items: [
	{
			xtype: 'tabpanel',
			id: 'centerEditor_' + this.driverNr,
			region:'center',
			frame: true,
			border: false,
			autoScroll: true,
			activeItem: 0,							
			deferredRender: false,					
			items: this.dD()
			}

]
	});
		this.setMainWindow(panel);
		return panel;
	},

editorForm: function(){
		var r = "richText_" + this.ci();
		this.formIdRichText = r;
		var editorForm = new E.form.FormPanel({	
			title: t.hE,
			tabTip: t.im,
			layout: 'fit',					
height: 500,
			width: 750,
			minHeight: 200,
			minWidth: 300,
			frame: true,
			deferredRender: false,
			items: [new E.ux.TinyMCE({
				id: r,
				name: "richText_" + this.ci(),
				width: 600,
				height: 400,
				deferredRender: false,
				tinymceSettings: this.editorSettings(),
				value: this.getHtmlContent()
			})
			]
		});
	this.editorInForm = editorForm;
	return editorForm;
	}, 

editorSettings: function(){
	var settings = {
		docs_language : t.languageForUI, 
		language : t.languageForUI, 
	    mode : "exact",
		skin : "default",	
		width: 534 ,
		height: 380,
theme : "advanced",
		plugins: "safari,pagebreak,style,layer,table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
		theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
		theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|",
		theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_statusbar_location : "bottom",
		theme_advanced_resizing : false,		
		extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		template_external_list_url : "example_template_list.js"
	};
		return settings;
	},

	loadTiynMCE: function(){
		this.addScript('tinymce/jscripts/tiny_mce/tiny_mce.js', true);
		this.addScript('ECTinyMCEEditor.js', true);
	},

	addScript: function(url, write){
var tst = document.body;
if (write && !document.body){
			document.write('<script type="text/javascript" src="' + url + '"></script>');
			return false;
		}
	},

editorAccordions: function(){
		var accordions = new L;

		accordions.add({
			id: 'accEditorTextModules',
			xtype: 'panel',
			title: t.oQ,
			items: [a.ui['companiesGrid']]
			});
accordions.add({
			id: 'accEditorTextBasket',
			xtype: 'panel',
			title: t.oK,
			html: '<p>This view will soon contain a product basket, which can be sent as an enquiry or an order!</p>'
});

		accordions.add({
			id: 'accEditorTextQuestions',
			xtype: 'panel',
			title: t.oN,
			items: [a.ui['companiesGrid']]
			});

		return accordions.asJsArray();
	},

aZ: function(){
		var M = new L;
		M.add(this.am('bR'));
		M.add(this.am('eQ'));
		return M.asJsArray();
	}

}
});
Class("oH",{isa: kQ,
	has: {
    },

	methods: {

	initialize: function(){
		this.K = 'ecDrEditorTab';
		this.classForPanel = E.Panel;
		return this;
	},

aQ: function (J,fileName,htmlContent) {
		this.initialize();
		this.aP(J);		
debugger;
this.setHtmlContent('sssssssssssssss');
		this.fileName = fileName;
		this.aJ();
	},

aJ: function(){
		var newMainPanel = this.cB();
		a.ui['mainTabDetails'].add(newMainPanel);
		a.ui['mainTabDetails'].show();
newMainPanel.show();
	},

aZ: function(){
		var M = new L;
		return M.asJsArray();
	},

getMainWindowClose: function(){
}


	}
});


Class("oA",{isa: bg,
	has: {
		K:							{is: "r"},		
		C:							{is: "ro"},		
		P:						{is: "ro"},		
		aR:						{is: "ro"},		
textGridPanel:					{is: "ro"},		
		tabItems:						{is: "ro"},		
		iconsHtml:						{is: "ro"},		
		htmlCssClass:					{is: "ro"}		
	
	},

	methods: {

	newId: function(T){
		return '#iconsPanel_'+T;
	},

	qj: function(){
		this.iconsHtml = new L();
		this.iconsHtml[0] = ' ';			
	},

pp: function(id, aClass){
		this.qj();
		this.iconsHtml.add('<div id=' + ab(id) + ' class=' + ab(aClass) + '>');
		this.iconsHtml.add('<ul>');
	},

pQ: function(){
		this.iconsHtml.add('</ul>');
		this.iconsHtml.add('<div style="clear:both"></div>');
	},

sd: function(dv){
		var g = '<a id=';
		var aD = dv.bI();
		g = g + ab(aD);
		return g; 
		},

sh: function(){
		var g = ' class=' + ab(this.htmlCssClass);
		return g;
	},

rT: function(anIconName){
		var g = ' onclick=';
g = g + '"clGallery(this, '+anIconName+')"';
		return g;
	},

sf: function(gY){
		var aFileName;
		if(gY.vk()) 
			{aFileName = gY.sT();}
			else{aFileName = gY;}
		var g = ' <img src=';
		g = g + ab(aFileName);
		g = g + ' width='+ c.c30910 + ' ';
		return g;
	},

yE: function(styleName){				
		var g = ' style=';
		g = g + ab('width:400');
		return g;
	},

sg: function(dv){
		var g = ' alt=';
		g = g + ab(dv.bB());
		return g;
	},

rS: function(dv){
		var title;
		var g = ' title=';
		g = g + ab(dv.bO());
		return g;
	},

	nop: function(){
	}
}
		});
Class("kR",{isa: oA,
	has: {
		dj:				{is: "ro"}		
	},

	methods: {

	initialize: function(){
		this.K = 'ecIconDr';
this.tabItems = [];	
		this.iconsHtml = new L();
		this.dj = false;
},

initializeBasic: function(){
		this.mainWindow = new E.TabPanel({
		id: 'panel'+this.newId(this.C),
		layout:'accordion',
		defaults: {
		    layout: 'fit',
			margins: '0 0 0 0'
},
		layoutConfig: {
	        titleCollapse: true,
	        animate: true,
		    activeOnTop: true
	    }
});
		return this.mainWindow;
	},

ew: function(item){
		return this;
	},

yD: function(T){
debugger;
		var r = new E.ux.ECPagePanel({			
		id: this.newId(this.C),					
		setTabNr: T,							
	    layout:'accordion',							
		border: true,								
		tabTip: '<b>Some info in tooltip</b>',		
	title: 'Some title',						
client: this.fB(this.C,false),
		x: 0, y: 0,							
	    listeners: {
render: function(ao) {
		   }	
       }		
    });			
	return r;
	},

pK: function(ag){
		var obj = ag;
var g = '<li>';
		g = g + this.pI(obj) + this.dX(obj) + this.fT(obj) ;
		g = g + this.pN(obj) + this.sb(obj) + this.rQ(obj);
		g = g +' />' + '</li>';
		this.iconsHtml.add(g);
return g;
	},

gj: function(area){
		var g = '<li>';
		g = g + this.sd(area) + this.sh() + this.rT(area.objNr);
		g = g + this.sf(area) + this.sg(area) + this.rS(area) +' />';
g = g + '</a></li>';
		this.iconsHtml.add(g);
		return g;
	},

xZ: function(domParent, ag){
		var alt, id,click,key,lang,name,source,style,tabIdx,friend,on,onConfig,out,over,target,title;
		var domLi = this.om(this.objNr,null).Q;
		domParent.appendChild(domLi);

		alt = ag.bB();
		id = ag.bI();
		source = ag.gI();
		on = "return a.clickGalleryOnIconLarge(" + aa(id) + ")";
		if(ag.fH()) {over = ag.bO();}
		onConfig = {on: on,
					over: over, 
					out: null};
		if(ag.fH()) {over = ag.bO();}
		var domAElem = this.nK(this.objNr,null);
domAElem.sL(domLi, id, 'highslide', source, key, lang, name, style, tabIdx, friend, target, title, onConfig);

		var domImg = this.oE(this.objNr,null);
domImg.sM(domLi, id, alt, null, 'highslide', null, source, null, c.c30910, click, over, out);
domParent.appendChild(domLi);
	},

pD: function(groupName){
		this.qj();					
		this.iconsHtml.add('<div id=' + ab(groupName) + ' class="iconsList">');
		this.iconsHtml.add('<ul>');
	},

pL: function(){
		this.iconsHtml.add('</ul>');
		this.iconsHtml.add('<div style="clear:both"></div>');
	},

rE: function(ag){
		if(true) {return '<a ';}
var g = '<a id=';
		var aD = ag.bI();
		g = g + ab(aD);
		return g; 
		},

rD: function(){
		var g = ' class="highslide"';
		return g;
	},

pN: function(ag){
		var iconName = ag.bI();
		var g = ' onclick=';
		g = g + '"return a.clickGalleryOnIconLarge(' + aa(iconName) + ')"';
		return g;
	},

	sb: function(ag){
		var g = "Tip(" + aa(ag.bO()) + ");";
		return ' onmouseover=' + ab(g);
		},

rQ: function(){
		return ' onmouseout=' + ab('UnTip();');
		},

pI: function(ag){
		var g = ' <img src=';
		g = g + ab(ag.gI());
		g = g + ' width='+ ab(c.c30910);
		g = g + ' height='+ ab(150);
		return g;
	},

fT: function(ag){
		var g = ' alt=';
		g = g + ab(ag.bB());
		return g;
	},

sc: function(ag){
		var title;
		var g = ' title=';
		g = g + ab(ag.bO());
		return g;
	},

nop: function(){
	}
	}
		});
Class("kS",{isa: kR,
	has: {
	},

	methods: {

	initialize: function(){
		this.K = 'ecDrIconsCat';
		this.tabItems = [];	
		this.iconsHtml = new L();
		this.dj = false;
		htmlCssClass = c.c30706;
		},

uh: function(){
		if(this.dj) {return;}
if(a.lW()) {return;}

var html = this.sv('IconsCatalogs');  
		var panel = E.getCmp('subTabContentCatalogsIcons');		
		panel.body.update(html);									
		this.dj = true;
		return;
		},

sv: function(domParent){
		var i;
		this.pD('iconsCat');			
var cu = a.gO.count;
		for (i=1; i < cu + 1 ;i++){
			var bE = a.gO.at(i);
			var cat = a.bf(bE);
			if(!F(cat))	
				{this.pK(cat,'iconsCat');}
}
		this.pL();			
		return this.iconsHtml.asString();		
	},

gj: function(ag){
		var obj = ag;
		var g = '<li>';
g = g + this.rE(obj) + this.dX(obj) + this.rD() + this.pN(obj);
g = g + this.pI(obj) + this.fT(obj) + this.sc(obj) +' />';
		g = g + blank + this.rR();
		g = g + blank + this.rU();
		if(obj.fH()) {g = g + obj.bO(); }
		g = g + '</a></li>';
		this.iconsHtml.add(g);
return g;
	},

	rR: function(area){
return area.pw();
	},

	rU: function(area){
return area.py();
	},

dX: function(ag){
var g = ' href=';
		var aD = "javascript:" + ag.dX();
		g = g + ab(aD);
		return g; 
	},

nop: function(){
	}
	}
		});
a.icc = new kS();


Class("oC",{isa: kS,
	has: {
	
	},

	methods: {

	initialize: function(){
		this.K = 'ecDrIconsPage';
		this.tabItems = [];	
		this.iconsHtml = new L();
		this.dj = false;
		htmlCssClass = c.c30708;
		},

ug: function(){
		var container = E.getCmp('accPageIcons');
		var panel = E.getCmp('accPageIconsPanel');
		container.remove(panel);
		var html = this.sx('IconsPages');		
		container.add(
					{id: 'accPageIconsPanel',
					layout: 'fit', 
					xtype: 'panel',
					autoScroll: true,
					html: html				
					});
		container.doLayout();
		container.show();
		},

sx: function(domParent){
		var bs = a.fo();
		this.pD('iconsPages');			
		var cu = bs.bH;
		for (i=1; i < cu + 1 ;i++){
			var aF = bs.cj(i);
			if(!F(aF))	
{this.pK(aF,'iconsPages');}
		}
		this.pL();					
		return this.iconsHtml.asString();		
	}, 

qi: function(primImage, imageColl){
		var bs = a.fo();
		this.pp('id','imageSelection');	
		var cu = imageColl.count;
		for (i=1; i < cu + 1 ;i++){
				this.gj(imageColl.at(i));
		}
		this.pQ();
return this.iconsHtml.asString();
	},


	nop: function(){
	}
}
		});
	a.icp = new oC();	
Class("kX",{isa: kR,
	has: {
	
	},

	methods: {

	initialize: function(){
		this.K = 'ecDrIconsImages';
		this.tabItems = [];	
		this.iconsHtml = new L();
		this.dj = false;
		htmlCssClass = c.c30710;
		},

		qi: function(primImage, imageColl){
		this.pp('imageGallery',c.c30710);		
		var cu = imageColl.count;
		for (i=1; i < cu + 1 ;i++){
				this.gj(imageColl.at(i));
		}
		this.pQ();
return this.iconsHtml.asString();
	},
	nop: function(){
	}
}
		});


Class("oO",{isa: bg,
   has: {
		lp:			{is: "rw"},				
		xY:				{is: "rw"},				
		lD:			{is: "rw", init: 0},	
		ys:					{is: "rw", init: 0},	
		hn:				{is: "rw", init: 0},	
		mh:				{is: "rw", init: 1},	
		pagePreviewCount:				{is: "rw"},				
		pagePreviewUrls:				{is: "rw"},				
		searchResultPanelHtml:			{is: "rw"},				
		tbMenuECRSearchResultToTab:		{is: "rw", init: true}	
	}, 
methods: {

	initialize: function(){
		this.K = 'ecCDriverSearch';
		this.classForPanel = E.Window;		
		this.bv('c30612', 'c30613', 'c30610', 'c30611');
		this.bi = true;
		this.ce(t.jS);
		this.mainPanelCloseAction = 'hide';
		this.mainPanelLayout = 'fit';
		this.searchResultPanelHtml = 'searchResultPanelHtml';
		
		this.yI = 'SearchSubmit';
		this.id = 'searchFormMainWindow';			
		return this;
	},

show: function(){
	if(F(this.mainWindow)) {this.aJ();}
	this.mainWindow.show();
	this.mainWindow.center();
	},

aJ: function(){
		var panel = this.cB();
		var me = this.mainWindow;
		this.mainWindow = panel;
		this.lU();
		return panel;
	},

showActions: function(){
if(G(this.mainWindow)) {return;}
		this.mainWindow.focus(true,100);
		var element = E.getCmp('searchFieldKeywordEntry');
		element.show();
		element.focus(true,100);
	},

fq: function(){
return a.ui['searchFormMainViewport'];		
	},

aZ: function(){
	var M = new L;
	if(c.c51620) {						
		M.add(this.am('gq'));
		M.add(this.am('gn'));
		M.add(this.qB('dW', true));
M.add(this.am('gC'));		
		}
		M.add(this.am('aC'));
		return M.asJsArray();
	},


lU: function(){
		var menu = this.getCmp('cP');
		if(!F(menu)) {menu.disable();}
	}, 

qG: function(){
		var menu = this.getCmp('cP');
		if(!F(menu)) {menu.enable();}
	}, 

cP:function(){
		var panel = this.sa();
	if(G(panel)) {return this.pv();}
		var url = panel.driverUrl;
	if(G(url)) {return this.pv();}
		this.nN(url);
return true; 
	}, 


addPanelToCatalogsTabAndCreate: function(url){
		var args = c.catalogAndPageFromUrl(url);
		return a.gz(null, args[0], args[1], false);
},

nN: function(url){
		var aPanel = a.uiEl.ev('c30642', c.cC, url);
		this.eN(aPanel);
		this.interceptLinksAddTo(c.aN('c30642', c.cC));
	},

eN: function(aPanel){
		var aComponent = a.uiMainTabDetails().add(aPanel);
		aComponent.doLayout();
		a.uiMainTabDetails().show();
		aComponent.show();
	},

pv: function(){
		return t.aU('hU');
	},

sa: function(){
		var container, len, aPanel, T, aTopContainer;
		if(this.lx())
			{container = E.getCmp('searchBasicTabPreviewsHolder');} 
else{aTopContainer = a.uiSearchFormViewport().getActiveTab();
				T = c.mS(aTopContainer.id);
				aContainer = E.getCmp(c.aN('c30640',T));
			}
			aPanel = aContainer.getActiveTab();
			if(F(aPanel)) {return null;}
			len = c.c30635.length - 3;
			if(aPanel.id.substr(0,len) !== c.c30635.substr(0,len)) 
				{return null;}
			return aPanel;
	},

gC: function(){
		this.tn();
	}, 

getCmp: function(fieldName){
		return E.getCmp(fieldName);
	},


getValueOf: function(fieldName){
		var field = E.getCmp(fieldName);
		if(F(field)) {return null;}
		return field.getValue();
	},

	ta: function(){
		var value = this.getValueOf('searchFieldComboRange');
		c.c30620 = value;
		return value;
	},

tf: function(){
		var element = this.getValueOf('searchFieldRadioGroup');
		if(F(element)) {return null;}
		var value = element.id;
																return value;
	},

	te: function(){
		return this.getValueOf('searchFieldKeywordEntry');
	},

sB: function(){
		var combo = this.ta();
		var dirs = '*';							
		dirs = c.c30630;
		var keywords = this.te();
var radio = this.tf();
		var radioType = 'or';				
		if(radio == 'searchFieldRadioAny')	{radioType = 'or';} 
		if(radio == 'searchFieldRadioAll')	{radioType = 'and';}
		if(radio == 'searchFieldRadioExact'){radioType = 'exact';}
		
		if(G(keywords)) 
			{return t.aU('ft');}

		var params = {
				term: keywords,
				type: radioType};
var r = E.Ajax.request({
			url: c.c30605,
		    params: params,
			scope: this,			
			success: function(argResponse, opts) {this.oj(argResponse,opts);}, 
			failure: function(argResponse, opts) {		
		      console.log('server-side failure with status code ' + argResponse.status);
	alert('Ajax failure');										
		   }
		});
E.getCmp('searchBasicTabResult').show();
	return r; 
	},

tR: function(url){
		this.lD = url;
		var r = E.Ajax.request({
			url: url,
			scope: this,			
			success: function(argResponse, opts) {this.nM(argResponse,opts);} 
		});
	}, 

oj: function(argResponse, form) {
		if(!this.lx()) {return this.kY(argResponse, true, null);}
		var argResponseText = argResponse.responseText;
		var pos = argResponse.responseText.indexOf('#ElecatSearchResultNone');
		if(pos > 0) {argResponseText = t.l_searchResultPanelHtmlNothingFound;}
		this.lp = argResponse;
		var container = E.getCmp('searchBasicTabResult');
		container.remove(this.searchResultPanelHtml);
		var panelConfig = a.uiEl.searchResultPanelHtml(this.searchResultPanelHtml, argResponseText, this);
		container.add(panelConfig); 
this.interceptLinksAddTo(this.searchResultPanelHtml);
		container.doLayout();
		return true;  
	}, 

interceptLinksAddTo: function(elementName){
		var panel = E.getCmp(elementName);
		panel.on('domready',
			function(frame){  
				if(frame.getDoc())
					{this.iFrameAddOnClick(frame, this);} 
			}, 
			this); 
	}, 

interceptLinks: function(arg1, arg2, arg3, arg4){
var meth, r, tmpHref, url;
		tmpHref = arg1.target.href;
		if(G(tmpHref)) {tmpHref = arg1.target.parentNode.href;}
		r = this.rW(tmpHref);
		if(F(r)) {return false;}
		url = r['url'];
		if(!F(url)) {
	 			 meth = 'this.' + r['meth'] + '(' + aa(url) + ')';}
			else{meth = 'this.' + r['meth'] + '(' + aa(r['arg1']) + ',' + aa(r['arg2']) + ')';}
		eval(meth);
		return true; 
	}, 

clSResPage: function(target){
		this.mc(target);
	},

clSResNav: function(target){
		this.ma(target);
	},

clPg: function(argCatalogId, argPageNr){
		a.gz(a.newTabObjPage(false), argCatalogId, argPageNr, true);
	},

rW: function(argHref){
		var r;
		r = this.et(argHref,'clSResPage'); 
		if(!G(r)) {return r;}
		r = this.et(argHref,'clSResNav'); 
		if(!G(r)) {return r;}
		r = this.et(argHref,'clPg'); 
		if(!G(r)) {return r;}
		return null;
	},

et: function(argHref, argMethod){
		if(G(argHref)) {return null;}
		var arg, arg1, arg2, pos, tmp, g, url;
		g = 'javascript:' + argMethod + '(';
if(argHref.indexOf(argMethod) < 0) {return null;}
		pos = argHref.lastIndexOf('(');
		tmp = argHref.lastIndexOf(')');
		url = argHref.substring(pos+1,tmp);					
		url = c.trim(url,"\'");
	pos = url.lastIndexOf(',');							
		if(pos > 0) {
			arg1 = c.trim(url.substring(0, pos-1),"\'");
			arg2 = c.trim(url.substring(pos+1, url.length),"\'");
			url = null;}
		return ({meth: argMethod, url: url, arg1: arg1, arg2: arg2});
	},

kY: function(htmlOrNull, withLayout, urlOrNull){
		var T = this.hn + 1;
		this.hn = T;
		if(!G(urlOrNull)) {htmlOrNull = null;}
		var panelConfig = a.uiEl.vi(T, htmlOrNull, urlOrNull, this);
var aContainer = a.uiSearchFormViewport();
		aContainer.insert(T,panelConfig);
		aContainer.doLayout();
		var id = c.aN('c30641', T);
		this.interceptLinksAddTo(id);
		if(withLayout) {
			aContainer.doLayout();
			this.nL();}
		  },

nM: function(argResponse, form){
		var aContainer;
		var dE = this.mh;
		if(this.lx())
			{aContainer = E.getCmp('searchBasicTabPreviewsHolder');
			E.getCmp('searchFormTopTabBasic').show();} 
		else{var aTopContainer = a.uiSearchFormViewport().getActiveTab();
var T = c.mS(aTopContainer.id);
				aContainer = E.getCmp(c.aN('c30640',T));
				aContainer.show();
				}
dE = dE + 1;
		this.mh = dE;
		var text = argResponse.responseText;
		var url = this.lD;

		if(!this.tbMenuECRSearchResultToTab) {return this.addPanelToCatalogsTabAndCreate(url);}

		var tmpPanel = a.uiEl.ev('c30635', dE, url);
		aContainer.add(tmpPanel);
		this.interceptLinksAddTo(c.aN('c30634', dE));
		aContainer.doLayout;

		aContainer.show();
		var r = c.aN('c30635', dE);
		E.getCmp(r).show();
		return true; 
	}, 


lx: function(){
	var aContainer = a.uiSearchFormViewport();
var activeTopTab = aContainer.getActiveTab();
		var r = (activeTopTab.id == 'searchFormTopTabBasic');
		return r;
	}, 

nS: function(url){
		this.lD = url;
		var r = E.Ajax.request({
			url: url,
			scope: this,			
			success: function(argResponse, opts) {
					this.ue(argResponse,opts);} 
		});
	}, 

ue: function(argResponse, form){
		this.nM(argResponse, form);
		if(this.pagePreviewCount < this.pagePreviewUrls.size())
			{this.pagePreviewCount = this.pagePreviewCount + 1;
			this.nS(this.pagePreviewUrls.at(this.pagePreviewCount));}
	}, 

mc: function(argUrl){
		this.tR(argUrl);
	}, 

ma: function(url){
		var r = E.Ajax.request({
			url: url,
			scope: this,			
			success: function(argResponse, opts) {
				this.oj(argResponse,opts);
			   } 
		});
	}, 

rC: function(url){
		var r = E.Ajax.request({
			url: url,
			scope: this,			
			success: function(argResponse, opts) {
				this.kY(argResponse.responseText, true, null);} 
		});
	}, 

gq: function(urlOrNull, withLayout){
		if(F(withLayout)) {withLayout = true;}
		if(G(this.lp)) 
			{return t.aU('fA');}
		return this.kY(this.lp.responseText,withLayout, null);
	},

gn: function(){
		var i, href, one, strSize, url;
		var all = this.tv();
		var max = all.size();
		if(max > c.c30645) {max = c.c30645;}
		if(G(max)) 
			{return t.aU('fA');}
		for (i=1 ;i < max + 1; i++ ) {				
			one = all.at(i);
			href = one.getAttribute('href');
			r = this.et(href,'clSResNav');
			if(F(r)) {continue;}
			this.rC(r['url']);
		} 
		this.nL();
		if(all.size() > c.c30645) 
			{var text = t.hT.replace('XXX', c.c30645);
			t.qX(text);}
		return true;
	  },


qq: function(){
		var panel = E.getCmp(this.searchResultPanelHtml);
		var iFrames = panel.body.dom.getElementsByTagName('iframe');
		var body = iFrames[0].contentDocument.body;
		var all = body.getElementsByTagName('a');
		return all;
	},

tv: function(){
		var i, one, bp;
		var all = this.qq();
		var max = all.length;
		var r = new L;
		for (i=0 ;i < max + 1; i++ ) {
			one = all[i];
			if(!G(one)) 
				{bp = one.className;
				if(bp == 'pageNr') {r.add(all[i]);}
				} 
			} 
		return r;
	},  

nL: function(){
		var lastPanelNr = this.hn;
a.uiSearchFormViewport().show();
		var id = c.aN('c30637', lastPanelNr);		
		var panel = E.getCmp(id);
		if(!G(panel)) {panel.show();}
	},

dW: function(){
		var val = E.getCmp('dW').getValue();
		this.tbMenuECRSearchResultToTab = val;
		if(val)	 {this.lU();}
		if(!val) {this.qG();}
		var r = 'kO';
		if(val) {r = 'kN';}
		if(!c.isUserModeExpert()) {t.aU(r);}
	  },

aC: function(){
		this.mainWindow.hide();
		this.closeAction();
	},

	closeAction: function(){
},


pagePreviewReset: function(){
		this.pagePreviewCount = 0;
		this.pagePreviewUrls = new L;
	},

tn: function(){
		this.pagePreviewReset();
		var href, i, bp, one, r, url;
		var all = this.qq();
		var max = all.length;
		for (i=0 ;i < max + 1; i++ ) {
			one = all[i];
			if(!G(one)) 
				{bp = one.className;
				if(bp !== 'pageRes') {continue;}
			href = one.getAttribute('href');
			r = this.et(href,'clSResPage');
			if(F(r)) {continue;}
this.pagePreviewUrls.add(r['url']);
				} 
			} 
		this.nS(this.pagePreviewUrls.at(1));
	},

nop: function(){
	}
	}
		});

Class("oM",{isa: cs,
	has: {
		qs:	{is:	"rw"}	

		},

	methods: {

	initialize: function () {
		this.qs = 22;
		if(Ext.isIE) {this.qs = 18;}
		this.mq();
		this.wb();
		this.vm();
		this.vU();
		this.vZ();
		this.vW();
		this.vV();
		this.wa();
		this.we();
		this.wf();
		this.initTabHome();
		this.initTabContent();
		this.initTabDetails();
		this.initTabsEC();
		this.initTabsCenter();

this.vg();
		this.vf();
		this.vc();
		this.ve();
		this.vh();
	 },

nopJasob: function () {

},


mq: function () {
		var elements = [
	{xtype: 'textfield',
			id: 'tbMenuECRMainHomeLanguageSelection',
			width: 180,
			readOnly: true,
			value: t.ks},
	a.ui['comboPorECLanguage'],
		a.ui['comboPorECUserExpertise']];

return elements;
	},

	wb: function () {
var tmp = [];
	if(c.ae(31000)) {tmp.push(a.ui['kz']);}
	if(c.ae(32000)) {tmp.push(a.ui['ky']);}
	if(c.ae(33000)) {tmp.push(a.ui['kv']);}
	if(c.ae(34000)) {tmp.push(a.ui['kw']);}
	if(c.ae(38000)) {tmp.push(a.ui['kx']);}
	if(c.ae(39000)) {tmp.push(a.ui['kD']);}
	a.ui['fieldsForToolsMenus'] = [tmp];
	

		tmp = [a.ui['buttonPorECToolsUp'], a.ui['buttonPorECToolsDown'],
			a.ui['buttonPorECToolsGotoPage'],
			a.ui['bX'], a.ui['bS'],
a.ui['buttonPorECToolsZoomSet'],
			a.ui['buttonPorECToolsPageSpawn'], a.ui['buttonPorECToolsHand'],
			a.ui['buttonPorECToolsPageFit'], a.ui['buttonPorECToolsPageActual']];
			if(c.bA(51600)) {tmp.push(a.ui['buttonPorECToolsPageFitWidth']);}
			if(c.bA(51600)) {tmp.push(a.ui['buttonPorECToolsSearch']);}
			tmp.push(a.ui['fieldsForToolsMenus']);
	a.ui['fieldsForTools'] = tmp;

},

vm: function () {
a.ui['toolsContainerEC'] = new Ext.Panel({
    autoEl: 'div',  
	id: 'toolsContainerEC',
    layout: 'absolute',						
	autoScroll: true,						
	bt: true,
	resizeTabs: false,						
	labelWidth: 40,				
    defaults: {
        xtype: 'panel',						
        autoEl: 'div', 
        layout: 'table',
        style: {padding: '2px'},
		autoScroll: c.isRT					
	    },	
		items: a.ui['fieldsForTools']
	});
	},
vU: function () {
if(c.c30540) {						
		a.ui['accordionItems'].push({
			id: 'accPageIcons',
			xtype: 'panel',
title: t.elAccPagesIcons,
			items: {id: 'accPageIconsPanel', layout: 'fit', xtype: 'panel', autoScroll: true},
			listeners: {expand: function(){
						men.openAccordPageIcons();}}
			}
		);
		}	
	},

	vZ: function () {
	if(c.c30530) {						
		a.ui['accordionItems'].push({
			id: 'accPageTitles',
			title: t.elAccPagesTitles,
			layoutOnTabChange: true,
			items: [a.ui['pagesGrid']]
		});
		}	
	},

	vW: function () {
	if(c.c30510) {						
		a.ui['accordionItems'].push({
			id: 'accCompanies',
			title: t.elAccPagesCompanies,
			items: [a.ui['companiesGrid']]
		});
	}	
	},

	vV: function () {
	if(c.c30520) {						
		a.ui['accordionItems'].push({
			id: 'accCatalogs',
			title: t.elAccCatalogs,
	        items: [a.ui['catalogsGrid']]
		});
		}	
	},

	wa: function () {
	if(c.c30570) {						
		a.ui['accordionItems'].push({
		id: 'accBasket',
		title: t.elAccBasket,
        html: '<p>This view will soon contain a product basket, which can be sent as an enquiry or an order!</p>'
		});
	}	
	},

	we: function () {
	if(c.c30560) {						
		a.ui['accordionItems'].push({
		id: 'accSettings',
		title: t.elAccSettings,
		layout: 'form',						
		closable: true,
		defaultType: 'textfield',
		tooltip: 'Various settings',		
        items: [a.ui['m_buttonPorECToolsCheckInNewPage'], a.ui['m_buttonPorECToolsCheckClick'], 
				a.ui['m_buttonPorECToolsIsHelpPanel'], a.ui['fieldPorECToolsZoomDefault']]
		});
	}	
	},
wf: function () {
a.ui['westAccordion'] = new Ext.Panel({
	id: 'westAccordion',
    layout:'accordion',
	defaults: {
        layout: 'fit',
		margins: '0 0 0 0'
},
    layoutConfig: {
        titleCollapse: true,
        animate: true,
        activeOnTop: true
    },
    items: [a.ui['accordionItems']]
	});
	},
initTabHome: function () {
a.qE(new Ext.ux.fY({
id: c.c30260,
		title: '<h1>'+t.hI+'</h1>',
	    border: true,
		tabTip: t.tt('iq'),
		tbar: this.mq(),
		autoLoad: c.getC40110(),						
		cls: '.BodyText {font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; font-size: 14px;}'
		}));
	},
initTabContent: function () {
a.qF(new Ext.TabPanel({
id: c.c30261,
		bt: true,
		title: '<h1>'+t.hu+'</h1>',
tabTip: t.tt('iy'),
		activeTab: 0,							
		xtype: 'tabpanel',						
		listeners: {							
				activate: function(tabPanel){a.eL(tabPanel);}
					}, 
		defaults: {
			layout: 'accordion',
			margins: '5 5 5 5',
			autoScroll: true,					
			defaultType: 'panel',				
			iconCls: 'tabs',
	        xtype: 'tabpanel'
			},
		items:	[a.qK(),
				a.qD()]
		}));
	},
initTabDetails: function () {
a.qy(new Ext.TabPanel({
id: c.c30262,
		bt: true,
		title: '<h1>'+t.fG+'</h1>',
tabTip: t.tt('fy'),
		deferredRender: false,					
		activeTab: 0,
		xtype: 'tabpanel',						
		plugins: new Ext.ux.TabCloseMenu(),		
		listeners: {							
				activate: function(tabPanel){a.eL(tabPanel);}
					}, 
		defaults: {
			layout: 'fit',						
			autoScroll: true,					
			defaultType: 'panel',				
			iconCls: 'tabs'
			},
		items: a.qz(1,'Details1.html')
		}));
	},

initTabsEC: function () {
		var tmp = [];
		if(c.bA(53010)) {tmp.push(a.ui[c.c30260]);}
		if(c.bA(53050)) {tmp.push(a.ui[c.c30261]);}
		if(c.bA(53200)) {tmp.push(a.ui[c.c30262]);}

a.ui['pagesTabsEC'] = new Ext.TabPanel({
	id: 'pagesTabsEC',
	bt: true,
    activeTab: 0,						
	plugins: new Ext.ux.TabCloseMenu(),	
	defaults: {
autoScroll: true,
		iconCls: 'tabs'
		},
    items: [tmp],
	listeners: {
			beforeremove: function(arg1,arg2){a.by(arg1,arg2);},
			tabchange: function(tabPanel, tab){				
					Ext.History.add(tabPanel.id + c.pJ + tab.id);}
					} 
});
	},
initTabsCenter: function () {
a.ui['centerEC'] = new Ext.Panel({
	id: 'centerEC',
	layout: 'border',
    items: [{
       	region: 'west',
		id: 'centerWest',
title: t.elToolsTitle,
		tabTip: 'ttECTools',
        collapsible: false,
        width: 92,						
		layout: 'fit',
		margins: '0 2 0 2',
		items: {id:'toolsTopContainer', 
				layout: 'fit', 
				xtype: 'panel', 
				items: a.ui['toolsContainerEC']}
		},{
}, {
region: 'center',
		id: 'centerCenter',
		xtype: 'container',
		layout: 'fit',
		items: a.uiPages()
        }
		]
	});
	},


vf: function () {

a.ui['searchFieldRadioAny'] = {
		id: 'searchFieldRadioAny',
		name: 'searchFieldRadioGroup',		
		xtype: 'radio',
		boxLabel: t.jY,
		checked: true,						
		height: 20,
		width: 70
		};

	a.ui['searchFieldRadioAll'] = {
		id: 'searchFieldRadioAll',
		name: 'searchFieldRadioGroup',		
		xtype: 'radio',
		boxLabel: t.jZ,
		checked: false,						
		height: 20,
		width: 70
		};

	a.ui['searchFieldRadioExact'] = {
		id: 'searchFieldRadioExact',
		name: 'searchFieldRadioGroup',		
		xtype: 'radio',
		boxLabel: t.jR,
		checked: false,						
		height: 20,
		width: 70
		};

a.ui['searchFieldRadioGroup'] = {
		id: 'searchFieldRadioGroup',
		name: 'searchFieldRadioGroup',			
		xtype: 'radiogroup',
		fieldLabel: t.jP,
		labelStyle: 'font-weight:bold',					
		height: 20,		
		width: 450,								
		items: [a.ui['searchFieldRadioAny'],
				a.ui['searchFieldRadioAll'],
				a.ui['searchFieldRadioExact']
				]
		};
	}, 

vg: function () {

a.ui['searchFieldComboRange'] = {
			id: 'searchFieldComboRange',
			xtype: 'combo',
			editable: false,
			fieldLabel: t.jI,
			labelStyle: 'font-weight:bold',					
			forceSelection: true,							
			hiddenName: 'searchFieldComboRangeField',		
			mode: 'local',
			selectOnFocus: true,
			readOnly: false,								
			triggerAction: 'all',							
			height: 20,
			width:	200,
store: [
					[0, t.jW], 
					[1, t.jV], 
					[2, t.jX]
					],
			value: c.c30620,							
			valueField: 'comboSelected'
};
a.ui['searchFieldKeywordEntry'] = new Ext.ux.SearchField({		
			id: 'searchFieldKeywordEntry',
			itemId: 'searchFieldKeywordEntry',				
			name: 'searchFieldKeywordEntry',				
			labelWidth: 100,
			title: t.tt('ir'),
			fieldLabel: t.ja,
			labelStyle: 'font-weight:bold',					
			height: 20,
			width: 400										
			});

	}, 

ve: function () {
a.ui['searchFormTopTabBasic'] = {
			id: 'searchFormTopTabBasic',
			title: t.je,
			tabTip: t.tt('iE'),
			layout: 'border',
			items: [
		a.ui['searchFieldTopBasic'], 
		{
				id: 'searchBasicTabPanelResultHolder',
				xtype: 'tabpanel',
			plain: true,
				region: 'center',		
				activeTab: 0,			
				items: this.vT()			
				} 
			] 
			};

	a.ui['searchFormTopTabAdvanced'] = {
		id: 'searchFormTopTabAdvanced',
		title: t.jc,
		tabTip: t.tt('iF'),
		html: 'Contains a more complex entry of search keys and parameters',
		items : [a.ui['searchFieldTopLarge']]
	};

a.ui['searchFormTopTabDatabase'] = {	
		id: 'searchFormTopTabDatabase',
		title: t.jd,
		tabTip: t.tt('iG'),
		html: 'Contains database entry fields like in YP',
		items : [a.ui['searchFieldTopLarge']]
	};

	a.ui['searchFieldTopLarge'] = {
		xtype: 'panel',
		region: 'north',
		title: 'Enter your search key words',
		height: 200,
		maxSize: 250,
		items: [a.ui['searchFieldTopButtons']]	
		};
	
	},	

searchResultPanelHtml: function (id, html,driver) {
		return {
			id: id,					
			driver: driver,
			xtype: 'iframepanel',
			html: html,
			showLoadIndicator: true,
			loadMask: t.gL,
			height: c.c30616,
			width: c.c30615
			};
	}, 

ev: function (cfgName, C, url) {
var title = 'Preview XXX'.replace('XXX', C);
		var id = c.aN(cfgName, C);
	return {
		id: id,			
		xtype: 'panel', 
		driverUrl: url,	
		title: title,
		tabTip: t.tt('iI'),
layout: 'fit',
		autoScroll: true,
		closable: true,
		activeTab: 0,
		plugins: new Ext.ux.TabCloseMenu(),
		items: this.rb(C, url)
		}; 
	}, 


rb: function (number, url) {
		var me = this;
		var id = c.aN('c30634', number);
var title = 'Page preview XXX'.replace('XXX',number);
		var linkTxt = '';
		if(!G(url)) {linkTxt = t.tr1 + url + '">' + url + '</a><b>' + t.tr3;}
		var bG = true;
		if(number == 1) {bG = false;}
		return {
			id: id,
			xtype: 'iframepanel',
frameConfig: {disableMessaging: false,
						eventsFollowFrameLinks: false},
			disableMessaging: false,
			eventsFollowFrameLinks: false,
			showLoadIndicator: true,
			title: linkTxt,
			tabTip: t.tt('iA'),
			closable: bG,
			defaultSrc: url,
			height: c.c30616,
			width: c.c30615,
			region: 'center',
			loadMask: t.gL,
			plugins: new Ext.ux.TabCloseMenu()
};
	},


zb: function (number) {
		return 'searchFormTopTabResultHtmlHolderXXX'.replace('XXX', number);
	},

vi: function (number, htmlOrNull, urlOrNull, driver) {
		var title = t.t_searchFormTopTabResultNrXXX.replace('XXX', number);
		return {
			id: c.aN('c30637', number),	
			xtype: 'tabpanel',
title: title,
			tabTip: t.tt('iJ'),
			region: 'center',		
			closable: true,
			activeTab: 0,
			items: [this.vd(number, htmlOrNull)]
			};
	},

vT: function () {
		var searchBasicTabResult = [
			{
				id: 'searchBasicTabResult',
				xtype: 'panel',
				title: t.cS,
				tabTip: t.tt('fn'),
				autoScroll: true,
			items: [this.searchResultPanelHtml('searchResultPanelHtml', t.jU, null)]
		},
			{xtype: 'tabpanel',			
				id: 'searchBasicTabPreviewsHolder',
				title: t.eu,
				tabTip: t.tt('fz'),
bt: true,  
				tabPosition: 'bottom',
hideMode: Ext.isIE ? 'offsets' : 'display',
				items: this.ev('c30635', 0, null),
				plugins: new E.ux.TabCloseMenu()	
				}];  
		return searchBasicTabResult;
	}, 

vd: function (number, htmlOrNull) {
	var title = t.cS;	
	if(number > 0) {title = t.t_searchBasicTabResultXXX.replace('XXX',number);}
	var searchBasicTabResult = [
			{
				id: c.aN('c30633',number),		
				xtype: 'panel',
				title: title,
				tabTip: t.tt('fn'),
				autoScroll: true,
			items: [this.searchResultPanelHtml(c.aN('c30641',number), htmlOrNull, null)]
		},
			{xtype: 'tabpanel',			
				id: c.aN('c30640',number),	
				title: t.eu,
				tabTip: t.tt('fz'),
bt: true,  
				tabPosition: 'bottom',
hideMode: Ext.isIE ? 'offsets' : 'display',
				items: this.ev('c30635', number, null)
			}];  
		return searchBasicTabResult;
	}, 

vc: function () {

	var searchEntries = [];						
	if(c.c51620) {searchEntries.push(a.ui['searchFieldComboRange']);}
	searchEntries.push(a.ui['searchFieldKeywordEntry']);
	if(c.c51620) {searchEntries.push(a.ui['searchFieldRadioGroup']);}

a.ui['searchFieldEntryPanel'] = {
		id: 'searchFieldEntryPanel',
		xtype: 'panel',
		layout: 'form',
		region: 'center',
		columnWidth: 0.85,
		minSize: 300,
		items: searchEntries
		};

var height = 73;
		if(!c.c51620) {height = 26;}
a.ui['searchFieldTopBasic'] = {
		id: 'searchFieldTopBasic',
		xtype: 'panel',
region: 'north',
		layout: 'border',			
		autoScroll: true,
		height: height,
		items: a.ui['searchFieldEntryPanel']
		};

	}, 

vh: function () {

a.ui['searchFormMainViewport'] = {
		xtype: 'tabpanel',
		id: 'searchFormMainViewport',
		title: 'Elecat website search',
		bt: true,
		activeTab: 0,
		plugins: new Ext.ux.TabCloseMenu(),
		items:[
				a.ui['searchFormTopTabBasic']
]
	};
	}, 

nop: function () {
	}
	}
});
a.uiEl = new oM;


var jg_ok, jg_ie, jg_fast, jg_dom, jg_moz;


function _chkDHTM(wnd, x, i)
{
	x = wnd.document.body || null;
	jg_ie = x && typeof x.insertAdjacentHTML != "undefined" && wnd.document.createElement;
	jg_dom = (x && !jg_ie &&
		typeof x.appendChild != "undefined" &&
		typeof wnd.document.createRange != "undefined" &&
		typeof (i = wnd.document.createRange()).setStartBefore != "undefined" &&
		typeof i.createContextualFragment != "undefined");
	jg_fast = jg_ie && wnd.document.all && !wnd.opera;
	jg_moz = jg_dom && typeof x.style.MozOpacity != "undefined";
	jg_ok = !!(jg_ie || jg_dom);
}

function _pntCnvDom()
{
	var x = this.wnd.document.createRange();
	x.setStartBefore(this.cnv);
	x = x.createContextualFragment(jg_fast? this._htmRpc() : this.htm);
	if(this.cnv) this.cnv.appendChild(x);
	this.htm = "";
}

function _pntCnvIe()
{
	if(this.cnv) this.cnv.insertAdjacentHTML("BeforeEnd", jg_fast? this._htmRpc() : this.htm);
	this.htm = "";
}

function _pntDoc()
{
	this.wnd.document.write(jg_fast? this._htmRpc() : this.htm);
	this.htm = '';
}

function _pntN()
{
	;
}

function _mkDiv(x, y, w, h)
{
	this.htm += '<div style="position:absolute;'+
		'left:' + x + 'px;'+
		'top:' + y + 'px;'+
		'width:' + w + 'px;'+
		'height:' + h + 'px;'+
		'clip:rect(0,'+w+'px,'+h+'px,0);'+
		'background-color:' + this.color +
		(!jg_moz? ';overflow:hidden' : '')+
		';"><\/div>';
}
function _mkDivIe(x, y, w, h)
{
	this.htm += '%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';
}

function _mkDivPrt(x, y, w, h)
{
	this.htm += '<div style="position:absolute;'+
		'border-left:' + w + 'px solid ' + this.color + ';'+
		'left:' + x + 'px;'+
		'top:' + y + 'px;'+
		'width:0px;'+
		'height:' + h + 'px;'+
		'clip:rect(0,'+w+'px,'+h+'px,0);'+
		'background-color:' + this.color +
		(!jg_moz? ';overflow:hidden' : '')+
		';"><\/div>';
}

var _regex =  /%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;
function _htmRpc()
{
	return this.htm.replace(
		_regex,
		'<div style="overflow:hidden;position:absolute;background-color:'+
		'$1;left:$2px;top:$3px;width:$4px;height:$5px"></div>\n');
}

function _htmPrtRpc()
{
	return this.htm.replace(
		_regex,
		'<div style="overflow:hidden;position:absolute;background-color:'+
		'$1;left:$2px;top:$3px;width:$4px;height:$5px;border-left:$4px solid $1"></div>\n');
}

function _mkLin(x1, y1, x2, y2)
{
	if(x1 > x2)
	{
		var _x2 = x2;
		var _y2 = y2;
		x2 = x1;
		y2 = y1;
		x1 = _x2;
		y1 = _y2;
	}
	var dx = x2-x1, dy = Math.abs(y2-y1),
	x = x1, y = y1,
	yIncr = (y1 > y2)? -1 : 1;

	if(dx >= dy)
	{
		var pr = dy<<1,
		pru = pr - (dx<<1),
		p = pr-dx,
		ox = x;
		while(dx > 0)
		{--dx;
			++x;
			if(p > 0)
			{
				this._mkDiv(ox, y, x-ox, 1);
				y += yIncr;
				p += pru;
				ox = x;
			}
			else p += pr;
		}
		this._mkDiv(ox, y, x2-ox+1, 1);
	}

	else
	{
		var pr = dx<<1,
		pru = pr - (dy<<1),
		p = pr-dy,
		oy = y;
		if(y2 <= y1)
		{
			while(dy > 0)
			{--dy;
				if(p > 0)
				{
					this._mkDiv(x++, y, 1, oy-y+1);
					y += yIncr;
					p += pru;
					oy = y;
				}
				else
				{
					y += yIncr;
					p += pr;
				}
			}
			this._mkDiv(x2, y2, 1, oy-y2+1);
		}
		else
		{
			while(dy > 0)
			{--dy;
				y += yIncr;
				if(p > 0)
				{
					this._mkDiv(x++, oy, 1, y-oy);
					p += pru;
					oy = y;
				}
				else p += pr;
			}
			this._mkDiv(x2, oy, 1, y2-oy+1);
		}
	}
}

function _mkLin2D(x1, y1, x2, y2)
{
	if(x1 > x2)
	{
		var _x2 = x2;
		var _y2 = y2;
		x2 = x1;
		y2 = y1;
		x1 = _x2;
		y1 = _y2;
	}
	var dx = x2-x1, dy = Math.abs(y2-y1),
	x = x1, y = y1,
	yIncr = (y1 > y2)? -1 : 1;

	var s = this.stroke;
	if(dx >= dy)
	{
		if(dx > 0 && s-3 > 0)
		{
			var _s = (s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy) / dx;
			_s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
		}
		else var _s = s;
		var ad = Math.ceil(s/2);

		var pr = dy<<1,
		pru = pr - (dx<<1),
		p = pr-dx,
		ox = x;
		while(dx > 0)
		{--dx;
			++x;
			if(p > 0)
			{
				this._mkDiv(ox, y, x-ox+ad, _s);
				y += yIncr;
				p += pru;
				ox = x;
			}
			else p += pr;
		}
		this._mkDiv(ox, y, x2-ox+ad+1, _s);
	}

	else
	{
		if(s-3 > 0)
		{
			var _s = (s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy) / dy;
			_s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
		}
		else var _s = s;
		var ad = Math.round(s/2);

		var pr = dx<<1,
		pru = pr - (dy<<1),
		p = pr-dy,
		oy = y;
		if(y2 <= y1)
		{
			++ad;
			while(dy > 0)
			{--dy;
				if(p > 0)
				{
					this._mkDiv(x++, y, _s, oy-y+ad);
					y += yIncr;
					p += pru;
					oy = y;
				}
				else
				{
					y += yIncr;
					p += pr;
				}
			}
			this._mkDiv(x2, y2, _s, oy-y2+ad);
		}
		else
		{
			while(dy > 0)
			{--dy;
				y += yIncr;
				if(p > 0)
				{
					this._mkDiv(x++, oy, _s, y-oy+ad);
					p += pru;
					oy = y;
				}
				else p += pr;
			}
			this._mkDiv(x2, oy, _s, y2-oy+ad+1);
		}
	}
}

function _mkLinDott(x1, y1, x2, y2)
{
	if(x1 > x2)
	{
		var _x2 = x2;
		var _y2 = y2;
		x2 = x1;
		y2 = y1;
		x1 = _x2;
		y1 = _y2;
	}
	var dx = x2-x1, dy = Math.abs(y2-y1),
	x = x1, y = y1,
	yIncr = (y1 > y2)? -1 : 1,
	drw = true;
	if(dx >= dy)
	{
		var pr = dy<<1,
		pru = pr - (dx<<1),
		p = pr-dx;
		while(dx > 0)
		{--dx;
			if(drw) this._mkDiv(x, y, 1, 1);
			drw = !drw;
			if(p > 0)
			{
				y += yIncr;
				p += pru;
			}
			else p += pr;
			++x;
		}
	}
	else
	{
		var pr = dx<<1,
		pru = pr - (dy<<1),
		p = pr-dy;
		while(dy > 0)
		{--dy;
			if(drw) this._mkDiv(x, y, 1, 1);
			drw = !drw;
			y += yIncr;
			if(p > 0)
			{
				++x;
				p += pru;
			}
			else p += pr;
		}
	}
	if(drw) this._mkDiv(x, y, 1, 1);
}

function _mkOv(left, top, width, height)
{
	var a = (++width)>>1, b = (++height)>>1,
	wod = width&1, hod = height&1,
	cx = left+a, cy = top+b,
	x = 0, y = b,
	ox = 0, oy = b,
	aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
	st = (aa2>>1)*(1-(b<<1)) + bb2,
	tt = (bb2>>1) - aa2*((b<<1)-1),
	w, h;
	while(y > 0)
	{
		if(st < 0)
		{
			st += bb2*((x<<1)+3);
			tt += bb4*(++x);
		}
		else if(tt < 0)
		{
			st += bb2*((x<<1)+3) - aa4*(y-1);
			tt += bb4*(++x) - aa2*(((y--)<<1)-3);
			w = x-ox;
			h = oy-y;
			if((w&2) && (h&2))
			{
				this._mkOvQds(cx, cy, x-2, y+2, 1, 1, wod, hod);
				this._mkOvQds(cx, cy, x-1, y+1, 1, 1, wod, hod);
			}
			else this._mkOvQds(cx, cy, x-1, oy, w, h, wod, hod);
			ox = x;
			oy = y;
		}
		else
		{
			tt -= aa2*((y<<1)-3);
			st -= aa4*(--y);
		}
	}
	w = a-ox+1;
	h = (oy<<1)+hod;
	y = cy-oy;
	this._mkDiv(cx-a, y, w, h);
	this._mkDiv(cx+ox+wod-1, y, w, h);
}

function _mkOv2D(left, top, width, height)
{
	var s = this.stroke;
	width += s+1;
	height += s+1;
	var a = width>>1, b = height>>1,
	wod = width&1, hod = height&1,
	cx = left+a, cy = top+b,
	x = 0, y = b,
	aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
	st = (aa2>>1)*(1-(b<<1)) + bb2,
	tt = (bb2>>1) - aa2*((b<<1)-1);

	if(s-4 < 0 && (!(s-2) || width-51 > 0 && height-51 > 0))
	{
		var ox = 0, oy = b,
		w, h,
		pxw;
		while(y > 0)
		{
			if(st < 0)
			{
				st += bb2*((x<<1)+3);
				tt += bb4*(++x);
			}
			else if(tt < 0)
			{
				st += bb2*((x<<1)+3) - aa4*(y-1);
				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
				w = x-ox;
				h = oy-y;

				if(w-1)
				{
					pxw = w+1+(s&1);
					h = s;
				}
				else if(h-1)
				{
					pxw = s;
					h += 1+(s&1);
				}
				else pxw = h = s;
				this._mkOvQds(cx, cy, x-1, oy, pxw, h, wod, hod);
				ox = x;
				oy = y;
			}
			else
			{
				tt -= aa2*((y<<1)-3);
				st -= aa4*(--y);
			}
		}
		this._mkDiv(cx-a, cy-oy, s, (oy<<1)+hod);
		this._mkDiv(cx+a+wod-s, cy-oy, s, (oy<<1)+hod);
	}

	else
	{
		var _a = (width-(s<<1))>>1,
		_b = (height-(s<<1))>>1,
		_x = 0, _y = _b,
		_aa2 = (_a*_a)<<1, _aa4 = _aa2<<1, _bb2 = (_b*_b)<<1, _bb4 = _bb2<<1,
		_st = (_aa2>>1)*(1-(_b<<1)) + _bb2,
		_tt = (_bb2>>1) - _aa2*((_b<<1)-1),

		pxl = new Array(),
		pxt = new Array(),
		_pxb = new Array();
		pxl[0] = 0;
		pxt[0] = b;
		_pxb[0] = _b-1;
		while(y > 0)
		{
			if(st < 0)
			{
				pxl[pxl.length] = x;
				pxt[pxt.length] = y;
				st += bb2*((x<<1)+3);
				tt += bb4*(++x);
			}
			else if(tt < 0)
			{
				pxl[pxl.length] = x;
				st += bb2*((x<<1)+3) - aa4*(y-1);
				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
				pxt[pxt.length] = y;
			}
			else
			{
				tt -= aa2*((y<<1)-3);
				st -= aa4*(--y);
			}

			if(_y > 0)
			{
				if(_st < 0)
				{
					_st += _bb2*((_x<<1)+3);
					_tt += _bb4*(++_x);
					_pxb[_pxb.length] = _y-1;
				}
				else if(_tt < 0)
				{
					_st += _bb2*((_x<<1)+3) - _aa4*(_y-1);
					_tt += _bb4*(++_x) - _aa2*(((_y--)<<1)-3);
					_pxb[_pxb.length] = _y-1;
				}
				else
				{
					_tt -= _aa2*((_y<<1)-3);
					_st -= _aa4*(--_y);
					_pxb[_pxb.length-1]--;
				}
			}
		}

		var ox = -wod, oy = b,
		_oy = _pxb[0],
		l = pxl.length,
		w, h;
		for(var i = 0; i < l; i++)
		{
			if(typeof _pxb[i] != "undefined")
			{
				if(_pxb[i] < _oy || pxt[i] < oy)
				{
					x = pxl[i];
					this._mkOvQds(cx, cy, x, oy, x-ox, oy-_oy, wod, hod);
					ox = x;
					oy = pxt[i];
					_oy = _pxb[i];
				}
			}
			else
			{
				x = pxl[i];
				this._mkDiv(cx-x, cy-oy, 1, (oy<<1)+hod);
				this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
				ox = x;
				oy = pxt[i];
			}
		}
		this._mkDiv(cx-a, cy-oy, 1, (oy<<1)+hod);
		this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
	}
}

function _mkOvDott(left, top, width, height)
{
	var a = (++width)>>1, b = (++height)>>1,
	wod = width&1, hod = height&1, hodu = hod^1,
	cx = left+a, cy = top+b,
	x = 0, y = b,
	aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
	st = (aa2>>1)*(1-(b<<1)) + bb2,
	tt = (bb2>>1) - aa2*((b<<1)-1),
	drw = true;
	while(y > 0)
	{
		if(st < 0)
		{
			st += bb2*((x<<1)+3);
			tt += bb4*(++x);
		}
		else if(tt < 0)
		{
			st += bb2*((x<<1)+3) - aa4*(y-1);
			tt += bb4*(++x) - aa2*(((y--)<<1)-3);
		}
		else
		{
			tt -= aa2*((y<<1)-3);
			st -= aa4*(--y);
		}
		if(drw && y >= hodu) this._mkOvQds(cx, cy, x, y, 1, 1, wod, hod);
		drw = !drw;
	}
}

function _mkRect(x, y, w, h)
{
	var s = this.stroke;
	this._mkDiv(x, y, w, s);
	this._mkDiv(x+w, y, s, h);
	this._mkDiv(x, y+h, w+s, s);
	this._mkDiv(x, y+s, s, h-s);
}

function _mkRectDott(x, y, w, h)
{
	this.drawLine(x, y, x+w, y);
	this.drawLine(x+w, y, x+w, y+h);
	this.drawLine(x, y+h, x+w, y+h);
	this.drawLine(x, y, x, y+h);
}

function jsgFont()
{
	this.PLAIN = 'font-weight:normal;';
	this.BOLD = 'font-weight:bold;';
	this.ITALIC = 'font-style:italic;';
	this.ITALIC_BOLD = this.ITALIC + this.BOLD;
	this.BOLD_ITALIC = this.ITALIC_BOLD;
}
var Font = new jsgFont();

function jsgStroke()
{
	this.DOTTED = -1;
}
var Stroke = new jsgStroke();

function jsGraphics(cnv, wnd)
{
	this.setColor = function(x)
	{
		this.color = x.toLowerCase();
	};

	this.setStroke = function(x)
	{
		this.stroke = x;
		if(!(x+1))
		{
			this.drawLine = _mkLinDott;
			this._mkOv = _mkOvDott;
			this.drawRect = _mkRectDott;
		}
		else if(x-1 > 0)
		{
			this.drawLine = _mkLin2D;
			this._mkOv = _mkOv2D;
			this.drawRect = _mkRect;
		}
		else
		{
			this.drawLine = _mkLin;
			this._mkOv = _mkOv;
			this.drawRect = _mkRect;
		}
	};

	this.setPrintable = function(arg)
	{
		this.printable = arg;
		if(jg_fast)
		{
			this._mkDiv = _mkDivIe;
			this._htmRpc = arg? _htmPrtRpc : _htmRpc;
		}
		else this._mkDiv = arg? _mkDivPrt : _mkDiv;
	};

	this.setFont = function(fam, sz, sty)
	{
		this.ftFam = fam;
		this.ftSz = sz;
		this.ftSty = sty || Font.PLAIN;
	};

	this.drawPolyline = this.drawPolyLine = function(x, y)
	{
		for (var i=x.length - 1; i;)
		{--i;
			this.drawLine(x[i], y[i], x[i+1], y[i+1]);
		}
	};

	this.fillRect = function(x, y, w, h)
	{
		this._mkDiv(x, y, w, h);
	};
this._mkDivArea = function(x, y, w, h, area)
{
	this.htm += '<div style="position:absolute;'+
		'left:' + x + 'px;'+
		'top:' + y + 'px;'+
		'width:' + w + 'px;'+
		'height:' + h + 'px;'+
		'clip:rect(0,'+w+'px,'+h+'px,0);'+
		'background-color:' + this.color +
		(!jg_moz? ';overflow:hidden' : '')+
		';">' + area.getMapString() + '<\/div>';
};
this.drawPolygon = function(x, y)
	{
		this.drawPolyline(x, y);
		this.drawLine(x[x.length-1], y[x.length-1], x[0], y[0]);
	};

	this.drawEllipse = this.drawOval = function(x, y, w, h)
	{
		this._mkOv(x, y, w, h);
	};

	this.fillEllipse = this.fillOval = function(left, top, w, h)
	{
		var a = w>>1, b = h>>1,
		wod = w&1, hod = h&1,
		cx = left+a, cy = top+b,
		x = 0, y = b, oy = b,
		aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
		st = (aa2>>1)*(1-(b<<1)) + bb2,
		tt = (bb2>>1) - aa2*((b<<1)-1),
		xl, dw, dh;
		if(w) while(y > 0)
		{
			if(st < 0)
			{
				st += bb2*((x<<1)+3);
				tt += bb4*(++x);
			}
			else if(tt < 0)
			{
				st += bb2*((x<<1)+3) - aa4*(y-1);
				xl = cx-x;
				dw = (x<<1)+wod;
				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
				dh = oy-y;
				this._mkDiv(xl, cy-oy, dw, dh);
				this._mkDiv(xl, cy+y+hod, dw, dh);
				oy = y;
			}
			else
			{
				tt -= aa2*((y<<1)-3);
				st -= aa4*(--y);
			}
		}
		this._mkDiv(cx-a, cy-oy, w, (oy<<1)+hod);
	};

	this.fillArc = function(iL, iT, iW, iH, fAngA, fAngZ)
	{
		var a = iW>>1, b = iH>>1,
		iOdds = (iW&1) | ((iH&1) << 16),
		cx = iL+a, cy = iT+b,
		x = 0, y = b, ox = x, oy = y,
		aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
		st = (aa2>>1)*(1-(b<<1)) + bb2,
		tt = (bb2>>1) - aa2*((b<<1)-1),
		xEndA, yEndA, xEndZ, yEndZ,
		iSects = (1 << (Math.floor((fAngA %= 360.0)/180.0) << 3))
				| (2 << (Math.floor((fAngZ %= 360.0)/180.0) << 3))
				| ((fAngA >= fAngZ) << 16),
		aBndA = new Array(b+1), aBndZ = new Array(b+1);
		
		fAngA *= Math.PI/180.0;
		fAngZ *= Math.PI/180.0;
		xEndA = cx+Math.round(a*Math.cos(fAngA));
		yEndA = cy+Math.round(-b*Math.sin(fAngA));
		_mkLinVirt(aBndA, cx, cy, xEndA, yEndA);
		xEndZ = cx+Math.round(a*Math.cos(fAngZ));
		yEndZ = cy+Math.round(-b*Math.sin(fAngZ));
		_mkLinVirt(aBndZ, cx, cy, xEndZ, yEndZ);

		while(y > 0)
		{
			if(st < 0) 
			{
				st += bb2*((x<<1)+3);
				tt += bb4*(++x);
			}
			else if(tt < 0) 
			{
				st += bb2*((x<<1)+3) - aa4*(y-1);
				ox = x;
				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
				this._mkArcDiv(ox, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
				oy = y;
			}
			else 
			{
				tt -= aa2*((y<<1)-3);
				st -= aa4*(--y);
				if(y && (aBndA[y] != aBndA[y-1] || aBndZ[y] != aBndZ[y-1]))
				{
					this._mkArcDiv(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
					ox = x;
					oy = y;
				}
			}
		}
		this._mkArcDiv(x, 0, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
		if(iOdds >> 16) 
		{
			if(iSects >> 16) 
			{
				var xl = (yEndA <= cy || yEndZ > cy)? (cx - x) : cx;
				this._mkDiv(xl, cy, x + cx - xl + (iOdds & 0xffff), 1);
			}
			else if((iSects & 0x01) && yEndZ > cy)
				this._mkDiv(cx - x, cy, x, 1);
		}
	};

this.fillPolygon = function(array_x, array_y)
	{
		var i;
		var y;
		var miny, maxy;
		var x1, y1;
		var x2, y2;
		var ind1, ind2;
		var ints;

		var n = array_x.length;
		if(!n) return;

		miny = array_y[0];
		maxy = array_y[0];
		for(i = 1; i < n; i++)
		{
			if(array_y[i] < miny)
				miny = array_y[i];

			if(array_y[i] > maxy)
				maxy = array_y[i];
		}
		for(y = miny; y <= maxy; y++)
		{
			var polyInts = new Array();
			ints = 0;
			for(i = 0; i < n; i++)
			{
				if(!i)
				{
					ind1 = n-1;
					ind2 = 0;
				}
				else
				{
					ind1 = i-1;
					ind2 = i;
				}
				y1 = array_y[ind1];
				y2 = array_y[ind2];
				if(y1 < y2)
				{
					x1 = array_x[ind1];
					x2 = array_x[ind2];
				}
				else if(y1 > y2)
				{
					y2 = array_y[ind1];
					y1 = array_y[ind2];
					x2 = array_x[ind1];
					x1 = array_x[ind2];
				}
				else continue;

				 if((y >= y1) && (y < y2))
					polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);

				else if((y == maxy) && (y > y1) && (y <= y2))
					polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
			}
			polyInts.sort(_CompInt);
			for(i = 0; i < ints; i+=2)
				this._mkDiv(polyInts[i], y, polyInts[i+1]-polyInts[i]+1, 1);
		}
	};

	this.drawString = function(txt, x, y)
	{
		this.htm += '<div style="position:absolute;white-space:nowrap;'+
			'left:' + x + 'px;'+
			'top:' + y + 'px;'+
			'font-family:' +  this.ftFam + ';'+
			'font-size:' + this.ftSz + ';'+
			'color:' + this.color + ';' + this.ftSty + '">'+
			txt +
			'<\/div>';
	};

this.drawStringRect = function(txt, x, y, width, halign)
	{
		this.htm += '<div style="position:absolute;overflow:hidden;'+
			'left:' + x + 'px;'+
			'top:' + y + 'px;'+
			'width:'+width +'px;'+
			'text-align:'+halign+';'+
			'font-family:' +  this.ftFam + ';'+
			'font-size:' + this.ftSz + ';'+
			'color:' + this.color + ';' + this.ftSty + '">'+
			txt +
			'<\/div>';
	};

	this.drawImage = function(imgSrc, x, y, w, h, a,id)
	{
		this.htm += '<div style="position:absolute;'+
			'left:' + x + 'px;'+
			'top:' + y + 'px;'+
			(w? ('width:' +  w + 'px;') : '') +
			(h? ('height:' + h + 'px;'):'')+'">'+
			'<img id="' +id+ '" src="' + imgSrc +'"'+ (w ? (' width="' + w + '"'):'')+ (h ? (' height="' + h + '"'):'') + (a? (' '+a) : '') + '>'+
			'<\/div>';
	};

	this.clear = function()
	{
		this.htm = "";
		if(this.cnv) this.cnv.innerHTML = "";
	};

	this._mkOvQds = function(cx, cy, x, y, w, h, wod, hod)
	{
		var xl = cx - x, xr = cx + x + wod - w, yt = cy - y, yb = cy + y + hod - h;
		if(xr > xl+w)
		{
			this._mkDiv(xr, yt, w, h);
			this._mkDiv(xr, yb, w, h);
		}
		else
			w = xr - xl + w;
		this._mkDiv(xl, yt, w, h);
		this._mkDiv(xl, yb, w, h);
	};
	
	this._mkArcDiv = function(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects)
	{
		var xrDef = cx + x + (iOdds & 0xffff), y2, h = oy - y, xl, xr, w;

		if(!h) h = 1;
		x = cx - x;

		if(iSects & 0xff0000) 
		{
			y2 = cy - y - h;
			if(iSects & 0x00ff)
			{
				if(iSects & 0x02)
				{
					xl = Math.max(x, aBndZ[y]);
					w = xrDef - xl;
					if(w > 0) this._mkDiv(xl, y2, w, h);
				}
				if(iSects & 0x01)
				{
					xr = Math.min(xrDef, aBndA[y]);
					w = xr - x;
					if(w > 0) this._mkDiv(x, y2, w, h);
				}
			}
			else
				this._mkDiv(x, y2, xrDef - x, h);
			y2 = cy + y + (iOdds >> 16);
			if(iSects & 0xff00)
			{
				if(iSects & 0x0100)
				{
					xl = Math.max(x, aBndA[y]);
					w = xrDef - xl;
					if(w > 0) this._mkDiv(xl, y2, w, h);
				}
				if(iSects & 0x0200)
				{
					xr = Math.min(xrDef, aBndZ[y]);
					w = xr - x;
					if(w > 0) this._mkDiv(x, y2, w, h);
				}
			}
			else
				this._mkDiv(x, y2, xrDef - x, h);
		}
		else
		{
			if(iSects & 0x00ff)
			{
				if(iSects & 0x02)
					xl = Math.max(x, aBndZ[y]);
				else
					xl = x;
				if(iSects & 0x01)
					xr = Math.min(xrDef, aBndA[y]);
				else
					xr = xrDef;
				y2 = cy - y - h;
				w = xr - xl;
				if(w > 0) this._mkDiv(xl, y2, w, h);
			}
			if(iSects & 0xff00)
			{
				if(iSects & 0x0100)
					xl = Math.max(x, aBndA[y]);
				else
					xl = x;
				if(iSects & 0x0200)
					xr = Math.min(xrDef, aBndZ[y]);
				else
					xr = xrDef;
				y2 = cy + y + (iOdds >> 16);
				w = xr - xl;
				if(w > 0) this._mkDiv(xl, y2, w, h);
			}
		}
	};

	this.setStroke(1);
	this.setFont("verdana,geneva,helvetica,sans-serif", "12px", Font.PLAIN);
	this.color = "#000000";
	this.htm = "";
	this.wnd = wnd || window;

	if(!jg_ok) _chkDHTM(this.wnd);
	if(jg_ok)
	{
		if(cnv)
		{
			if(typeof(cnv) == "string")
				this.cont = document.all? (this.wnd.document.all[cnv] || null)
					: document.getElementById? (this.wnd.document.getElementById(cnv) || null)
					: null;
			else if(cnv == window.document)
				this.cont = document.getElementsByTagName("body")[0];
			else this.cont = cnv;
			this.cnv = this.wnd.document.createElement("div");
			this.cnv.style.fontSize=0;
			this.cont.appendChild(this.cnv);
			this.paint = jg_dom? _pntCnvDom : _pntCnvIe;
		}
		else
			this.paint = _pntDoc;
	}
	else
		this.paint = _pntN;

	this.setPrintable(false);
}

function _mkLinVirt(aLin, x1, y1, x2, y2)
{
	var dx = Math.abs(x2-x1), dy = Math.abs(y2-y1),
	x = x1, y = y1,
	xIncr = (x1 > x2)? -1 : 1,
	yIncr = (y1 > y2)? -1 : 1,
	p,
	i = 0;
	if(dx >= dy)
	{
		var pr = dy<<1,
		pru = pr - (dx<<1);
		p = pr-dx;
		while(dx > 0)
		{--dx;
			if(p > 0)    
			{
				aLin[i++] = x;
				y += yIncr;
				p += pru;
			}
			else p += pr;
			x += xIncr;
		}
	}
	else
	{
		var pr = dx<<1,
		pru = pr - (dy<<1);
		p = pr-dy;
		while(dy > 0)
		{--dy;
			y += yIncr;
			aLin[i++] = x;
			if(p > 0)    
			{
				x += xIncr;
				p += pru;
			}
			else p += pr;
		}
	}
	for(var len = aLin.length, i = len-i; i;)
		aLin[len-(i--)] = x;
};

function _CompInt(x, y)
{
	return(x - y);
}

var config = new Object();


var tt_Debug	= true		
var tt_Enabled	= true		
var TagsToTip	= true		
							config. Above			= false		
config. BgColor			= '#E2E7FF'	
config. BgImg			= ''		
config. BorderColor		= '#003099'
config. BorderStyle		= 'solid'	
config. BorderWidth		= 1
config. CenterMouse		= false		
config. ClickClose		= false		
config. ClickSticky		= false		
config. CloseBtn		= false		
config. CloseBtnColors	= ['#990000', '#FFFFFF', '#DD3333', '#FFFFFF']	
config. CloseBtnText	= '&nbsp;X&nbsp;'	
config. CopyContent		= true		
config. Delay			= 400		
config. Duration		= 0			
config. Exclusive		= false		
config. FadeIn			= 100		
config. FadeOut			= 100
config. FadeInterval	= 30		
config. Fix				= null		
config. FollowMouse		= true		
config. FontColor		= '#000044'
config. FontFace		= 'Verdana,Geneva,sans-serif'
config. FontSize		= '8pt'		
config. FontWeight		= 'normal'	
config. Height			= 0			
config. JumpHorz		= false		
config. JumpVert		= true		
config. Left			= false		
config. OffsetX			= 14		
config. OffsetY			= 8			
config. Opacity			= 100		
config. Padding			= 3			
config. Shadow			= false		
config. ShadowColor		= '#C0C0C0'
config. ShadowWidth		= 5
config. Sticky			= false		
config. TextAlign		= 'left'	
config. Title			= ''		
config. TitleAlign		= 'left'	
config. TitleBgColor	= ''		
config. TitleFontColor	= '#FFFFFF'	
config. TitleFontFace	= ''		
config. TitleFontSize	= ''		
config. TitlePadding	= 2
config. Width			= 0			
									function Tip()
{
	tt_Tip(arguments, null);
}
function TagToTip()
{
	var t2t = tt_GetElt(arguments[0]);
	if(t2t)
		tt_Tip(arguments, t2t);
}
function UnTip()
{
	tt_OpReHref();
	if(tt_aV[DURATION] < 0 && (tt_iState & 0x2))
		tt_tDurt.Timer("tt_HideInit()", -tt_aV[DURATION], true);
	else if(!(tt_aV[STICKY] && (tt_iState & 0x2)))
		tt_HideInit();
}

var tt_aElt = new Array(10), 
tt_aV = new Array(),	
tt_sContent,			
tt_t2t, tt_t2tDad,		
tt_musX, tt_musY,
tt_over,
tt_x, tt_y, tt_w, tt_h; 

function tt_Extension()
{
	tt_ExtCmdEnum();
	tt_aExt[tt_aExt.length] = this;
	return this;
}
function tt_SetTipPos(x, y)
{
	var css = tt_aElt[0].style;

	tt_x = x;
	tt_y = y;
	css.left = x + "px";
	css.top = y + "px";
	if(tt_ie56)
	{
		var ifrm = tt_aElt[tt_aElt.length - 1];
		if(ifrm)
		{
			ifrm.style.left = css.left;
			ifrm.style.top = css.top;
		}
	}
}
function tt_HideInit()
{
	if(tt_iState)
	{
		tt_ExtCallFncs(0, "HideInit");
		tt_iState &= ~(0x4 | 0x8);
		if(tt_flagOpa && tt_aV[FADEOUT])
		{
			tt_tFade.EndTimer();
			if(tt_opa)
			{
				var n = Math.round(tt_aV[FADEOUT] / (tt_aV[FADEINTERVAL] * (tt_aV[OPACITY] / tt_opa)));
				tt_Fade(tt_opa, tt_opa, 0, n);
				return;
			}
		}
		tt_tHide.Timer("tt_Hide();", 1, false);
	}
}
function tt_Hide()
{
	if(tt_db && tt_iState)
	{
		tt_OpReHref();
		if(tt_iState & 0x2)
		{
			tt_aElt[0].style.visibility = "hidden";
			tt_ExtCallFncs(0, "Hide");
		}
		tt_tShow.EndTimer();
		tt_tHide.EndTimer();
		tt_tDurt.EndTimer();
		tt_tFade.EndTimer();
		if(!tt_op && !tt_ie)
		{
			tt_tWaitMov.EndTimer();
			tt_bWait = false;
		}
		if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY])
			tt_RemEvtFnc(document, "mouseup", tt_OnLClick);
		tt_ExtCallFncs(0, "Kill");
		if(tt_t2t && !tt_aV[COPYCONTENT])
			tt_UnEl2Tip();
		tt_iState = 0;
		tt_over = null;
		tt_ResetMainDiv();
		if(tt_aElt[tt_aElt.length - 1])
			tt_aElt[tt_aElt.length - 1].style.display = "none";
	}
}
function tt_GetElt(id)
{
	return(document.getElementById ? document.getElementById(id)
			: document.all ? document.all[id]
			: null);
}
function tt_GetDivW(el)
{
	return(el ? (el.offsetWidth || el.style.pixelWidth || 0) : 0);
}
function tt_GetDivH(el)
{
	return(el ? (el.offsetHeight || el.style.pixelHeight || 0) : 0);
}
function tt_GetScrollX()
{
	return(window.pageXOffset || (tt_db ? (tt_db.scrollLeft || 0) : 0));
}
function tt_GetScrollY()
{
	return(window.pageYOffset || (tt_db ? (tt_db.scrollTop || 0) : 0));
}
function tt_GetClientW()
{
	return tt_GetWndCliSiz("Width");
}
function tt_GetClientH()
{
	return tt_GetWndCliSiz("Height");
}
function tt_GetEvtX(e)
{
	return (e ? ((typeof(e.pageX) != tt_u) ? e.pageX : (e.clientX + tt_GetScrollX())) : 0);
}
function tt_GetEvtY(e)
{
	return (e ? ((typeof(e.pageY) != tt_u) ? e.pageY : (e.clientY + tt_GetScrollY())) : 0);
}
function tt_AddEvtFnc(el, sEvt, PFnc)
{
	if(el)
	{
		if(el.addEventListener)
			el.addEventListener(sEvt, PFnc, false);
		else
			el.attachEvent("on" + sEvt, PFnc);
	}
}
function tt_RemEvtFnc(el, sEvt, PFnc)
{
	if(el)
	{
		if(el.removeEventListener)
			el.removeEventListener(sEvt, PFnc, false);
		else
			el.detachEvent("on" + sEvt, PFnc);
	}
}
function tt_GetDad(el)
{
	return(el.parentNode || el.parentElement || el.offsetParent);
}
function tt_MovDomNode(el, dadFrom, dadTo)
{
	if(dadFrom)
		dadFrom.removeChild(el);
	if(dadTo)
		dadTo.appendChild(el);
}

var tt_aExt = new Array(),	

tt_db, tt_op, tt_ie, tt_ie56, tt_bBoxOld,	
tt_body,
tt_ovr_,				
tt_flagOpa,				
tt_maxPosX, tt_maxPosY,
tt_iState = 0,			
tt_opa,					
tt_bJmpVert, tt_bJmpHorz,
tt_elDeHref,			
tt_tShow = new Number(0), tt_tHide = new Number(0), tt_tDurt = new Number(0),
tt_tFade = new Number(0), tt_tWaitMov = new Number(0),
tt_bWait = false,
tt_u = "undefined";


function tt_Init()
{
	tt_MkCmdEnum();
	if(!tt_Browser() || !tt_MkMainDiv())
		return;
	tt_IsW3cBox();
	tt_OpaSupport();
	tt_AddEvtFnc(document, "mousemove", tt_Move);
	if(TagsToTip || tt_Debug)
		tt_SetOnloadFnc();
	tt_AddEvtFnc(window, "unload", tt_Hide);
}
function tt_MkCmdEnum()
{
	var n = 0;
	for(var i in config)
		eval("window." + i.toString().toUpperCase() + " = " + n++);
	tt_aV.length = n;
}
function tt_Browser()
{
	var n, nv, n6, w3c;

	n = navigator.userAgent.toLowerCase(),
	nv = navigator.appVersion;
	tt_op = (document.defaultView && typeof(eval("w" + "indow" + "." + "o" + "p" + "er" + "a")) != tt_u);
	tt_ie = n.indexOf("msie") != -1 && document.all && !tt_op;
	if(tt_ie)
	{
		var ieOld = (!document.compatMode || document.compatMode == "BackCompat");
		tt_db = !ieOld ? document.documentElement : (document.body || null);
		if(tt_db)
			tt_ie56 = parseFloat(nv.substring(nv.indexOf("MSIE") + 5)) >= 5.5
					&& typeof document.body.style.maxHeight == tt_u;
	}
	else
	{
		tt_db = document.documentElement || document.body ||
				(document.getElementsByTagName ? document.getElementsByTagName("body")[0]
				: null);
		if(!tt_op)
		{
			n6 = document.defaultView && typeof document.defaultView.getComputedStyle != tt_u;
			w3c = !n6 && document.getElementById;
		}
	}
	tt_body = (document.getElementsByTagName ? document.getElementsByTagName("body")[0]
				: (document.body || null));
	if(tt_ie || n6 || tt_op || w3c)
	{
		if(tt_body && tt_db)
		{
			if(document.attachEvent || document.addEventListener)
				return true;
		}
		else
			tt_Err("tt02",false);
}
	tt_db = null;
	return false;
}
function tt_MkMainDiv()
{
	if(tt_body.insertAdjacentHTML)
		tt_body.insertAdjacentHTML("afterBegin", tt_MkMainDivHtm());
	else if(typeof tt_body.innerHTML != tt_u && document.createElement && tt_body.appendChild)
		tt_body.appendChild(tt_MkMainDivDom());
	if(window.tt_GetMainDivRefs  && tt_GetMainDivRefs())
		return true;
	tt_db = null;
	return false;
}
function tt_MkMainDivHtm()
{
	return(
		'<div id="WzTtDiV"></div>' +
		(tt_ie56 ? ('<iframe id="WzTtIfRm" src="javascript:false" scrolling="no" frameborder="0" style="filter:Alpha(opacity=0);position:absolute;top:0px;left:0px;display:none;"></iframe>')
		: '')
	);
}
function tt_MkMainDivDom()
{
	var el = document.createElement("div");
	if(el)
		el.id = "WzTtDiV";
	return el;
}
function tt_GetMainDivRefs()
{
	tt_aElt[0] = tt_GetElt("WzTtDiV");
	if(tt_ie56 && tt_aElt[0])
	{
		tt_aElt[tt_aElt.length - 1] = tt_GetElt("WzTtIfRm");
		if(!tt_aElt[tt_aElt.length - 1])
			tt_aElt[0] = null;
	}
	if(tt_aElt[0])
	{
		var css = tt_aElt[0].style;

		css.visibility = "hidden";
		css.position = "absolute";
		css.overflow = "hidden";
		return true;
	}
	return false;
}
function tt_ResetMainDiv()
{
	tt_SetTipPos(0, 0);
	tt_aElt[0].innerHTML = "";
	tt_aElt[0].style.width = "0px";
	tt_h = 0;
}
function tt_IsW3cBox()
{
	var css = tt_aElt[0].style;

	css.padding = "10px";
	css.width = "40px";
	tt_bBoxOld = (tt_GetDivW(tt_aElt[0]) == 40);
	css.padding = "0px";
	tt_ResetMainDiv();
}
function tt_OpaSupport()
{
	var css = tt_body.style;

	tt_flagOpa = (typeof(css.KhtmlOpacity) != tt_u) ? 2
				: (typeof(css.KHTMLOpacity) != tt_u) ? 3
				: (typeof(css.MozOpacity) != tt_u) ? 4
				: (typeof(css.opacity) != tt_u) ? 5
				: (typeof(css.filter) != tt_u) ? 1
				: 0;
}
function tt_SetOnloadFnc()
{
	tt_AddEvtFnc(document, "DOMContentLoaded", tt_HideSrcTags);
	tt_AddEvtFnc(window, "load", tt_HideSrcTags);
	if(tt_body.attachEvent)
		tt_body.attachEvent("onreadystatechange",
			function() {
				if(tt_body.readyState == "complete")
					tt_HideSrcTags();
			} );
	if(/WebKit|KHTML/i.test(navigator.userAgent))
	{
		var t = setInterval(function() {
					if(/loaded|complete/.test(document.readyState))
					{
						clearInterval(t);
						tt_HideSrcTags();
					}
				}, 10);
	}
}
function tt_HideSrcTags()
{
	if(!window.tt_HideSrcTags || window.tt_HideSrcTags.done)
		return;
	window.tt_HideSrcTags.done = true;
	if(!tt_HideSrcTagsRecurs(tt_body))
				tt_Err("tt01", true);
}
function tt_HideSrcTagsRecurs(dad)
{
	var ovr, asT2t;
	var a = dad.childNodes || dad.children || null;

	for(var i = a ? a.length : 0; i;)
	{--i;
		if(!tt_HideSrcTagsRecurs(a[i]))
			return false;
		ovr = a[i].getAttribute ? (a[i].getAttribute("onmouseover") || a[i].getAttribute("onclick"))
				: (typeof a[i].onmouseover == "function") ? (a[i].onmouseover || a[i].onclick)
				: null;
		if(ovr)
		{
			asT2t = ovr.toString().match(/TagToTip\s*\(\s*'[^'.]+'\s*[\),]/);
			if(asT2t && asT2t.length)
			{
				if(!tt_HideSrcTag(asT2t[0]))
					return false;
			}
		}
	}
	return true;
}
function tt_HideSrcTag(sT2t)
{
	var id, el;

	id = sT2t.replace(/.+'([^'.]+)'.+/, "$1");
	el = tt_GetElt(id);
	if(el)
	{
		if(tt_Debug && !TagsToTip)
			return false;
		else
			el.style.display = "none";
	}
	else
		tt_Err("Invalid ID\n'" + id + "'\npassed to TagToTip()."
				+ " There exists no HTML element with that ID.", true);
	return true;
}
function tt_Tip(arg, t2t)
{
	if(!tt_db || (tt_iState & 0x8))
		return;
	if(tt_iState)
		tt_Hide();
	if(!tt_Enabled)
		return;
	tt_t2t = t2t;
	if(!tt_ReadCmds(arg))
		return;
	tt_iState = 0x1 | 0x4;
	tt_AdaptConfig1();
	tt_MkTipContent(arg);
	tt_MkTipSubDivs();
	tt_FormatTip();
	tt_bJmpVert = false;
	tt_bJmpHorz = false;
	tt_maxPosX = tt_GetClientW() + tt_GetScrollX() - tt_w - 1;
	tt_maxPosY = tt_GetClientH() + tt_GetScrollY() - tt_h - 1;
	tt_AdaptConfig2();
	tt_OverInit();
	tt_ShowInit();
	tt_Move();
}
function tt_ReadCmds(a)
{
	var i;

	i = 0;
	for(var j in config)
		tt_aV[i++] = config[j];
	if(a.length & 1)
	{
		for(i = a.length - 1; i > 0; i -= 2)
			tt_aV[a[i - 1]] = a[i];
		return true;
	}
	tt_Err("Incorrect call of Tip() or TagToTip().\n"
			+ "Each command must be followed by a value.", true);
	return false;
}
function tt_AdaptConfig1()
{
	tt_ExtCallFncs(0, "LoadConfig");
	if(!tt_aV[TITLEBGCOLOR].length)
		tt_aV[TITLEBGCOLOR] = tt_aV[BORDERCOLOR];
	if(!tt_aV[TITLEFONTCOLOR].length)
		tt_aV[TITLEFONTCOLOR] = tt_aV[BGCOLOR];
	if(!tt_aV[TITLEFONTFACE].length)
		tt_aV[TITLEFONTFACE] = tt_aV[FONTFACE];
	if(!tt_aV[TITLEFONTSIZE].length)
		tt_aV[TITLEFONTSIZE] = tt_aV[FONTSIZE];
	if(tt_aV[CLOSEBTN])
	{
		if(!tt_aV[CLOSEBTNCOLORS])
			tt_aV[CLOSEBTNCOLORS] = new Array("", "", "", "");
		for(var i = 4; i;)
		{--i;
			if(!tt_aV[CLOSEBTNCOLORS][i].length)
				tt_aV[CLOSEBTNCOLORS][i] = (i & 1) ? tt_aV[TITLEFONTCOLOR] : tt_aV[TITLEBGCOLOR];
		}
		if(!tt_aV[TITLE].length)
			tt_aV[TITLE] = " ";
	}
	if(tt_aV[OPACITY] == 100 && typeof tt_aElt[0].style.MozOpacity != tt_u && !Array.every)
		tt_aV[OPACITY] = 99;
	if(tt_aV[FADEIN] && tt_flagOpa && tt_aV[DELAY] > 100)
		tt_aV[DELAY] = Math.max(tt_aV[DELAY] - tt_aV[FADEIN], 100);
}
function tt_AdaptConfig2()
{
	if(tt_aV[CENTERMOUSE])
	{
		tt_aV[OFFSETX] -= ((tt_w - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0)) >> 1);
		tt_aV[JUMPHORZ] = false;
	}
}
function tt_MkTipContent(a)
{
	if(tt_t2t)
	{
		if(tt_aV[COPYCONTENT])
			tt_sContent = tt_t2t.innerHTML;
		else
			tt_sContent = "";
	}
	else
		tt_sContent = a[0];
	tt_ExtCallFncs(0, "CreateContentString");
}
function tt_MkTipSubDivs()
{
	var sCss = 'position:relative;margin:0px;padding:0px;border-width:0px;left:0px;top:0px;line-height:normal;width:auto;',
	sTbTrTd = ' cellspacing="0" cellpadding="0" border="0" style="' + sCss + '"><tbody style="' + sCss + '"><tr><td ';

	tt_aElt[0].style.width = tt_GetClientW() + "px";
	tt_aElt[0].innerHTML =
		(''
		+ (tt_aV[TITLE].length ?
			('<div id="WzTiTl" style="position:relative;z-index:1;">'
			+ '<table id="WzTiTlTb"' + sTbTrTd + 'id="WzTiTlI" style="' + sCss + '">'
			+ tt_aV[TITLE]
			+ '</td>'
			+ (tt_aV[CLOSEBTN] ?
				('<td align="right" style="' + sCss
				+ 'text-align:right;">'
				+ '<span id="WzClOsE" style="position:relative;left:2px;padding-left:2px;padding-right:2px;'
				+ 'cursor:' + (tt_ie ? 'hand' : 'pointer')
				+ ';" onmouseover="tt_OnCloseBtnOver(1)" onmouseout="tt_OnCloseBtnOver(0)" onclick="tt_HideInit()">'
				+ tt_aV[CLOSEBTNTEXT]
				+ '</span></td>')
				: '')
			+ '</tr></tbody></table></div>')
			: '')
		+ '<div id="WzBoDy" style="position:relative;z-index:0;">'
		+ '<table' + sTbTrTd + 'id="WzBoDyI" style="' + sCss + '">'
		+ tt_sContent
		+ '</td></tr></tbody></table></div>'
		+ (tt_aV[SHADOW]
			? ('<div id="WzTtShDwR" style="position:absolute;overflow:hidden;"></div>'
				+ '<div id="WzTtShDwB" style="position:relative;overflow:hidden;"></div>')
			: '')
		);
	tt_GetSubDivRefs();
	if(tt_t2t && !tt_aV[COPYCONTENT])
		tt_El2Tip();
	tt_ExtCallFncs(0, "SubDivsCreated");
}
function tt_GetSubDivRefs()
{
	var aId = new Array("WzTiTl", "WzTiTlTb", "WzTiTlI", "WzClOsE", "WzBoDy", "WzBoDyI", "WzTtShDwB", "WzTtShDwR");

	for(var i = aId.length; i; --i)
		tt_aElt[i] = tt_GetElt(aId[i - 1]);
}
function tt_FormatTip()
{
	var css, w, h, pad = tt_aV[PADDING], padT, wBrd = tt_aV[BORDERWIDTH],
	iOffY, iOffSh, iAdd = (pad + wBrd) << 1;

	if(tt_aV[TITLE].length)
	{
		padT = tt_aV[TITLEPADDING];
		css = tt_aElt[1].style;
		css.background = tt_aV[TITLEBGCOLOR];
		css.paddingTop = css.paddingBottom = padT + "px";
		css.paddingLeft = css.paddingRight = (padT + 2) + "px";
		css = tt_aElt[3].style;
		css.color = tt_aV[TITLEFONTCOLOR];
		if(tt_aV[WIDTH] == -1)
			css.whiteSpace = "nowrap";
		css.fontFamily = tt_aV[TITLEFONTFACE];
		css.fontSize = tt_aV[TITLEFONTSIZE];
		css.fontWeight = "bold";
		css.textAlign = tt_aV[TITLEALIGN];
		if(tt_aElt[4])
		{
			css = tt_aElt[4].style;
			css.background = tt_aV[CLOSEBTNCOLORS][0];
			css.color = tt_aV[CLOSEBTNCOLORS][1];
			css.fontFamily = tt_aV[TITLEFONTFACE];
			css.fontSize = tt_aV[TITLEFONTSIZE];
			css.fontWeight = "bold";
		}
		if(tt_aV[WIDTH] > 0)
			tt_w = tt_aV[WIDTH];
		else
		{
			tt_w = tt_GetDivW(tt_aElt[3]) + tt_GetDivW(tt_aElt[4]);
			if(tt_aElt[4])
				tt_w += pad;
			if(tt_aV[WIDTH] < -1 && tt_w > -tt_aV[WIDTH])
				tt_w = -tt_aV[WIDTH];
		}
		iOffY = -wBrd;
	}
	else
	{
		tt_w = 0;
		iOffY = 0;
	}

	css = tt_aElt[5].style;
	css.top = iOffY + "px";
	if(wBrd)
	{
		css.borderColor = tt_aV[BORDERCOLOR];
		css.borderStyle = tt_aV[BORDERSTYLE];
		css.borderWidth = wBrd + "px";
	}
	if(tt_aV[BGCOLOR].length)
		css.background = tt_aV[BGCOLOR];
	if(tt_aV[BGIMG].length)
		css.backgroundImage = "url(" + tt_aV[BGIMG] + ")";
	css.padding = pad + "px";
	css.textAlign = tt_aV[TEXTALIGN];
	if(tt_aV[HEIGHT])
	{
		css.overflow = "auto";
		if(tt_aV[HEIGHT] > 0)
			css.height = (tt_aV[HEIGHT] + iAdd) + "px";
		else
			tt_h = iAdd - tt_aV[HEIGHT];
	}
	css = tt_aElt[6].style;
	css.color = tt_aV[FONTCOLOR];
	css.fontFamily = tt_aV[FONTFACE];
	css.fontSize = tt_aV[FONTSIZE];
	css.fontWeight = tt_aV[FONTWEIGHT];
	css.textAlign = tt_aV[TEXTALIGN];
	if(tt_aV[WIDTH] > 0)
		w = tt_aV[WIDTH];
	else if(tt_aV[WIDTH] == -1 && tt_w)
		w = tt_w;
	else
	{
		w = tt_GetDivW(tt_aElt[6]);
		if(tt_aV[WIDTH] < -1 && w > -tt_aV[WIDTH])
			w = -tt_aV[WIDTH];
	}
	if(w > tt_w)
		tt_w = w;
	tt_w += iAdd;

	if(tt_aV[SHADOW])
	{
		tt_w += tt_aV[SHADOWWIDTH];
		iOffSh = Math.floor((tt_aV[SHADOWWIDTH] * 4) / 3);
		css = tt_aElt[7].style;
		css.top = iOffY + "px";
		css.left = iOffSh + "px";
		css.width = (tt_w - iOffSh - tt_aV[SHADOWWIDTH]) + "px";
		css.height = tt_aV[SHADOWWIDTH] + "px";
		css.background = tt_aV[SHADOWCOLOR];
		css = tt_aElt[8].style;
		css.top = iOffSh + "px";
		css.left = (tt_w - tt_aV[SHADOWWIDTH]) + "px";
		css.width = tt_aV[SHADOWWIDTH] + "px";
		css.background = tt_aV[SHADOWCOLOR];
	}
	else
		iOffSh = 0;

	tt_SetTipOpa(tt_aV[FADEIN] ? 0 : tt_aV[OPACITY]);
	tt_FixSize(iOffY, iOffSh);
}
function tt_FixSize(iOffY, iOffSh)
{
	var wIn, wOut, h, add, pad = tt_aV[PADDING], wBrd = tt_aV[BORDERWIDTH], i;

	tt_aElt[0].style.width = tt_w + "px";
	tt_aElt[0].style.pixelWidth = tt_w;
	wOut = tt_w - ((tt_aV[SHADOW]) ? tt_aV[SHADOWWIDTH] : 0);
	wIn = wOut;
	if(!tt_bBoxOld)
		wIn -= (pad + wBrd) << 1;
	tt_aElt[5].style.width = wIn + "px";
	if(tt_aElt[1])
	{
		wIn = wOut - ((tt_aV[TITLEPADDING] + 2) << 1);
		if(!tt_bBoxOld)
			wOut = wIn;
		tt_aElt[1].style.width = wOut + "px";
		tt_aElt[2].style.width = wIn + "px";
	}
	if(tt_h)
	{
		h = tt_GetDivH(tt_aElt[5]);
		if(h > tt_h)
		{
			if(!tt_bBoxOld)
				tt_h -= (pad + wBrd) << 1;
			tt_aElt[5].style.height = tt_h + "px";
		}
	}
	tt_h = tt_GetDivH(tt_aElt[0]) + iOffY;
	if(tt_aElt[8])
		tt_aElt[8].style.height = (tt_h - iOffSh) + "px";
	i = tt_aElt.length - 1;
	if(tt_aElt[i])
	{
		tt_aElt[i].style.width = tt_w + "px";
		tt_aElt[i].style.height = tt_h + "px";
	}
}
function tt_DeAlt(el)
{
	var aKid;

	if(el)
	{
		if(el.alt)
			el.alt = "";
		if(el.title)
			el.title = "";
		aKid = el.childNodes || el.children || null;
		if(aKid)
		{
			for(var i = aKid.length; i;)
				tt_DeAlt(aKid[--i]);
		}
	}
}
function tt_OpDeHref(el)
{
	if(!tt_op)
		return;
	if(tt_elDeHref)
		tt_OpReHref();
	while(el)
	{
		if(el.hasAttribute && el.hasAttribute("href"))
		{
			el.t_href = el.getAttribute("href");
			el.t_stats = window.status;
			el.removeAttribute("href");
			el.style.cursor = "hand";
			tt_AddEvtFnc(el, "mousedown", tt_OpReHref);
			window.status = el.t_href;
			tt_elDeHref = el;
			break;
		}
		el = tt_GetDad(el);
	}
}
function tt_OpReHref()
{
	if(tt_elDeHref)
	{
		tt_elDeHref.setAttribute("href", tt_elDeHref.t_href);
		tt_RemEvtFnc(tt_elDeHref, "mousedown", tt_OpReHref);
		window.status = tt_elDeHref.t_stats;
		tt_elDeHref = null;
	}
}
function tt_El2Tip()
{
	var css = tt_t2t.style;

	tt_t2t.t_cp = css.position;
	tt_t2t.t_cl = css.left;
	tt_t2t.t_ct = css.top;
	tt_t2t.t_cd = css.display;
	tt_t2tDad = tt_GetDad(tt_t2t);
	tt_MovDomNode(tt_t2t, tt_t2tDad, tt_aElt[6]);
	css.display = "block";
	css.position = "static";
	css.left = css.top = css.marginLeft = css.marginTop = "0px";
}
function tt_UnEl2Tip()
{
	var css = tt_t2t.style;

	css.display = tt_t2t.t_cd;
	tt_MovDomNode(tt_t2t, tt_GetDad(tt_t2t), tt_t2tDad);
	css.position = tt_t2t.t_cp;
	css.left = tt_t2t.t_cl;
	css.top = tt_t2t.t_ct;
	tt_t2tDad = null;
}
function tt_OverInit()
{
	if(window.event)
		tt_over = window.event.target || window.event.srcElement;
	else
		tt_over = tt_ovr_;
	tt_DeAlt(tt_over);
	tt_OpDeHref(tt_over);
}
function tt_ShowInit()
{
	tt_tShow.Timer("tt_Show()", tt_aV[DELAY], true);
	if(tt_aV[CLICKCLOSE] || tt_aV[CLICKSTICKY])
		tt_AddEvtFnc(document, "mouseup", tt_OnLClick);
}
function tt_Show()
{
	var css = tt_aElt[0].style;

	css.zIndex = Math.max((window.dd && dd.z) ? (dd.z + 2) : 0, 1010);
	if(tt_aV[STICKY] || !tt_aV[FOLLOWMOUSE])
		tt_iState &= ~0x4;
	if(tt_aV[EXCLUSIVE])
		tt_iState |= 0x8;
	if(tt_aV[DURATION] > 0)
		tt_tDurt.Timer("tt_HideInit()", tt_aV[DURATION], true);
	tt_ExtCallFncs(0, "Show")
	css.visibility = "visible";
	tt_iState |= 0x2;
	if(tt_aV[FADEIN])
		tt_Fade(0, 0, tt_aV[OPACITY], Math.round(tt_aV[FADEIN] / tt_aV[FADEINTERVAL]));
	tt_ShowIfrm();
}
function tt_ShowIfrm()
{
	if(tt_ie56)
	{
		var ifrm = tt_aElt[tt_aElt.length - 1];
		if(ifrm)
		{
			var css = ifrm.style;
			css.zIndex = tt_aElt[0].style.zIndex - 1;
			css.display = "block";
		}
	}
}
function tt_Move(e)
{
	if(e)
		tt_ovr_ = e.target || e.srcElement;
	e = e || window.event;
	if(e)
	{
		tt_musX = tt_GetEvtX(e);
		tt_musY = tt_GetEvtY(e);
	}
	if(tt_iState & 0x4)
	{
		if(!tt_op && !tt_ie)
		{
			if(tt_bWait)
				return;
			tt_bWait = true;
			tt_tWaitMov.Timer("tt_bWait = false;", 1, true);
		}
		if(tt_aV[FIX])
		{
			tt_iState &= ~0x4;
			tt_PosFix();
		}
		else if(!tt_ExtCallFncs(e, "MoveBefore"))
			tt_SetTipPos(tt_Pos(0), tt_Pos(1));
		tt_ExtCallFncs([tt_musX, tt_musY], "MoveAfter")
	}
}
function tt_Pos(iDim)
{
	var iX, bJmpMod, cmdAlt, cmdOff, cx, iMax, iScrl, iMus, bJmp;

	if(iDim)
	{
		bJmpMod = tt_aV[JUMPVERT];
		cmdAlt = ABOVE;
		cmdOff = OFFSETY;
		cx = tt_h;
		iMax = tt_maxPosY;
		iScrl = tt_GetScrollY();
		iMus = tt_musY;
		bJmp = tt_bJmpVert;
	}
	else
	{
		bJmpMod = tt_aV[JUMPHORZ];
		cmdAlt = LEFT;
		cmdOff = OFFSETX;
		cx = tt_w;
		iMax = tt_maxPosX;
		iScrl = tt_GetScrollX();
		iMus = tt_musX;
		bJmp = tt_bJmpHorz;
	}
	if(bJmpMod)
	{
		if(tt_aV[cmdAlt] && (!bJmp || tt_CalcPosAlt(iDim) >= iScrl + 16))
			iX = tt_PosAlt(iDim);
		else if(!tt_aV[cmdAlt] && bJmp && tt_CalcPosDef(iDim) > iMax - 16)
			iX = tt_PosAlt(iDim);
		else
			iX = tt_PosDef(iDim);
	}
	else
	{
		iX = iMus;
		if(tt_aV[cmdAlt])
			iX -= cx + tt_aV[cmdOff] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0);
		else
			iX += tt_aV[cmdOff];
	}
	if(iX > iMax)
		iX = bJmpMod ? tt_PosAlt(iDim) : iMax;
	if(iX < iScrl)
		iX = bJmpMod ? tt_PosDef(iDim) : iScrl;
	return iX;
}
function tt_PosDef(iDim)
{
	if(iDim)
		tt_bJmpVert = tt_aV[ABOVE];
	else
		tt_bJmpHorz = tt_aV[LEFT];
	return tt_CalcPosDef(iDim);
}
function tt_PosAlt(iDim)
{
	if(iDim)
		tt_bJmpVert = !tt_aV[ABOVE];
	else
		tt_bJmpHorz = !tt_aV[LEFT];
	return tt_CalcPosAlt(iDim);
}
function tt_CalcPosDef(iDim)
{
	return iDim ? (tt_musY + tt_aV[OFFSETY]) : (tt_musX + tt_aV[OFFSETX]);
}
function tt_CalcPosAlt(iDim)
{
	var cmdOff = iDim ? OFFSETY : OFFSETX;
	var dx = tt_aV[cmdOff] - (tt_aV[SHADOW] ? tt_aV[SHADOWWIDTH] : 0);
	if(tt_aV[cmdOff] > 0 && dx <= 0)
		dx = 1;
	return((iDim ? (tt_musY - tt_h) : (tt_musX - tt_w)) - dx);
}
function tt_PosFix()
{
	var iX, iY;

	if(typeof(tt_aV[FIX][0]) == "number")
	{
		iX = tt_aV[FIX][0];
		iY = tt_aV[FIX][1];
	}
	else
	{
		if(typeof(tt_aV[FIX][0]) == "string")
			el = tt_GetElt(tt_aV[FIX][0]);
		else
			el = tt_aV[FIX][0];
		iX = tt_aV[FIX][1];
		iY = tt_aV[FIX][2];
		if(!tt_aV[ABOVE] && el)
			iY += tt_GetDivH(el);
		for(; el; el = el.offsetParent)
		{
			iX += el.offsetLeft || 0;
			iY += el.offsetTop || 0;
		}
	}
	if(tt_aV[ABOVE])
		iY -= tt_h;
	tt_SetTipPos(iX, iY);
}
function tt_Fade(a, now, z, n)
{
	if(n)
	{
		now += Math.round((z - now) / n);
		if((z > a) ? (now >= z) : (now <= z))
			now = z;
		else
			tt_tFade.Timer(
				"tt_Fade("
				+ a + "," + now + "," + z + "," + (n - 1)
				+ ")",
				tt_aV[FADEINTERVAL],
				true
			);
	}
	now ? tt_SetTipOpa(now) : tt_Hide();
}
function tt_SetTipOpa(opa)
{
	tt_SetOpa(tt_aElt[5], opa);
	if(tt_aElt[1])
		tt_SetOpa(tt_aElt[1], opa);
	if(tt_aV[SHADOW])
	{
		opa = Math.round(opa * 0.8);
		tt_SetOpa(tt_aElt[7], opa);
		tt_SetOpa(tt_aElt[8], opa);
	}
}
function tt_OnCloseBtnOver(iOver)
{
	var css = tt_aElt[4].style;

	iOver <<= 1;
	css.background = tt_aV[CLOSEBTNCOLORS][iOver];
	css.color = tt_aV[CLOSEBTNCOLORS][iOver + 1];
}
function tt_OnLClick(e)
{
	e = e || window.event;
	if(!((e.button && e.button & 2) || (e.which && e.which == 3)))
	{
		if(tt_aV[CLICKSTICKY] && (tt_iState & 0x4))
		{
			tt_aV[STICKY] = true;
			tt_iState &= ~0x4;
		}
		else if(tt_aV[CLICKCLOSE])
			tt_HideInit();
	}
}
function tt_Int(x)
{
	var y;

	return(isNaN(y = parseInt(x)) ? 0 : y);
}
Number.prototype.Timer = function(s, iT, bUrge)
{
	if(!this.value || bUrge)
		this.value = window.setTimeout(s, iT);
}
Number.prototype.EndTimer = function()
{
	if(this.value)
	{
		window.clearTimeout(this.value);
		this.value = 0;
	}
}
function tt_GetWndCliSiz(s)
{
	var db, y = window["inner" + s], sC = "client" + s, sN = "number";
	if(typeof y == sN)
	{
		var y2;
		return(
			((db = document.body) && typeof(y2 = db[sC]) == sN && y2 &&  y2 <= y) ? y2 
			: ((db = document.documentElement) && typeof(y2 = db[sC]) == sN && y2 && y2 <= y) ? y2
			: y
		);
	}
	return(
		((db = document.documentElement) && (y = db[sC])) ? y
		: document.body[sC]
	);
}
function tt_SetOpa(el, opa)
{
	var css = el.style;

	tt_opa = opa;
	if(tt_flagOpa == 1)
	{
		if(opa < 100)
		{
			if(typeof(el.filtNo) == tt_u)
				el.filtNo = css.filter;
			var bVis = css.visibility != "hidden";
			css.zoom = "100%";
			if(!bVis)
				css.visibility = "visible";
			css.filter = "alpha(opacity=" + opa + ")";
			if(!bVis)
				css.visibility = "hidden";
		}
		else if(typeof(el.filtNo) != tt_u)
			css.filter = el.filtNo;
	}
	else
	{
		opa /= 100.0;
		switch(tt_flagOpa)
		{
		case 2:
			css.KhtmlOpacity = opa; break;
		case 3:
			css.KHTMLOpacity = opa; break;
		case 4:
			css.MozOpacity = opa; break;
		case 5:
			css.opacity = opa; break;
		}
	}
}
function tt_Err(sErr, bIfDebug)
{
	if(tt_Debug || !bIfDebug)
		alert("Tooltip Script Error Message:\n\n" + sErr);
}

function tt_ExtCmdEnum()
{
	var s;

	for(var i in config)
	{
		s = "window." + i.toString().toUpperCase();
		if(eval("typeof(" + s + ") == tt_u"))
		{
			eval(s + " = " + tt_aV.length);
			tt_aV[tt_aV.length] = null;
		}
	}
}
function tt_ExtCallFncs(arg, sFnc)
{
	var b = false;
	for(var i = tt_aExt.length; i;)
	{--i;
		var fnc = tt_aExt[i]["On" + sFnc];
		if(fnc && fnc(arg))
			b = true;
	}
	return b;
}

tt_Init();

config. Balloon				= false	
config. BalloonImgPath		= "images/tt/tip_balloon/" 
config. BalloonEdgeSize		= 6		
config. BalloonStemWidth	= 15	
config. BalloonStemHeight	= 19	
config. BalloonStemOffset	= -7	
config. BalloonImgExt		= "gif";
var balloon = new tt_Extension();

balloon.OnLoadConfig = function()
{
	if(tt_aV[BALLOON])
	{
		balloon.padding = Math.max(tt_aV[PADDING] - tt_aV[BALLOONEDGESIZE], 0);
		balloon.width = tt_aV[WIDTH];
		tt_aV[BORDERWIDTH] = 0;
		tt_aV[WIDTH] = 0;
		tt_aV[PADDING] = 0;
		tt_aV[BGCOLOR] = "";
		tt_aV[BGIMG] = "";
		tt_aV[SHADOW] = false;
		if(tt_aV[BALLOONIMGPATH].charAt(tt_aV[BALLOONIMGPATH].length - 1) != '/')
			tt_aV[BALLOONIMGPATH] += "/";
		return true;
	}
	return false;
};
balloon.OnCreateContentString = function()
{
	if(!tt_aV[BALLOON])
		return false;
		
	var aImg, sImgZ, sCssCrn, sVaT, sVaB, sCss0;

	if(tt_aV[BALLOONIMGPATH] == config.BalloonImgPath)
		aImg = balloon.aDefImg;
	else
		aImg = Balloon_CacheImgs(tt_aV[BALLOONIMGPATH], tt_aV[BALLOONIMGEXT]);
	sCss0 = 'padding:0;margin:0;border:0;line-height:0;overflow:hidden;';
	sCssCrn = ' style="position:relative;width:' + tt_aV[BALLOONEDGESIZE] + 'px;' + sCss0 + 'overflow:hidden;';
	sVaT = 'vertical-align:top;" valign="top"';
	sVaB = 'vertical-align:bottom;" valign="bottom"';
	sImgZ = '" style="' + sCss0 + '" />';
	
	tt_sContent = '<table border="0" cellpadding="0" cellspacing="0" style="width:auto;padding:0;margin:0;left:0;top:0;"><tr>'
		+ '<td' + sCssCrn + sVaB + '>'
		+ '<img src="' + aImg[1].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
		+ '</td>'
		+ '<td valign="bottom" style="position:relative;' + sCss0 + '">'
		+ '<img id="bALlOOnT" style="position:relative;top:1px;z-index:1;display:none;' + sCss0 + '" src="' + aImg[9].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
		+ '<div style="position:relative;z-index:0;top:0;' + sCss0 + 'width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[2].src + ');">'
		+ '</div>'
		+ '</td>'
		+ '<td' + sCssCrn + sVaB + '>'
		+ '<img src="' + aImg[3].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
		+ '</td>'
		+ '</tr><tr>'
		+ '<td style="position:relative;background-repeat:repeat;' + sCss0 + 'width:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[8].src + ');">'
		+ '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[8].src + sImgZ
		+ '</td>'
		+ '<td id="bALlO0nBdY" style="position:relative;line-height:normal;background-repeat:repeat;'
		+ ';background-image:url(' + aImg[0].src + ')'
		+ ';color:' + tt_aV[FONTCOLOR]
		+ ';font-family:' + tt_aV[FONTFACE]
		+ ';font-size:' + tt_aV[FONTSIZE]
		+ ';font-weight:' + tt_aV[FONTWEIGHT]
		+ ';text-align:' + tt_aV[TEXTALIGN]
		+ ';padding:' + balloon.padding + 'px'
		+ ';width:' + ((balloon.width > 0) ? (balloon.width + 'px') : 'auto')
		+ ';">' + tt_sContent + '</td>'
		+ '<td style="position:relative;background-repeat:repeat;' + sCss0 + 'width:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[4].src + ');">'
		+ '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[4].src + sImgZ
		+ '</td>'
		+ '</tr><tr>'
		+ '<td' + sCssCrn + sVaT + '>'
		+ '<img src="' + aImg[7].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
		+ '</td>'
		+ '<td valign="top" style="position:relative;' + sCss0 + '">'
		+ '<div style="position:relative;left:0;top:0;' + sCss0 + 'width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[6].src + ');"></div>'
		+ '<img id="bALlOOnB" style="position:relative;top:-1px;left:2px;z-index:1;display:none;' + sCss0 + '" src="' + aImg[10].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
		+ '</td>'
		+ '<td' + sCssCrn + sVaT + '>'
		+ '<img src="' + aImg[5].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
		+ '</td>'
		+ '</tr></table>';
	return true;
};
balloon.OnSubDivsCreated = function()
{
	if(tt_aV[BALLOON])
	{
		var bdy = tt_GetElt("bALlO0nBdY");

		if (tt_t2t && !tt_aV[COPYCONTENT] && bdy)
			tt_MovDomNode(tt_t2t, tt_GetDad(tt_t2t), bdy);
		balloon.iStem = tt_aV[ABOVE] * 1;
		balloon.aStem = [tt_GetElt("bALlOOnT"), tt_GetElt("bALlOOnB")];
		balloon.aStem[balloon.iStem].style.display = "inline";
		if (balloon.width < -1)
			Balloon_MaxW(bdy);
		return true;
	}
	return false;
};
balloon.OnMoveAfter = function()
{
	if(tt_aV[BALLOON])
	{
		var iStem = (tt_aV[ABOVE] != tt_bJmpVert) * 1;

		if(iStem != balloon.iStem)
		{
			balloon.aStem[balloon.iStem].style.display = "none";
			balloon.aStem[iStem].style.display = "inline";
			balloon.iStem = iStem;
		}
		
		balloon.aStem[iStem].style.left = Balloon_CalcStemX() + "px";
		return true;
	}
	return false;
};
function Balloon_CalcStemX()
{
	var x = tt_musX - tt_x + tt_aV[BALLOONSTEMOFFSET] - tt_aV[BALLOONEDGESIZE];
	return Math.max(Math.min(x, tt_w - tt_aV[BALLOONSTEMWIDTH] - (tt_aV[BALLOONEDGESIZE] << 1) - 2), 2);
}
function Balloon_CacheImgs(sPath, sExt)
{
	var asImg = ["background", "lt", "t", "rt", "r", "rb", "b", "lb", "l", "stemt", "stemb"],
	n = asImg.length,
	aImg = new Array(n),
	img;

	while(n)
	{--n;
		img = aImg[n] = new Image();
		img.src = sPath + asImg[n] + "." + sExt;
	}
	return aImg;
}
function Balloon_MaxW(bdy)
{
	if (bdy)
	{
		var iAdd = tt_bBoxOld ? (balloon.padding << 1) : 0, w = tt_GetDivW(bdy);
		if (w > -balloon.width + iAdd)
			bdy.style.width = (-balloon.width + iAdd) + "px";
	}
}
function Balloon_PreCacheDefImgs()
{
	if(config.BalloonImgPath.charAt(config.BalloonImgPath.length - 1) != '/')
		config.BalloonImgPath += "/";
	balloon.aDefImg = Balloon_CacheImgs(config.BalloonImgPath, config.BalloonImgExt);
}
Balloon_PreCacheDefImgs();


config. CenterWindow = false	
config. CenterAlways = false	
var ctrwnd = new tt_Extension();

ctrwnd.OnLoadConfig = function()
{
	if(tt_aV[CENTERWINDOW])
	{
		if(tt_aV[STICKY])
		{
			if(tt_aV[CENTERALWAYS])
			{
				if(tt_ie)
					tt_AddEvtFnc(window, "scroll", cA);
				else
					tt_aElt[0].style.position = "fixed";
				tt_AddEvtFnc(window, "resize", cA);
			}
			return true;
		}
		tt_aV[CENTERWINDOW] = false;
	}
	return false;
};
ctrwnd.OnMoveBefore = cA;
ctrwnd.OnKill = function()
{
	if(tt_aV[CENTERWINDOW] && tt_aV[CENTERALWAYS])
	{
		tt_RemEvtFnc(window, "resize", cA);
		if(tt_ie)
			tt_RemEvtFnc(window, "scroll", cA);
		else
			tt_aElt[0].style.position = "absolute";
	}
	return false;
};
function cA()
{
	if(tt_aV[CENTERWINDOW])
	{
		var x, y, dx, dy;

		if(tt_ie || !tt_aV[CENTERALWAYS])
		{
			dx = tt_GetScrollX();
			dy = tt_GetScrollY();
		}
		else
		{
			dx = 0;
			dy = 0;
		}
		x = (tt_GetClientW() - tt_w) / 2 + dx + tt_aV[OFFSETX];
		y = (tt_GetClientH() - tt_h) / 2 + dy + tt_aV[OFFSETY];
		tt_SetTipPos(x, y);
		return true;
	}
	return false;
}
config. FollowScroll = true		
var fscrl = new tt_Extension();

fscrl.OnShow = function()
{
	if(tt_aV[FOLLOWSCROLL])
	{
		if(tt_aV[STICKY])
		{
			var x = tt_x - tt_GetScrollX(), y = tt_y - tt_GetScrollY();

			if(tt_ie)
			{
				fscrl.MoveOnScrl.offX = x;
				fscrl.MoveOnScrl.offY = y;
				fscrl.AddRemEvtFncs(tt_AddEvtFnc);
			}
			else
			{
				tt_SetTipPos(x, y);
				tt_aElt[0].style.position = "fixed";
			}
			return true;
		}
		tt_aV[FOLLOWSCROLL] = false;
	}
	return false;
};
fscrl.OnHide = function()
{
	if(tt_aV[FOLLOWSCROLL])
	{
		if(tt_ie)
			fscrl.AddRemEvtFncs(tt_RemEvtFnc);
		else
			tt_aElt[0].style.position = "absolute";
	}
};
fscrl.MoveOnScrl = function()
{
	tt_SetTipPos(fscrl.MoveOnScrl.offX + tt_GetScrollX(), fscrl.MoveOnScrl.offY + tt_GetScrollY());
};
fscrl.AddRemEvtFncs = function(PAddRem)
{
	PAddRem(window, "resize", fscrl.MoveOnScrl);
	PAddRem(window, "scroll", fscrl.MoveOnScrl);
};




Class("ECArtModel",{isa: ECModel,
	has: {
        K:					{	is:   "r",			
									init: 'ecMArt'},
		isBodyTextIsHtmlFile:	{	is:	"rw"},			
		classForPanel:			{	is:	"rw"},			
		tbMenuItems:			{	is:	"rw",			
									init: (new L)}				
    },
	
    methods: {

	initialize: function(){
		this.K = 'ecMArt';
		this.clKeyDB = 'art';
		return this;
	}



}
		});
function cr(){
		this.K = 'evKeyMap';					
	}


cr.prototype.key = function(ga){
switch(ga) {

	case 107:	
		if(this.aA()) {a.V().fm();} 
		break;
	case 109:	
		if(this.aA()) {a.V().eV();}
		break;

	case 33:	
		if(this.aA()) {a.V().fS();}
		break;

	case 34:	
		if(this.aA()) {a.V().fU();}
		break;

	case 37:	
		if(this.aA()) {a.V().ql();}
		break;

	case 39:	
		if(this.aA()) {a.V().nb();}
		break;

	case 38:	
		if(this.aA()) {a.V().lo();}
		break;

	case 40:	
		if(this.aA()) {a.V().qm();}
		break;

case 45:	
		if(this.aA()) {a.bD();}
		break;

	case 46:	
		if(this.aA()) {a.closeActiveTab();}
		break;

case 1037:	
		if(this.aA()) {a.vM();}
		break;

	case 1039:	
		if(this.aA()) {a.vI();}
		break;

	case 1038:	
		if(this.aA()) {a.V().cL(-1);}
		break;

	case 1040:	
		if(this.aA()) {a.V().cL(2);}
		break;

case 3038:	
		if(this.aA()) {a.V().fS();}
		break;

	case 3040:	
		if(this.aA()) {a.V().fU();}
		break;

	case 3033:	
		if(this.aA()) {a.V().cL(-2);}
		break;

	case 3034:	
		if(this.aA()) {a.V().cL(2);}
		break;

	default: 
		break;
	} 
		
	return;
	};

	cr.prototype.aA = function(){
		var tab = a.gw();
		return tab.ca();
	};

	cr.prototype.yL = function(){
		var tab = Ext.getCmp('accPageIcons');
		return tab.isVisible();
	};



cr.prototype.vQ = function(arg1, arg2, arg3){
debugger;
		alter('key pressed');
		return;
	};






var ecLoadingInfo = document.getElementById("ecLoadingInfo");

E.onReady(function(){
	a.wc();
	new E.Viewport({
	id: 'mainViewport',
	layout: 'border',
    items: [{
        region: 'north',
		id: 'mainNorth',
		title: t.elVPortTitleNorth,
		autoHeight: true,
        border: false,
        margins: '0 0 0 0',
		xtype: 'panel'
}, {
		region: 'west',
		id: 'mainWest',
		title: t.elVPortTitleWest,
        collapsible: true,
		minSize: c.c30052,
		maxSize: c.c30054,
		width: c.c30050,
		layout: 'fit',
		margins: '0 0 0 0',
		split: true,						
		items: a.ui['westAccordion']
    }, {
        region: 'south',
		id: 'mainSouth',
		title: t.elVPortTitleSouth,
		collapsible: true,
        collapsed: true,
        titleCollapse: true,
        html: t.jb,
        split: true,						
        height: c.c30070,
        minHeight: c.c30076,
	    minSize: c.c30072, 
        maxSize: c.c30074,
		margins: '0 0 0 0'

    }, {
region: 'center',
		id: 'mainCenter',
		xtype: 'container',
		layout: 'fit',
		items: a.ui['centerEC']
        }
    ], 

listeners : {
		 domready : function(frame){  
			if(frame.getDoc()){ 
				var MIF = frame.ownerCt;
			frame.getDoc().on('click', me.interceptLinks, me, {delegate:'a[target]'});
			} 
		}, 

		documentloaded : function(frame){
			var MIF = frame.ownerCt,
			doc = MIF.getFrameDocument(),
			sameOrigin = frame.domWritable(); 
                        var title =  sameOrigin ? 
                            doc.title : 
                            null;
					var node = MIF.selectedNode;
                        if(node){
	                        title || (title = node.attributes.text); 
	                        node.getUI().afterLoad();
                        }
					title && MIF.setTitle(title, sameOrigin ? 'frame-open':'frame-locked');
                        Demo.balloon(null,'Tab: "'+MIF.title+'" reports:','documentloaded ');
					 }, 
			scope : this
			} 

}); 


}); 




ECConfig.prototype.wy = function(){    
	var scopeObj = document.getElementById('pagesTabsEC');
app.ui['keyMappingForTabPage'] = new Ext.KeyMap(document, this.vL(scopeObj));
	};

ECConfig.prototype.vL = function(scopeObj){
var keyMaps = [

{key: [37],	scope: scopeObj, handler: function (){app.key(37);}},
{key: [39],	scope: scopeObj, handler: function (){app.key(39);}},
{key: [38], scope: scopeObj, handler: function (){app.key(38);}},
{key: [40], scope: scopeObj, handler: function (){app.key(40);}},
{key: [33], scope: scopeObj, handler: function (){app.key(33);}},
{key: [34], scope: scopeObj, handler: function (){app.key(34);}},
{key: [45], scope: scopeObj, handler: function (){app.key(45);}},
{key: [46],	scope: scopeObj, handler: function (){app.key(46);}},
{key: [107], scope: scopeObj, handler: function (){app.key(107);}},
 {key: [109], scope: scopeObj, handler: function (){app.key(109);}},

{key: [37],	ctrl: true, scope: scopeObj, handler: function (){app.key(1037);}},
{key: [39], ctrl: true, scope: scopeObj, handler: function (){app.key(1039);}},
{key: [38], ctrl: true, scope: scopeObj, handler: function (){app.key(1038);}},
{key: [40], ctrl: true, scope: scopeObj, handler: function (){app.key(1040);}},
{key: [3038], shift: true, ctrl: true, scope: scopeObj, handler: function (){app.key(3038);}},
{key: [3040], shift: true, ctrl: true, scope: scopeObj, handler: function (){app.key(3040);}},
{key: [3033], shift: true, ctrl: true, scope: scopeObj, handler: function (){app.key(3033);}},
{key: [3034], shift: true, ctrl: true, scope: scopeObj, handler: function (){app.key(3034);}},
{key: [111], scope: scopeObj, handler: function (){app.vQ();}}

];
	return keyMaps;
	};


