﻿iCM.DefaultPanel = function() {
	var currentLinkId = "";
	return {
		Initialise: function(selectedlinkId) {
			currentLinkId = selectedlinkId;
		},
		ChangePanel: function(linkId, pane) {
			var req = iCM.NewRequest("page_PageContentHolder_template_Panel-contentpane");
			req.arguments.panelid = pane;
			iCM.Get(req, null, null);

			Ext.get(currentLinkId).removeClass("selected");
			Ext.get(linkId).addClass("selected");
			
			currentLinkId = linkId;
		}
	};
}();
