//Copyright Stellent Colorado Springs Inc. All rights reserved. var AXMLSOFC_NoneSpecified; var AXMLSOFC_LangEnglish; var AXMLSOFC_XML; var AXMLSOFC_JSOM; function _InitializeAcordeXMLSOFCSupportCode() { if(typeof(AXMLSOFC_NoneSpecified)=='undefined') { AXMLSOFC_NoneSpecified = 'NoneSpecified'; AXMLSOFC_LangEnglish = 'English'; AXMLSOFC_XML = 'XMLReturnFormat'; AXMLSOFC_JSOM = 'JavaScriptObjectModel'; } } function AcordeXMLSOFC(SOFCSource, strNamspaceName, strFunctionName) { _InitializeAcordeXMLSOFCSupportCode(); this._FunctionName = strFunctionName; this._NamespaceName = strNamspaceName; // obj.GetID() ----> this._SourceID // obj.GetClass() ----> this._CommandSource this._SourceID = SOFCSource; this._CallSource = AXMLSOFC_NoneSpecified; if(typeof(SOFCSource) == 'object') { if(typeof(SOFCSource.GetID) == 'function') { var strID = SOFCSource.GetID(); if(strID != 'undefined') { this._SourceID = strID; } } if(typeof(SOFCSource.GetClass) == 'function') { var strClass = SOFCSource.GetClass(); if(strClass != 'undefined') { this._CallSource = strClass; } } } function _SetCallSource(strCallSource) { this._CallSource = strCallSource; } this.SetCallSource = _SetCallSource; this._CallSubSource = AXMLSOFC_NoneSpecified; function _SetCallSubSource(strCallSubSource) { this._CallSubSource = strCallSubSource; } this.SetCallSubSource = _SetCallSubSource; this._ReturnFormat = AXMLSOFC_JSOM function _SetReturnFormat(strNewFormat) { if((strNewFormat == AXMLSOFC_JSOM)|| (strNewFormat == AXMLSOFC_XML)) { this._ReturnFormat = strNewFormat; } else { alert('AcordeXMLSOFC::SetReturnFormat for '+this._SourceID+' failed because an unrecognized format ('+strNewFormat+') was specified. The return format was not changed and is still \''+this._ReturnFormat+'\'.'); } } this.SetReturnFormat = _SetReturnFormat; function _GenerateXML() { function _TokenCDATA(strInitialString) { var stringValue = new String(strInitialString); return stringValue.replace(/]]>/g, "%CDAT%"); } if(this._ActivationID == AXMLSOFC_NoneSpecified) { alert('AcordeXMLSOFC::GenerateXML call for '+this._SourceID+' failed because the Activation ID was not set. The SOFC generated will be an empty string.'); return ''; } if(this._LanguageID == AXMLSOFC_NoneSpecified) { alert('AcordeXMLSOFC::GenerateXML call for '+this._SourceID+' failed because the Language ID was not set. The SOFC generated will be an empty string.'); return ''; } var xmlSOFC = ''; xmlSOFC += ''+_TokenCDATA(this._CallSource)+''; xmlSOFC += ''+_TokenCDATA(this._CallSubSource) +''; xmlSOFC += '' + _TokenCDATA(this._SourceID) + ''; xmlSOFC += '' + _TokenCDATA(this._FunctionName) + ''; xmlSOFC += '' + _TokenCDATA(this._NamespaceName) + ''; xmlSOFC += '' + _TokenCDATA(this._ReturnFormat) + ''; xmlSOFC += ''; var nCount = this.CallData.GetCount(); for(var i = 0; i < nCount; i++) { xmlSOFC += "<" + this.CallData.Item(i).Name + ">"; xmlSOFC += ""; xmlSOFC += "<" + "/" + this.CallData.Item(i).Name + ">"; } xmlSOFC += ''; xmlSOFC += ''; nCount = this.ActivationData.GetCount(); for(i = 0; i < nCount; i++) { xmlSOFC += "<" + this.ActivationData.Item(i).Name + "><" + "/" + this.ActivationData.Item(i).Name + ">"; } xmlSOFC += ''; xmlSOFC += ''; return xmlSOFC; } this.GenerateXML = _GenerateXML; function _DataCollection() { this._Data = new Array(); function _AddValue(strName, strValue) { var nCount = this._Data.length; this._Data[nCount] = new Object(); this._Data[nCount].Name = strName; this._Data[nCount].Value = strValue; } this.AddValue = _AddValue function _GetCount() { var nCount = this._Data.length; return nCount; } this.GetCount = _GetCount; function _Item(nIndex) { return this._Data[nIndex]; } this.Item = _Item; } this.CallData = new _DataCollection(); this.ActivationData = new _DataCollection(); this._Callback = null; function _SetCallback(objCBFunction) { if(objCBFunction != null && typeof(objCBFunction) == 'function') { this._Callback = objCBFunction; } else { alert('The "function" provided to SetCallback() on the AcordeSOFC is not a functon and will not be used as a callback.'); } } this.SetCallback = _SetCallback; this._EntryURL = '../OTInfrastructure/AcordeRemoteScriptEntryPoint.asp'; function _SetEntryURL(strEntryURL) { this._EntryURL = strEntryURL; } this.SetEntryURL = _SetEntryURL; this._EntryFunction = 'ProcessSOFC'; function _SetEntryFunction(strEntryFunction) { this._EntryFunction = strEntryFunction; } this.SetEntryFunction = _SetEntryFunction; this.m_Debug = false; function _SetDebug() { this.m_Debug = true; } this.SetDebug = _SetDebug; function _Execute() { if(this.m_Debug) { alert('in objSOFC Execute'); } var xmlSOFC = this.GenerateXML(); if(this.m_Debug) { alert('xmlSOFC = ' + xmlSOFC); } var fnCB = this._Callback; var strCreate = ""; strCreate += "window.Acorde_"+this._CallSource+"_"+this._SourceID+"_onReturValue_"+this._FunctionName+"_CB=fnCB;\n" strCreate += "if(typeof(window.Acorde_"+this._CallSource+"_"+this._SourceID+"_onReturValue_"+this._FunctionName+")!='function'){\n" strCreate += "function _fn(s){window.Acorde_"+this._CallSource+"_"+this._SourceID+"_onReturValue_"+this._FunctionName+"_CB(s);}\n" strCreate += "window.Acorde_"+this._CallSource+"_"+this._SourceID+"_onReturValue_"+this._FunctionName+"=_fn;" strCreate += "}" eval(strCreate); var objPostWin = null; var objACE = new AcordeClientEvent("Infrastructure", "onSOFCWindowRequest"); objACE.SetOneOnly(); objPostWin = objACE.FireEvent(); if(typeof(objPostWin) == "undefined" || objPostWin == null) { var nWidth = screen.availWidth/5; var nHeight = screen.availHeight/7; var strFeatures = "titlebar=no,resizable=no,menubar=no,status=no,top="; strFeatures += (3*nHeight)-12; strFeatures += ",left="; strFeatures += (2*nWidth)-12; strFeatures += ",width="; strFeatures += nWidth+3; strFeatures += ",height="; strFeatures += nHeight; objPostWin = window.open("../OTInfrastructure/AcordeClientXMLSOFC_Processing.htm", "RemoteScriptForAcorde_"+this._CallSource+"_"+this._SourceID+"_onReturValue_"+this._FunctionName,strFeatures); var objAI = getAcordeInfrastructure(); var strCSSSet = objAI.GetCSSSetDirectory(); var html = ""; html += 'Processing...' html += "
Processing...
"; objPostWin.document.write(html); objPostWin.document.close(); } objPostWin.document.all.Data.action=this._EntryURL; objPostWin.document.all.p0.value = xmlSOFC; objPostWin.document.all._method.value = this._EntryFunction; objPostWin.document.all.Data.submit() } this.Execute = _Execute; }