/*** Zen Module: Kzen_Component_Link ***/

self._zenClassIdx['http://www.kanope.org/kZen/link'] = 'Kzen_Component_Link_link';
self.Kzen_Component_Link_link = function(index,id) {
	if (index>=0) {Kzen_Component_Link_link__init(this,index,id);}
}

self.Kzen_Component_Link_link__init = function(o,index,id) {
	('undefined' == typeof _ZEN_Component_link__init) ?zenMaster._ZEN_Component_link__init(o,index,id):_ZEN_Component_link__init(o,index,id);
	o.kzTheme = '/csp/kzen/themes/default';
	o.kzType = '';
	o.kzVersion = '0.1';
	o.linkClass = '';
	o.onclick = '';
}
function Kzen_Component_Link_link_serialize(set,s)
{
	var o = this;s[0]='225580490';s[1]=o.index;s[2]=o.id;s[3]=o.name;s[4]=set.addObject(o.parent,'parent');s[5]=set.addObject(o.composite,'composite');s[6]=o.align;s[7]=o.aux;s[8]=o.caption;s[9]=o.containerStyle;s[10]=(o.disabled?1:0);s[11]=(o.dragEnabled?1:0);s[12]=(o.dropEnabled?1:0);s[13]=(o.dynamic?1:0);s[14]=o.enclosingClass;s[15]=o.enclosingStyle;s[16]=o.error;s[17]=o.height;s[18]=(o.hidden?1:0);s[19]=o.hint;s[20]=o.hintClass;s[21]=o.hintStyle;s[22]=o.href;s[23]=o.kzTheme;s[24]=o.kzType;s[25]=o.kzVersion;s[26]=o.label;s[27]=o.labelClass;s[28]=o.labelStyle;s[29]=o.linkClass;s[30]=o.onafterdrag;s[31]=o.onbeforedrag;s[32]=o.onclick;s[33]=o.ondrag;s[34]=o.ondrop;s[35]=o.onhide;s[36]=o.onrefresh;s[37]=o.onshow;s[38]=o.onupdate;s[39]=o.overlayMode;s[40]=o.renderFlag;s[41]=(o.showLabel?1:0);s[42]=o.slice;s[43]=o.style;s[44]=o.target;s[45]=o.title;s[46]=o.tuple;s[47]=o.valign;s[48]=(o.visible?1:0);s[49]=o.width;
}
function Kzen_Component_Link_link_getSettings(s)
{
	s['name'] = 'string';
	s['kzTheme'] = 'string';
	s['kzType'] = 'string';
	s['kzVersion'] = 'string';
	s['linkClass'] = 'cssClass';
	s['onclick'] = 'eventHandler';
	this.invokeSuper('getSettings',arguments);
}

self.Kzen_Component_Link_link_ReallyRefreshContents = function() {
	zenInstanceMethod(this,'ReallyRefreshContents','','',arguments);
}
self.Kzen_Component_Link_link__Loader = function() {
	zenLoadClass('_ZEN_Component_link');
	Kzen_Component_Link_link.prototype = zenCreate('_ZEN_Component_link',-1);
	var p = Kzen_Component_Link_link.prototype;
	if (null==p) {return;}
	p.constructor = Kzen_Component_Link_link;
	p.superClass = ('undefined' == typeof _ZEN_Component_link) ? zenMaster._ZEN_Component_link.prototype:_ZEN_Component_link.prototype;
	p.__ZENcomponent = true;
	p._serverClass = 'Kzen.Component.Link.link';
	p._type = 'link';
	p.serialize = Kzen_Component_Link_link_serialize;
	p.getSettings = Kzen_Component_Link_link_getSettings;
	p.ReallyRefreshContents = Kzen_Component_Link_link_ReallyRefreshContents;
}

self._zenClassIdx['http://www.kanope.org/kZen/imageLink'] = 'Kzen_Component_Link_imageLink';
self.Kzen_Component_Link_imageLink = function(index,id) {
	if (index>=0) {Kzen_Component_Link_imageLink__init(this,index,id);}
}

self.Kzen_Component_Link_imageLink__init = function(o,index,id) {
	('undefined' == typeof Kzen_Component_Link_link__init) ?zenMaster.Kzen_Component_Link_link__init(o,index,id):Kzen_Component_Link_link__init(o,index,id);
	o.controlClass = '';
	o.controlStyle = '';
	o.extraClass = '';
	o.kzTheme = '/csp/kzen/themes/default';
	o.kzType = '';
	o.kzVersion = '0.1';
}
function Kzen_Component_Link_imageLink_serialize(set,s)
{
	var o = this;s[0]='2911295897';s[1]=o.index;s[2]=o.id;s[3]=o.name;s[4]=set.addObject(o.parent,'parent');s[5]=set.addObject(o.composite,'composite');s[6]=o.align;s[7]=o.aux;s[8]=o.caption;s[9]=o.containerStyle;s[10]=o.controlClass;s[11]=o.controlStyle;s[12]=(o.disabled?1:0);s[13]=(o.dragEnabled?1:0);s[14]=(o.dropEnabled?1:0);s[15]=(o.dynamic?1:0);s[16]=o.enclosingClass;s[17]=o.enclosingStyle;s[18]=o.error;s[19]=o.extraClass;s[20]=o.height;s[21]=(o.hidden?1:0);s[22]=o.hint;s[23]=o.hintClass;s[24]=o.hintStyle;s[25]=o.href;s[26]=o.kzTheme;s[27]=o.kzType;s[28]=o.kzVersion;s[29]=o.label;s[30]=o.labelClass;s[31]=o.labelStyle;s[32]=o.linkClass;s[33]=o.onafterdrag;s[34]=o.onbeforedrag;s[35]=o.onclick;s[36]=o.ondrag;s[37]=o.ondrop;s[38]=o.onhide;s[39]=o.onrefresh;s[40]=o.onshow;s[41]=o.onupdate;s[42]=o.overlayMode;s[43]=o.renderFlag;s[44]=(o.showLabel?1:0);s[45]=o.slice;s[46]=o.style;s[47]=o.target;s[48]=o.title;s[49]=o.tuple;s[50]=o.valign;s[51]=(o.visible?1:0);s[52]=o.width;
}
function Kzen_Component_Link_imageLink_getSettings(s)
{
	s['name'] = 'string';
	s['controlClass'] = 'cssClass';
	s['controlStyle'] = 'style';
	s['extraClass'] = 'string';
	s['kzTheme'] = 'string';
	s['kzType'] = 'string';
	s['kzVersion'] = 'string';
	this.invokeSuper('getSettings',arguments);
}

self.Kzen_Component_Link_imageLink_setProperty = function(property,value,value2) {
var a = this.findElement('a');
switch(property) {
case 'caption':
this.caption = value;
if (a) {
a.innerHTML = value;
}
break;
case 'title':
this.title = value;
if (a) {
a.title = value;
}
break;
case 'href':
this.href = value;
if (a && !this.diabled) {
a.href = value;
}
break;
case 'style':
this.style = value;
if (a) {
a.style.cssText = value;
}
break;
case 'disabled':
value = value ? true : false;
if (this.disabled != value) {
this.disabled = value;
if(this.disabled)
html = '<a class="'+this.controlClass+' '+this.extraClass+'-disable'+'" onclick="return false;" href="'+this.href+'" id="'+this.makeId('a')+'" '+zenAttr('title',this.title)+' '+zenAttr('style',this.style)+'>'+zenEscapeXML(this.caption)+'</a>';
else
html = '<a class="'+this.controlClass+'" onclick="return zenPage.getComponent('+this.index+').onClickHandler();" href="'+this.href+'" id="'+this.makeId('a')+'" '+zenAttr('title',this.title)+' '+zenAttr('style',this.style)+'>'+zenEscapeXML(this.caption)+'</a>';
this.getEnclosingDiv().innerHTML = html;
}
break;
default:
return this.invokeSuper('setProperty',arguments);
break;
}
return true;
}

self.Kzen_Component_Link_imageLink_ReallyRefreshContents = function() {
	zenInstanceMethod(this,'ReallyRefreshContents','','',arguments);
}
self.Kzen_Component_Link_imageLink__Loader = function() {
	zenLoadClass('Kzen_Component_Link_link');
	Kzen_Component_Link_imageLink.prototype = zenCreate('Kzen_Component_Link_link',-1);
	var p = Kzen_Component_Link_imageLink.prototype;
	if (null==p) {return;}
	p.constructor = Kzen_Component_Link_imageLink;
	p.superClass = ('undefined' == typeof Kzen_Component_Link_link) ? zenMaster.Kzen_Component_Link_link.prototype:Kzen_Component_Link_link.prototype;
	p.__ZENcomponent = true;
	p._serverClass = 'Kzen.Component.Link.imageLink';
	p._type = 'imageLink';
	p.serialize = Kzen_Component_Link_imageLink_serialize;
	p.getSettings = Kzen_Component_Link_imageLink_getSettings;
	p.ReallyRefreshContents = Kzen_Component_Link_imageLink_ReallyRefreshContents;
	p.setProperty = Kzen_Component_Link_imageLink_setProperty;
}
/* EOF */
