function PCSMenuItem(){
	this.Menu=null;
	this.Index=null;
	this.GroupIndex=null;
	this.Group=null;
	this.Text='';
	this.MenuId='';
	this.SubGroupId='';
	this.LeftImageUrl='';
	this.RightImageUrl='';
	this.CloseOnSelect=true;
	this.ClientSideOnClick='';
	this.Seperator=false;
	this.ShowLeftArrow=false;
	this.ShowRightArrow=false;
	this.LeftImageWidth='15px';
	this.LeftImageHeight='15px';
	this.RightImageWidth='15px';
	this.RightImageHeight='15px';
	this.Visible=true;
	this.Props=new Array();
	this.Props = ['MenuId','SubGroupId','CloseOnSelect','Visible','LeftImageWidth','LeftImageHeight',
		'RightImageWidth','RightImageHeight','ClientSideOnClick','GroupId','Seperator',
		'ShowRightArrow','ShowLeftArrow','GroupIndex','LeftImageUrl','RightImageUrl','Text'];
}
PCSMenuItem.prototype.Init=function (props){
	for(var i=0;i<props.length;i++){
		if(typeof(props[i]) != 'undefined') this[this.Props[i]] = props[i];
	}
	this.Group=this.Menu.GetGroup(this.GroupId);
    if(!this.Group) return;
    this.Index=this.Group.Items.length;
    this.Group.Items[this.Group.Items.length]=this;
    
    if(this.LeftImageUrl!=''){
		this.LeftImageUrl = this.Menu.BaseImagePath+this.LeftImageUrl;
		var img = new Image();
		img.src = this.LeftImageUrl;
		this.Menu.MenuImages[this.Menu.MenuImages.length] = img;
	}
	if(this.RightImageUrl!=''){
		this.RightImageUrl=this.Menu.BaseImagePath + this.RightImageUrl;
		var img = new Image();
		img.src = this.RightImageUrl;
		this.Menu.MenuImages[this.Menu.MenuImages.length] = img;
	}
	
}
PCSMenuItem.prototype.Click=function(){
	if(this.SubGroupId!=''){
		var SubGroup = this.Menu.GetGroup(this.SubGroupId);
		this.Group.SubGroup = SubGroup;
		SubGroup.ParentGroup = this.Group;
		this.Menu.Show(this.SubGroupId);
	}else{
		if(this.CloseOnSelect){
			this.Group.Active=false;
			this.Group.Visible=false;
			this.Group.Hide();
			this.Menu.HideAll();
		}
		if(this.ClientSideOnClick != '') eval(this.ClientSideOnClick);
	}
}