/*
var SwitchDialog = function(){
    
    // define some private variables
    var dialog, showBtn, cancelBtn;
    
    // return a public interface
    return {
        init : function(){
             showBtn = Ext.get('lnkSwitch');
             // attach to click event
             if(showBtn)
                showBtn.on('click', this.showDialog, this);
        },
       
        showDialog : function(e){
            if(!dialog){ // lazy initialize the dialog and only create it once
                dialog = new Ext.BasicDialog("switchdlg", { 
                        width:500,
                        height:175,
                        shadow:true,
                        resizable:false,
                        proxyDrag:true,
                        modal:true,
                        collapsible:false
                });
                dialog.addKeyListener(27, dialog.hide, dialog);
                Ext.get('switchdlg-btnCancel').on('click', dialog.hide, dialog);
            }
            dialog.show();
            //Ext.fly('<%= txtNewOther.ClientID %>').dom.focus();
            e.stopEvent();
        }
    };
}();

// using onDocumentReady instead of window.onload initializes the application
// when the DOM is ready, without waiting for images and other resources to load
Ext.onReady(SwitchDialog.init, SwitchDialog, true);        
        
              */  
              
function OpenHelpWindow(URL)
{
    day = new Date();
    id = 'ecusahelp'; //day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=420,left = 690,top = 325');");
}


function ToggleRemove(el, lbl, hidden)
{
    if(document.getElementById(el).innerText=='Remove')
    {
        document.getElementById(el).innerText = 'Undo';
        document.getElementById(lbl).style.textDecoration='line-through';
        document.getElementById(hidden).value = '1';   
    }
    else
    {
        document.getElementById(el).innerText = 'Remove';
        document.getElementById(lbl).style.textDecoration='';
        document.getElementById(hidden).value = '0';
    }
    
    

}


function fileBrowserCallBack(field_name, url, type, win) {
	var connector = "../../filemanager/browser.html?Connector=connectors/aspx/connector.aspx";
	var enableAutoTypeSelection = true;
	
	var cType;
	tinyfck_field = field_name;
	tinyfck = win;
	
	switch (type) {
		case "image":
			cType = "Image";
			break;
		case "flash":
			cType = "Flash";
			break;
		case "file":
			cType = "File";
			break;
	}
	
	if (enableAutoTypeSelection && cType) {
		connector += "&Type=" + cType;
	}
	
	window.open(connector, "tinyfck", "modal,width=600,height=400");
}