﻿/*!
 * Ext JS Library 3.0.0
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
 
/* <!> uses the show() and hide() functions defined inside the mt_functions.js file */
 
var MX_TITLE_PROMO = Ext.extend(Ext.util.Observable, {
    constructor: function(config){
        this.addEvents('finished'); // specify the events we're going to fire
        MX_TITLE_PROMO.constructor.call(this, config);
    },
	
    create: function(pid, i, value){
		var v = value.split('|||',3);

		this.panel = new Ext.Panel({ 
			id: 'mt_promo_block_mx_title-'+i,
			cls: 'mt_promo_block_mx_title',
			hideLabel: true,
			layout:'form',
			width:'auto',
			html:	'<div class="mt_promo_block_mx_title_field">'+
					'<div onmouseover="show(this);" onmouseout="hide(this);" onclick="window.location.href=\'http://'+window.location.hostname+
						'/index.php?id='+v[1]+'&idObject='+v[2]+'\';">'+
						v[0]+
					'</div>'+
					'</div>'
		});
		
		this.fireEvent('finished', this.panel);
	}	
});