function JSW_IframeManager()
{
    this.enableDesignMode = function(iframeID)
    {
    // turns on designMode of specified iframe
    }
    this.disableDesignMode = function(iframeID)
    {
    // turns off desigMode of specified iframe
    }
    this.getDocument = function(iframeID)
    {
    // returns Iframe DocumentBody
    }
    this.executeCommand = function(iframeID, command, value)
    {
    // executes command on iframe
    }
    this.getContentWindow = function(iframeID)
    {
    // returns iframe content Window
    }
    this.getSelectionObject = function(iframeID)
    {
    // returns actual selection object
    }
    this.getSelectionContent = function(iframeID)
    {    
    // returns selected String
    }
    this.removeSelection = function(selectionObject)
    {
    // removes the current selection
    }
}
function JSW_IframeManagerMicrosoft()
{
    JSW_IframeManagerMicrosoft.prototype = new JSW_IframeManager();
    this.enableDesignMode = function(iframeID)
    {
        document.frames(iframeID).document.body.contentEditable = true;
        document.frames(iframeID).document.body.focus();
    }
    this.disableDesignMode = function(iframeID)
    {
        document.frames(iframeID).document.body.contentEditable = false;
    }
    this.getDocument = function(iframeID)
    {
        return(document.frames(iframeID).document);
    }
    this.executeCommand = function(iframeID, command, value)
    {
        try
        {
            document.frames(iframeID).document.execCommand(command, false, value);
        }
        catch(e) {}
    }
    this.getContentWindow = function(iframeID)
    {
        return(document.frames(iframeID).document);
    }
    this.getSelectionObject = function(iframeID)
    {
        return(this.getContentWindow(iframeID).selection);
    }
    this.getSelectionContent = function(iframeID)
    {    
        return(this.getSelectionObject(iframeID).text);
    }
    this.removeSelection = function(selectionObject)
    {    
        if(selectionObject)
            selectionObject.empty();
    }
}
function JSW_IframeManagerNetscape()
{
    JSW_IframeManagerNetscape.prototype = new JSW_IframeManager();
    this.enableDesignMode = function(iframeID)
    {
        document.getElementById(iframeID).contentWindow.document.designMode = "On";
        document.getElementById(iframeID).contentWindow.focus();
    }
    this.disableDesignMode = function(iframeID)
    {
        document.getElementById(iframeID).contentWindow.document.designMode = "Inherit";
    }
    this.getDocument = function(iframeID)
    {
        return(document.getElementById(iframeID).contentWindow.document);
    }
    this.executeCommand = function(iframeID, command, value)
    {
        try
        {
            document.getElementById(iframeID).contentWindow.document.execCommand(command, false, value);
        }
        catch(e) {}
    }    
    this.getContentWindow = function(iframeID)
    {
        return(document.getElementById(iframeID).contentWindow);
    }
    this.getSelectionObject = function(iframeID)
    {
        return(this.getContentWindow(iframeID).getSelection());
    }
    this.getSelectionContent = function(iframeID)
    {
        return(this.getSelectionObject(iframeID).toString());
    }
    this.removeSelection = function(selectionObject)
    {    
        selectionObject.collapse(selectionObject.anchorNode, 0);
    }    
}
