function refreshAllOnClick() { showAnimation(); document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aRefreshAllDesignDocuments?OpenAgent'; hideAnimation(); } function designOnLoad() { document.all('iframePopUp').src = '/' + document.all('dbPath').value + '/frDesignPageProperties?OpenForm&design=' + document.all('docREF').value; } function selectDesignOnClick( sField ) { var field_value = document.all( sField ).value; document.all('iframePopUp').src = '/' + document.all('dbPath').value +'/frFieldProperties?OpenForm&field=' + sField + '&value=' + field_value.substring(1); } function selectOnChange( o ) { document.location = '/' + document.all('dbPath').value + '/v_data_for_select?openview&RestrictToCategory=' + o.options( o.selectedIndex ).value + "&dunid=" + document.all('fDesignUNID').value + "&field=" + document.all('fDesignField').value; } function selectDataOnClick( sUNID ) { //var o = window.open( '/' + document.all('dbPath').value + '/frDesignSelect?OpenForm&unid=' + sUNID + "&dunid=" + document.all('fDesignUNID').value + "&field=" + document.all('fDesignField').value, '_blank', 'scrollbar=yes, statusbar=no, left=0, top=0, width=300, height=300, resizeable=yes'); document.location = '/' + document.all('dbPath').value + '/frDesignSelect?OpenForm&unid=' + sUNID + "&dunid=" + document.all('fDesignUNID').value + "&field=" + document.all('fDesignField').value; } function selectDesignTypeOnChange( o ) { document.location = '/' + document.all('dbPath').value + '/frDesignSelect?OpenForm&unid=' + document.all('fDataUNID').value + '&design=' + o.options( o.selectedIndex ).value + "&dunid=" + document.all('fDesignUNID').value + "&field=" + document.all('fDesignField').value; } function insertDataOnClick() { var sField = window.opener.document.all('fDesignField').value; var oDoc = window.opener.opener.document; oDoc.all( sField ).value = "#" + document.all('fDesignId').value + "," + document.all('fDataUNID').value; window.opener.close(); window.close(); } function selectFieldOnChange() { document.all('iframeFieldProperties').src = '/' + document.all('dbPath').value + '/frDesignFieldProperties?OpenForm&design=' + document.all('fDesignId').value + '&field=' + document.all('DesignFieldsSelect').options( document.all('DesignFieldsSelect').selectedIndex ).text ; } function setCookie(sName, sValue) { date = new Date(); document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString(); } function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function getCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function setCookie (name, value) { var argv = setCookie.arguments; var argc = setCookie.arguments.length; var expires = (2 < argc) ? argv[2] : null; var path = (3 < argc) ? argv[3] : null; var domain = (4 < argc) ? argv[4] : null; var secure = (5 < argc) ? argv[5] : false; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); } function savePopUpProperties() { setCookie("popUpOffsetLeft", parent.document.all('divPopUp').offsetLeft); setCookie("popUpOffsetTop", parent.document.all('divPopUp').offsetTop); setCookie("popUpOffsetHeight", parent.document.all('divPopUp').offsetHeight); setCookie("popUpOffsetWidth", parent.document.all('divPopUp').offsetWidth); } function savePopUpValues() { parent.document.all('Command').value = document.all('Command').value; if(document.all('fDesignField').value == "") { parent.document.all('DesignType').value = document.all('DesignType').value; parent.document.all('fDesignTitle').value = document.all('DesignTitle').value; parent.document.all('fDataTitle').value = document.all('DesignTitle').value; parent.document.all('fViewType').value = document.all('ViewType').value; parent.document.all('fViewTag').value = document.all('ViewTag').value; parent.document.all('fViewOrder').value = document.all('ViewOrder').value; parent.document.all('fViewCount').value = document.all('ViewCount').value; parent.document.all('fDesignDataType').value = document.all('DataType').value; //parent.document.all('fDesignDataTag').value = document.all('DataTag').value; parent.document.all('fDesignDataId').value = document.all('DataId').value; } } function saveSectionPosition() { showAnimation(); document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aSetSectionPosition?OpenAgent§ion=' + document.all('fDesignSectionID').value + '&position=' + document.all('DesignPosition').options( document.all('DesignPosition').selectedIndex).value + '&start=' + document.all('DesignStartPage').checked; hideAnimation(); } function deleteWorkDocument( sId ) { showAnimation(); document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aDeleteWorkDocument?OpenAgent&id=' + sId; hideAnimation(); } function saveFieldLabel() { showAnimation(); var tIcon = document.all("FieldIcon").options( document.all("FieldIcon").selectedIndex ).value; var tLabel = document.all("FieldLabel").value; var uLabel = ""; var ix; for(ix=0;ix"); aDiv.style.position = 'absolute'; aDiv.style.left = 20; aDiv.style.top = 20; aDiv.id = 'anim'; var aImg = document.createElement(""); aImg.src = '/' + document.all('dbPath').value + '/Worldd1.gif'; aDiv.appendChild( aImg ); document.body.appendChild( aDiv ); } } function hideAnimation() { if( document.all('anim') != null) { document.body.removeChild(document.all('anim')); } } function applyOnClick() { if(document.all('fDesignField').value == "") { document.all('Command').value = 'APPLY'; savePopUpValues(); savePopUpProperties(); parent.document.forms(0).submit(); } else { if( document.all('FieldHasLabel').checked ) { saveFieldLabel(); } else { parent.document.all( document.all('FieldName').value ).value = "#" + document.all('FieldDataTag').options(document.all('FieldDataTag').selectedIndex).value + "," + document.all('FieldDataId').value; } } } function applyFIELDOnClick() { if( document.all('FieldHasLabel').checked ) { saveFieldLabel(); } else { parent.document.all( document.all('FieldName').value ).value = "#" + document.all('FieldDataTag').options(document.all('FieldDataTag').selectedIndex).value + "," + document.all('FieldDataId').value; } } function previewOnClick() { document.all('Command').value = 'PREVIEW'; savePopUpValues(); savePopUpProperties(); parent.document.forms(0).submit(); } function previewDESIGNOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDesignDataId').value = document.all('DataId').options(document.all('DataId').selectedIndex).value; parent.document.forms(0).submit(); } function applyDESIGNOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY'; parent.document.all('fDesignDataId').value = document.all('DataId').options(document.all('DataId').selectedIndex).value; parent.document.forms(0).submit(); } function previewFIELDOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.forms(0).submit(); } function backFIELDOnClick() { document.location = parent.document.all('EditorBoxFormURL').value; } function previewHOMEOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function applyHOMEOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function previewLISTOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.all('fListTypeId').value = document.all('fListTypeId').options(document.all('fListTypeId').selectedIndex).value; parent.document.all('fListTagId').value = document.all('fListTagId').options(document.all('fListTagId').selectedIndex).value; parent.document.all('fListCount').value = document.all('fListCount').value; parent.document.all('fListOrder').value = document.all('fListOrder').options(document.all('fListOrder').selectedIndex).value; parent.document.forms(0).submit(); } function applyLISTOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY' parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.all('fListTypeId').value = document.all('fListTypeId').options(document.all('fListTypeId').selectedIndex).value; parent.document.all('fListTagId').value = document.all('fListTagId').options(document.all('fListTagId').selectedIndex).value; parent.document.all('fListCount').value = document.all('fListCount').value; parent.document.all('fListOrder').value = document.all('fListOrder').options(document.all('fListOrder').selectedIndex).value; parent.document.forms(0).submit(); } function previewARTICLEOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function applyARTICLEOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY' parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function previewFORUMOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function applyFORUMOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY' parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function previewACTIVITYOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function applyACTIVITYOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY' parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function previewCALENDAROnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function applyCALENDAROnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY' parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function previewTOPICOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'PREVIEW'; parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function applyTOPICOnClick() { savePopUpProperties(); parent.document.all('Command').value = 'APPLY' parent.document.all('fDataTitle').value = document.all('fDataTitle').value parent.document.all('fDataLead').value = document.all('fDataLead').value parent.document.all('fWindow').value = document.all('fWindow').options(document.all('fWindow').selectedIndex).value; parent.document.forms(0).submit(); } function saveOnClick() { showAnimation(); savePopUpProperties(); document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aSaveWorkDocument?OpenAgent&work_id=' + parent.document.all('fWorkId').value; hideAnimation(); } function editOnClick() { savePopUpProperties(); parent.document.location = '/' + parent.document.all('dbPath').value + '/v_work_documents_by_id/' + parent.document.all('fWorkId').value + '?EditDocument'; } function designDocumentOnClick( sId ) { document.all('iframePopUp').src = '/' + document.all('dbPath').value +'/frDesignPageMainProperties?OpenForm&design=' + sId } function dataDocumentOnClick( sId ) { document.all('iframePopUp').src = '/' + document.all('dbPath').value +'/frDataPageMainProperties?OpenForm&data_id=' + sId } function dataTypeOnChange() { showAnimation(); while( document.all('DataId').options.length > 0 ) document.all('DataId').options.remove( 0 ); document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aGetDataByType?OpenAgent&type=' + document.all('DataType').options( document.all('DataType').selectedIndex).value; hideAnimation(); } function fieldDataTagStyleOnChange() { showAnimation(); while( document.all('FieldDataTag').options.length > 0 ) document.all('FieldDataTag').options.remove( 0 ); document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aGetTagsByStyle?OpenAgent&style=' + document.all('FieldDataTagStyle').options( document.all('FieldDataTagStyle').selectedIndex).value + '&field=true'; hideAnimation(); } function fieldDataTypeOnChange() { showAnimation(); while( document.all('FieldDataId').options.length > 0 ) document.all('FieldDataId').options.remove( 0 ); document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aGetDataByType?OpenAgent&type=' + document.all('FieldDataType').options( document.all('FieldDataType').selectedIndex).value + '&field=true'; hideAnimation(); } function fieldDataSectionOnChange() { var oWindow; showAnimation(); while( document.all('FieldDataType').options.length > 0 ) document.all('FieldDataType').options.remove( 0 ); while( document.all('FieldDataId').options.length > 0 ) document.all('FieldDataId').options.remove( 0 ); var sel_val = document.all('FieldDataSection').options( document.all('FieldDataSection').selectedIndex).value; if( sel_val == "PICTURE" || sel_val == "ACTIVITY") { document.all('FieldDataType').disabled = true; document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aGetDataByType?OpenAgent&type=' + document.all('FieldDataSection').options( document.all('FieldDataSection').selectedIndex).value + '&field=true' } else { document.all('FieldDataType').disabled = false; document.all('iframeAgents').src = '/' + document.all('dbPath').value + '/aGetTypesBySection?OpenAgent§ion_id=' + document.all('FieldDataSection').options( document.all('FieldDataSection').selectedIndex).value + '&field=true'; } hideAnimation(); } function typeOnChange() { if( document.all("DesignType").options(document.all("DesignType").selectedIndex).value == "frDesignList") { document.all("divViewProperties").style.display = "block"; document.all("divDataProperties").style.display = "none"; } else if(document.all("DesignType").options(document.all("DesignType").selectedIndex).value == "frDesignData") { document.all("divViewProperties").style.display = "none"; document.all("divDataProperties").style.display = "block"; } else { document.all("divViewProperties").style.display = "none"; document.all("divDataProperties").style.display = "none"; } } function pagePropertiesOnLoad() { if( document.all("fDesignField").value == "" ) { document.all("divPageProperties").style.display = "block"; document.all("divFieldProperties").style.display = "none"; typeOnChange(); } else { document.all("divPageProperties").style.display = "none"; document.all("divFieldProperties").style.display = "block"; document.all("divFieldDataProperties").style.display = "block"; } } function pagePropertiesOnClick() { document.location = '/' + document.all('dbPath').value + '/frDesignPageProperties?OpenForm&design=' + document.all('fDesignId').value; } function applyDesignOnClick() { saveSectionPosition(); parent.document.location = '/' + document.all('dbPath').value + '/frDesignDocuments?OpenForm&design=' + document.all('fDesignId').value; } function editDesignOnClick() { parent.document.location = '/' + document.all('dbPath').value + '/aEditDesignDocument?OpenAgent&design=' + document.all('fDesignId').value; } function editDataPageOnClick() { parent.document.location = '/' + document.all('dbPath').value + '/aEditDataDocument?OpenAgent&data_id=' + document.all('fDataId').value; } function newDesignOnClick() { parent.document.location = '/' + document.all('dbPath').value + '/aCreateDataDocument?OpenAgent§ion=' + document.all('fDesignSectionId').value + '&style=' + document.all('DataStyles').options(document.all('DataStyles').selectedIndex).value; } function fieldHasLabelOnClick() { document.all('FieldLabel').disabled = !document.all('FieldHasLabel').checked; document.all('FieldIcon').disabled = !document.all('FieldHasLabel').checked; } function deleteDESIGNWorkOnClick( sId ) { deleteWorkDocument( sId ); parent.document.location = '/' + document.all('dbPath').value + '/frDesignDocuments?OpenForm&design=' + sId; } function deleteDATAWorkOnClick( sId ) { deleteWorkDocument( sId ); parent.document.location = '/' + document.all('dbPath').value + '/frDesignDocuments?OpenForm&data_id=' + sId; } function manageSection( sId ) { if( document.all( sId ).style.display == 'block' ) { collapseSection( sId ); } else { expandSection( sId ); } } function expandSection( sId ) { document.all( sId ).style.display = 'block'; document.all( 'expand' + sId ).src = '/' + document.all('dbPath').value + '/minus.gif'; } function collapseSection( sId ) { document.all( sId ).style.display = 'none'; document.all( 'expand' + sId ).src = '/' + document.all('dbPath').value + '/plus.gif'; }