

Ext.ux.Iframe = Ext.extend( Ext.BoxComponent, {
	initComponent : function(){
		this.addEvents(
			"beforeload",
			"load"
		);
		
		Ext.ux.Iframe.superclass.initComponent.call(this);
	},
	print:function(){
		if( window.frames[this.id] ) {
			window.frames[this.id].focus();
			window.frames[this.id].print();
		}
	},
	render : function(container, position){
		if( Ext.isIE ) var iframe = document.createElement('<iframe id="'+this.id+'" name="'+this.id+'" >');
		else {
			var iframe = document.createElement("iframe");
			iframe.id = iframe.name = this.id;
		}
		
		iframe.frameBorder = iframe.frameSpacing = iframe.border = 0;
		iframe.allowTransparency = true;
		
		var classes = [];
		if( this['baseCls'] ) classes.push(this['baseCls']);
		if( this.cls ) classes.push(this.cls);
		iframe.className = classes.join(" ");
		
		if (iframe.addEventListener) iframe.addEventListener( "load", this.onload.createDelegate(this), false ); 
		else if (iframe.attachEvent) iframe.attachEvent( "onload", this.onload.createDelegate(this) ); 
		
		this.el = Ext.get(iframe);
		if( this.style ) this.el.applyStyles( this.style );
		
        Ext.ux.Iframe.superclass.render.apply(this, arguments);
	},
    onRender : function(ct, position){
		//chrome sets this.src to about:blank somehow in onRender : ct.dom.insertBefore(this.el.dom, position);
        Ext.ux.Iframe.superclass.onRender.apply(this, arguments);
		
		if( this.autoLoad ) this.load( this.autoLoad );
		else if( this.url ) this.load( {url:this.url} );
		else if( this.src && ! Ext.isChrome ) this.load( {url:this.src} );
	},
	clear:function() {
		this.lastOptions = {};
		this.src = "";
		if( this.el ) this.el.dom.src = "";
	},
	load : function(config) {
		switch( typeof config ) {
			case "boolean": 
			case "undefined": config = {}; break;
			case "string": config = {url:config}; break;
		}
		
		if( ! config.url ) config.url = this.url || this.src;
		if( this.baseParams ) config.params = Ext.apply( config.params || {}, this.baseParams );
		
		if( this.fireEvent("beforeload", config) === false ) return; 
		
		if( window.frames[this.id] && config.params ) {
			var form = document.createElement('form');
			form.method = config.method || "post";
			form.style.display = "none";
			form.target = this.id;
			
			this.src = form.action = config.url;
			for( var i in config.params ) {
				var hidden = document.createElement('input');
				hidden.name = i;
				hidden.value = config.params[i];
				form.appendChild( hidden );
			}
		
			document.body.appendChild(form);
			form.submit();
			document.body.removeChild(form);
		} else {
			this.src = config.url + ( config.url.indexOf("?") == -1 ?"?":"&") + Ext.urlEncode(config.params);
			if( this.rendered ) this.el.dom.src = this.src;
		}
			
		this.lastOptions = config;
	},
	onload : function(e) {
		if( this.updateSrc !== false ) {
			try{ this.src = this.getWindow().location.href; } catch(e) { this.src = this.lastOptions ? this.lastOptions.url : this.url; }
		}
		this.fireEvent("load",this, this.lastOptions, e );
	},
	getWindow : function() {
		return this.el.dom.contentWindow;
	},
	getDocument : function() {
		var win = this.getWindow();
		return win.contentDocument || win.document;
	}
});
Ext.reg('iframe', Ext.ux.Iframe);
function ie_flash_fix() {
	__flash__removeCallback = function () {};
}

if(typeof(get_win_dimensions)=="undefined")	{		// There's a good chance this function wont exist yet - recreate it exactly as it is in component_actions.js if so
	function get_win_dimensions()	{
		var x = 0;
		var y = 0;
		if(window.innerWidth != null)	{
			x = window.innerWidth;
		}
		else if(document.documentElement && document.documentElement.clientWidth)	{
			x = document.documentElement.clientWidth;
		}
		else if(document.body != null)	{
			x = document.body.clientWidth;
		}
		
		if(window.innerHeight != null)	{
			y = window.innerHeight;
		}
		else if(document.documentElement && document.documentElement.clientHeight)	{
			y = document.documentElement.clientHeight;
		}
		else if(document.body != null)	{
			y = document.body.clientHeight;
		}
		
		return {"x":x, "y":y};
	}
}


var win_box = get_win_dimensions();
simplePanelViewPage = {
	window: new Ext.Window({
		title:"Loading page...",
		autoScroll:true,
		width: (win_box.x*.85),
		height: (win_box.y*.85),
		html:"<iframe style='border:none;width:100%;height:100%;background-color:#fff' id='viewPageIframe'>Loading...</iframe>",
		modal:true,
		closeAction:'hide',
		baseCls: "simplePanel-window x-window",
		listeners:	{
			resize: function(win, w, h)	{
				Ext.getDom("viewPageIframe").style.height = win.getInnerHeight()
			}
		}
	}),
	open: function(link) {
		var win_box = get_win_dimensions();
		this.window.setSize((win_box.x*.85), (win_box.y*.85));
		this.window.setTitle(link.innerHTML)
		this.window.show();
		this.window.center();
		Ext.getDom('viewPageIframe').src = link.href;
		return false;
	}
};
Ext.onReady(
	function() {
		Ext.QuickTips.init();
		window.onbeforeunload = ie_flash_fix;
	}
);
 Ext.layout.FlatMenuLayout = Ext.extend(Ext.layout.MenuLayout, {
	currentColumn:null,
	columns:null,
    renderItem : function(c, position, target){
		if (!this.columnTpl) {
			this.columnTpl = Ext.layout.FlatMenuLayout.prototype.columnTpl = 
				new Ext.XTemplate('<li style="float:left" id="{columnId}" class="flatmenu-column"></li>')
		}
        if (!this.itemTpl) {
            this.itemTpl = Ext.layout.FlatMenuLayout.prototype.itemTpl = new Ext.XTemplate(
                '<li id="{itemId}" style="{margin}" class="flatmenu {itemCls}">',
                    '<tpl if="needsIcon">',
                    '</tpl>',
                '</li>'
            );
        }
        if(c && !c.rendered){
			if (c.startCol || this.currentColumn==null) {
				if(this.columns === null)	{
					this.columns = [];
				}
				var li = this.columnTpl.append(target,{columnId: this.id + '-flatmenu-col-' + this.columns.length},true)
				this.currentColumn = new Ext.Element(document.createElement('UL'))
				li.appendChild(this.currentColumn)
				this.columns.push(this.currentColumn)
			}
            var a = this.getItemArgs(c);

			var el = this.itemTpl.append(this.currentColumn, a, true)
            c.positionEl = el
            c.positionEl.menuItemId = c.itemId || c.id;
            c.render(el);
        }
    },
    doAutoSize : function(){
        var ct = this.container, w = ct.width;
        if(ct.floating){
            if(w){
                ct.setWidth(w);
            }else {
				//calculate the width for ie
				var width = 0
				for (var i =0; i< this.columns.length; i++) {
					width += this.columns[i].getWidth()+ 2
				}
				ct.setWidth(width)
            }
        }
    }
});
Ext.Container.LAYOUTS['flatmenu'] = Ext.layout.FlatMenuLayout;

Ext.menu.FlatItem = function(config){
    Ext.menu.FlatItem.superclass.constructor.call(this, config);
};
Ext.extend(Ext.menu.FlatItem, Ext.menu.BaseItem, {
    itemCls : 'x-menu-item',
    canActivate : true,
    showDelay: 200,
    hideDelay: 200,
    ctype: 'Ext.menu.FlatItem',
    onRender : function(container, position){
        if (!this.itemTpl) {
            this.itemTpl = Ext.menu.FlatItem.prototype.itemTpl = new Ext.XTemplate(
                '<h1 class="flatmenu-header"><a id="{id}" class="flatmenu-no-icon {cls}" hidefocus="true" unselectable="on" href="{href}"',
                    '<tpl if="hrefTarget">',
                        ' target="{hrefTarget}"',
                    '</tpl>',
                     '<span class="x-menu-item-text">{text}</span>',
                 '</a></h1>'
             );
            this.iconItemTpl = Ext.menu.FlatItem.prototype.iconItemTpl = new Ext.XTemplate(
                '<h1 class="flatmenu-header"><a id="{id}" class="{cls}" hidefocus="true" unselectable="on" href="{href}"',
                    '<tpl if="hrefTarget">',
                        ' target="{hrefTarget}"',
                    '</tpl>',
                     '<img src="{icon}" class="x-menu-item-icon {iconCls}"/>',
                     '<span class="x-menu-item-text">{text}</span>',
                 '</a></h1>'
             );
        }
        var a = this.getTemplateArgs();
		var tpl = this.itemTpl
		if (this.iconCls) tpl = this.iconItemTpl
        this.el = position ? tpl.insertBefore(position, a, true) : tpl.append(container, a, true);
        this.iconEl = this.el.child('img.x-menu-item-icon');
        this.textEl = this.el.child('.x-menu-item-text');
		//Render this.menu items
		if (this.menu) {
			var ul = new Ext.Element(document.createElement('UL'))
			ul.addClass('flatmenu-children')
			for(var i =0; i < this.menu.length; i++) {
				var config = this.menu[i]
				if (typeof config == 'undefined') continue;
			   if(!config.isXType){
					if(!config.xtype && Ext.isBoolean(config.checked)){
						var item = new Ext.menu.CheckItem(config)
					}
					else {
						var item = Ext.create(config,'menuitem');
					}
				this.renderItem(item,false,ul)
			   }
			}
			container.addClass('flatmenu-container')
			container.appendChild(ul)
		}


        //Ext.menu.FlatItem.superclass.onRender.call(this, container, position);
    },
    getItemArgs: function(c) {
        var isMenuItem = c instanceof Ext.menu.Item;
        return {
            isMenuItem: isMenuItem,
            needsIcon: !isMenuItem && (c.icon || c.iconCls),
            icon: c.icon || Ext.BLANK_IMAGE_URL,
            iconCls: 'x-menu-item-icon ' + (c.iconCls || ''),
            itemId: 'x-menu-el-' + c.id,
            itemCls: 'x-menu-list-item ' + (this.extraCls || '')
        };
    },
    renderItem : function(c, position, target){
        if (!this.childTpl) {
            this.childTpl = Ext.menu.FlatItem.prototype.childTpl = new Ext.XTemplate(
                '<li id="{itemId}" class="flatmenu {itemCls}">',
                    '<tpl if="needsIcon">',
                        '<img src="{icon}" class="{iconCls}"/>',
                    '</tpl>',
                '</li>'
            );
        }

        if(c && !c.rendered){
            if(Ext.isNumber(position)){
                position = target.dom.childNodes[position];
            }
            var a = this.getItemArgs(c);
            c.render(c.positionEl = position ?
                this.childTpl.insertBefore(position, a, true) :
                this.childTpl.append(target, a, true));

            c.positionEl.menuItemId = c.itemId || c.id;
			c.parentMenu = this.ownerCt

            if (!a.isMenuItem && a.needsIcon) {
                c.positionEl.addClass('x-menu-list-item-indent');
            }
        }else if(c && !this.isValidParent(c, target)){
            if(Ext.isNumber(position)){
                position = target.dom.childNodes[position];
            }
            target.dom.insertBefore(c.getActionEl().dom, position || null);
        }
    },
    getTemplateArgs: function() {
        return {
            id: this.id,
            cls: this.itemCls + (this.cls ?  ' ' + this.cls : ''),
            href: this.href || '#',
            hrefTarget: this.hrefTarget,
            icon: this.icon || Ext.BLANK_IMAGE_URL,
            iconCls: this.iconCls || '',
            text: this.itemText||this.text||'&#160;'
        };
    },
    setText : function(text){
        this.text = text||'&#160;';
        if(this.rendered){
            this.textEl.update(this.text);
            this.parentMenu.layout.doAutoSize();
        }
    },
    setIconClass : function(cls){
        var oldCls = this.iconCls;
        this.iconCls = cls;
        if(this.rendered){
            this.iconEl.replaceClass(oldCls, this.iconCls);
        }
    },
    beforeDestroy: function(){
        if (this.menu && this.rendered && this.menu.destory){
            this.menu.destroy();
        }
        Ext.menu.FlatItem.superclass.beforeDestroy.call(this);
    },
    handleClick : function(e){
        if(!this.href){ // if no link defined, stop the event automatically
            e.stopEvent();
        }
        Ext.menu.FlatItem.superclass.handleClick.apply(this, arguments);
    },
    activate : function(autoExpand){
		return false;
        if(Ext.menu.FlatItem.superclass.activate.apply(this, arguments)){
            this.focus();
            if(autoExpand){
                this.expandMenu();
            }
        }
        return true;
    },
    shouldDeactivate : function(e){
        return true;
    },
    deactivate : function(){
        Ext.menu.FlatItem.superclass.deactivate.apply(this, arguments);
        this.hideMenu();
    },
    expandMenu : function(autoActivate){
    },
    deferExpand : function(autoActivate){
    },
    hideMenu : function(){
    },
    deferHide : function(){
    }
});
Ext.reg('flatmenuitem', Ext.menu.FlatItem);

		Ext.onReady(function()	{
			
			new Ext.Toolbar({
				id:"ext-menu-1-18_toolbar",
				items:[{
				xtype:'button',
				text:'About',
				url:'',
				target:'',
				iconCls:'',
				listeners:{mouseover:contentmExtMenuButtonMouseOver, click:contentmExtMenuLinkHandler},menu:{
						xtype:'menu',
						cls:'contentm-ext-menu ext-menu-1-18-menu',
						
						layout:'flatmenu',
						items:[{
									xtype:'flatmenuitem',
									text:'About Us',
									
									startCol:0,
									menu:[{
				text:'What We Do',
				url:window.BASE_PATH+'corp/About/About_Us/What_We_Do',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Who We Are',
				url:window.BASE_PATH+'corp/About/About_Us/Who_We_Are',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Who We Help',
				url:window.BASE_PATH+'corp/About/About_Us/Who_We_Help',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Research & Development',
				url:window.BASE_PATH+'corp/About/About_Us/Research_Development',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'News and Events',
				url:window.BASE_PATH+'corp/About/About_Us/News_and_Events',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]},{
									xtype:'flatmenuitem',
									text:'Connect with Us',
									
									startCol:1,
									menu:[{
				text:'Social Media',
				url:window.BASE_PATH+'SMASHUP',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Contact Us',
				url:window.BASE_PATH+'corp/About/Connect_with_Us/Contact_Us',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]}]}},{
				xtype:'button',
				text:'Consulting',
				url:'',
				target:'_self',
				iconCls:'',
				listeners:{mouseover:contentmExtMenuButtonMouseOver, click:contentmExtMenuLinkHandler},menu:[new Ext.menu.Item({
				text:'Content Management',
				url:window.BASE_PATH+'corp/Consulting/Content_Management',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Enterprise Application Integration',
				url:window.BASE_PATH+'corp/Consulting/Enterprise_Application_Integration',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Social Media Strategy',
				url:window.BASE_PATH+'corp/Consulting/Social_Media_Strategy',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Analytics and Dashboards',
				url:window.BASE_PATH+'corp/Consulting/Analytics_and_Dashboards',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}})]},{
				xtype:'button',
				text:'Products',
				url:'',
				target:'',
				iconCls:'',
				listeners:{mouseover:contentmExtMenuButtonMouseOver, click:contentmExtMenuLinkHandler},menu:{
						xtype:'menu',
						cls:'contentm-ext-menu ext-menu-1-18-menu',
						
						layout:'flatmenu',
						items:[{
									xtype:'flatmenuitem',
									text:'K-12 School Districts',
									
									startCol:0,
									menu:[{
				text:'Applicant Tracking',
				url:'http://www.schooleffects.com/products/applicanttracking/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Calendaring',
				url:window.BASE_PATH+'gen/corp_generated_pages/NetKalendars_Home_m306.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Content Management',
				url:'http://www.contentm.schooleffects.com/',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'eAssessments',
				url:'http://www.schooleffects.com/products/examn/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'eCurriculum',
				url:'http://www.schooleffects.com/products/ecurriculum/home ',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Forms and Surveys',
				url:window.BASE_PATH+'gen/corp_generated_pages/FormXen_Home_m257.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Online Lesson Planning',
				url:'http://www.schooleffects.com/products/thelessonplanbook/home ',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Scheduling',
				url:window.BASE_PATH+'gen/corp_generated_pages/SchedCheK_Home_m256.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'SPED / IEP',
				url:'http://www.schooleffects.com/products/wiseiep/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Staff Development',
				url:'http://www.schooleffects.com/products/inservice/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Student Information System',
				url:window.BASE_PATH+'contentm/blueprints/blueprint_display.php?bp_form_id=26&blueprint_id=3&product_id=1&sid=62',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]},{
									xtype:'flatmenuitem',
									text:'Higher Education',
									
									startCol:1,
									menu:[{
				text:'Applicant Tracking',
				url:window.BASE_PATH+'gen/corp_generated_pages/Applicant_Tracking_Home_m255.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Calendaring',
				url:window.BASE_PATH+'gen/corp_generated_pages/NetKalendars_Home_m306.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Content Management',
				url:window.BASE_PATH+'corp/Products/Higher_Education/Content_Management',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'eAssessments',
				url:window.BASE_PATH+'gen/corp_generated_pages/ExamN_Home_m252.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Forms & Surveys',
				url:window.BASE_PATH+'gen/corp_generated_pages/FormXen_Home_m257.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Scheduling',
				url:window.BASE_PATH+'gen/corp_generated_pages/SchedCheK_Home_m256.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]},{
									xtype:'flatmenuitem',
									text:'Business',
									
									
									menu:[{
				text:'Products',
				url:'',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[new Ext.menu.Item({
				text:'Applicant Tracking',
				url:window.BASE_PATH+'gen/corp_generated_pages/Applicant_Tracking_Home_m255.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Calendaring',
				url:window.BASE_PATH+'gen/corp_generated_pages/NetKalendars_Home_m306.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Content Management',
				url:window.BASE_PATH+'gen/corp_generated_pages/ContentM_Home_m251.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Forms and Surveys',
				url:window.BASE_PATH+'gen/corp_generated_pages/FormXen_Home_m257.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'HIPAA',
				url:window.BASE_PATH+'gen/corp_generated_pages/HIPAA_Home_m277.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}})]}},{
				text:'Industries Served',
				url:'',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[new Ext.menu.Item({
				text:'Construction, Engineering and Architecture',
				url:window.BASE_PATH+'corp/Products/Business/Industries_Served/Construction_Engineering_and_Architecture',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Sports and Athletics',
				url:window.BASE_PATH+'corp/Products/Business/Industries_Served/Sports_and_Athletics',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Freight and Transportation',
				url:window.BASE_PATH+'corp/Products/Business/Industries_Served/Freight_and_Transportation',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Resellers and Distributors',
				url:window.BASE_PATH+'gen/corp_generated_pages/Resellers_and_Distributors_m99.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Real Estate',
				url:window.BASE_PATH+'corp/Products/Business/Industries_Served/Real_Estate',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Printing and Publishing',
				url:window.BASE_PATH+'gen/corp_generated_pages/Printing_and_Publishing_m100.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Manufacturing',
				url:window.BASE_PATH+'gen/corp_generated_pages/Manufacturing_m727.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Telecommunications',
				url:window.BASE_PATH+'gen/corp_generated_pages/Telecommunications_m121.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Auction Management',
				url:window.BASE_PATH+'gen/corp_generated_pages/Auction_Management_m187.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}})]}}]},{
									xtype:'flatmenuitem',
									text:'By Sector',
									
									startCol:2,
									menu:[{
				text:'K-12 School Districts',
				url:'http://www.allofe.com/contentm/easy_pages/easy_page_view.php?sid=92&page_id=196',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Higher Education',
				url:'http://www.allofe.com/highered',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Business',
				url:window.BASE_PATH+'corp/Products/By_Sector/Business',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]}]}},{
				xtype:'button',
				text:'Careers',
				url:'',
				target:'',
				iconCls:'',
				listeners:{mouseover:contentmExtMenuButtonMouseOver, click:contentmExtMenuLinkHandler},menu:[new Ext.menu.Item({
				text:'Home',
				url:window.BASE_PATH+'corp/Careers/Home',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Benefits ',
				url:window.BASE_PATH+'corp/Careers/Benefits',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Philosophy',
				url:window.BASE_PATH+'corp/Careers/Philosophy',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Around AllofE',
				url:window.BASE_PATH+'corp/Careers/Around_AllofE',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}})]},{
				xtype:'button',
				text:'Clients',
				url:'',
				target:'',
				iconCls:'',
				listeners:{mouseover:contentmExtMenuButtonMouseOver, click:contentmExtMenuLinkHandler},menu:[new Ext.menu.Item({
				text:'Clients Home',
				url:window.BASE_PATH+'corp/Clients/Clients_Home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Focus',
				url:window.BASE_PATH+'corp/Clients/Focus',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Successes',
				url:window.BASE_PATH+'corp/Clients/Successes',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Client List',
				url:window.BASE_PATH+'corp/Clients/Client_List',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Current Projects',
				url:window.BASE_PATH+'corp/Clients/Current_Projects',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}),new Ext.menu.Item({
				text:'Support',
				url:window.BASE_PATH+'corp/Clients/Support',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}})]},{
				xtype:'button',
				text:'Resources',
				url:'',
				target:'_self',
				iconCls:'',
				listeners:{mouseover:contentmExtMenuButtonMouseOver, click:contentmExtMenuLinkHandler},menu:{
						xtype:'menu',
						cls:'contentm-ext-menu ext-menu-1-18-menu',
						
						layout:'flatmenu',
						items:[{
									xtype:'flatmenuitem',
									text:'K-12 Product Websites',
									
									startCol:0,
									menu:[{
				text:'Applicant Tracking',
				url:'http://www.schooleffects.com/products/applicanttracking/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'ContentM',
				url:'http://www.schooleffects.com/products/contentm/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'eCurriculum',
				url:'http://www.schooleffects.com/products/ecurriculum/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'ExamN',
				url:'http://www.schooleffects.com/products/examn/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Inservice',
				url:'http://www.schooleffects.com/products/inservice/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'TheLessonPlanBook',
				url:'http://www.schooleffects.com/products/thelessonplanbook/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'WISE IEP',
				url:'http://www.schooleffects.com/products/wiseiep/home',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]},{
									xtype:'flatmenuitem',
									text:'Solution Websites',
									
									startCol:1,
									menu:[{
				text:'SchoolEffects',
				url:'http://www.schooleffects.com/gen/k12_generated_pages/ContentM_m49.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Higher Education CMS',
				url:'http://www.higheredcms.info',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'SMASHUP CMS',
				url:'http://www.allofe.com/smashupcms',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'AllofE SMASHUP',
				url:'http://www.allofe.com/smashup',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Business EAI',
				url:'http://www.allofe.com/gen/corp_generated_pages/Business_m268.html',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'ContentM for Educators',
				url:'http://educators.allofe.com/',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]},{
									xtype:'flatmenuitem',
									text:'Product',
									
									startCol:2,
									menu:[{
				text:'Resources by Product',
				url:window.BASE_PATH+'corp/Resources/Product/Resources_by_Product',
				target:'',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]},{
									xtype:'flatmenuitem',
									text:'Presentations',
									
									
									menu:[{
				text:'Webinars',
				url:window.BASE_PATH+'corp/Resources/Presentations/Webinars',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}},{
				text:'Prezis',
				url:window.BASE_PATH+'corp/Resources/Presentations/Prezis',
				target:'_self',
				iconCls:'',
				handler:contentmExtMenuLinkHandler,menu:{cls:'contentm-ext-menu ext-menu-1-18-menu', items:[]}}]}]}}],
				renderTo:"ext-menu-1-18"
			});
			
		});
	
		function contentmExtMenuButtonMouseOver(inButton)	{
			if(typeof(inButton.menu) != "object")	{ // If there is no menu
				return true;
			}
			
						
			inButton.menu.show(inButton.getEl()); // Show the menu
		}

					
			function contentmExtMenuLinkHandler(inComponent)	{
				if(inComponent.url == "")	{
					return true;
				}
				
				switch(inComponent.target)	{
					case "_blank": // Open in a new window
						window.open(inComponent.url);
						break;
					default:
						location.href = inComponent.url;
						if(typeof(inComponent.menu) != "undefined")	{
							inComponent.menu.hide();
						}
						break;
				}
			}
			
			