var g_conCount=1;var g_fkCount=1;var g_ukCount=1;function ob_TableToggleType(F){var E=html_CascadeUpTill(F,"TR");var D=E.getElementsByTagName("input");var B=D[1];var C=D[2];var A=D[3];html_VisibleElement(A);switch(F.value){case"NUMBER":html_VisibleElement(C);if(C.value>38){C.value=""}html_VisibleElement(B);if((B.value.length>0)&&(C.value.length==0)){B.value=""}break;case"CLOB":case"BLOB":case"DATE":case"TIMESTAMP":html_HiddenElement(C);html_HiddenElement(B);break;case"VARCHAR2":html_VisibleElement(C);if((C.value>4000)||(C.value.length==0)){C.value="4000"}html_HiddenElement(B);break;case"NVARCHAR2":html_VisibleElement(C);if((C.value>2000)||(C.value.length==0)){C.value="2000"}html_HiddenElement(B);break;case"CHAR":html_VisibleElement(C);html_HiddenElement(B);if((C.value>100)||(C.value.length==0)){C.value="100"}break;case"BINARY_FLOAT":html_HiddenElement(C);html_HiddenElement(B);break;case"BINARY_DOUBLE":html_HiddenElement(C);html_HiddenElement(B);break;default:html_HiddenElement(C);html_HiddenElement(B);html_HiddenElement(A);break}return }function addTableRow2(D,A,B){var I=html_GetElement(A);var E=new Array();for(i=0;i0){C=C+","}C=C+A[B].value}return C}function ob_addFk(){var H=html_GetElement("P145_FK_REF_TABLE").value;var I=ob_getOpts("P145_FK_REF_COLUMN_SEL");var B=ob_getOpts("P145_FK_THIS_COLUMN_SEL");var D=html_GetElement("P145_FK_NAME").value;var A=html_RadioValue("P145_FK_ACTION");var G=html_GetElement("htmldbNewTable");var C=new htmldb_Get(null,4500,"INTERNAL_APPLICATION_PROCESS=172369000165936003",0);C.add("P145_FK_REF_TABLE",H);C.add("P145_TO_COLS",I);C.add("P145_FROM_COLS",B);C.add("P145_FK_NAME",D);C.add("P145_FK_ACTION",A);var E=C.get();if(E.indexOf("HTMLDB:ERROR")>0){html_GetElement("htmldbMessageHolder").innerHTML=E}else{html_GetElement("htmldbNewTable").parentNode.innerHTML=E;html_GetElement("P145_FK_REF_TABLE").value="";html_GetElement("P145_FK_REF_COLUMN_SEL").options.length=0;g_fkCount+=1;html_GetElement("P145_FK_NAME").value=html_GetElement("P145_TABLE_NAME").value+"_fk"+g_fkCount;html_HideItemRow("P145_FK_REF_COLUMN");html_HideItemRow("P145_FK_REF_COLUMN_SEL");html_RemoveAllChildren("htmldbMessageHolder");Shuttle.reset()}var F=""}function ob_rmFkRow(C){var B=new htmldb_Get(null,4500,"INTERNAL_APPLICATION_PROCESS=172867829404455433",0);B.add("P145_FK_SEQ",C);var A=B.get();x=html_GetElement("fkTab_"+C);x.parentNode.removeChild(x)}function ob_addCons(){var F=html_GetElement("P149_NAME").value;var D=ob_getOpts("P149_SEL_COLS");var E=html_GetElement("P149_CHECK").value;var A=html_RadioValue("P149_CONST_TYPE");var C=new htmldb_Get(null,4500,"INTERNAL_APPLICATION_PROCESS=176127519858657209",0);C.add("P149_NAME",F);C.add("P149_SEL_COLS",D);C.add("P149_CHECK",E);C.add("P149_CONST_TYPE",A);var B=C.get();if(B.indexOf("HTMLDB:ERROR")>0){html_GetElement("htmldbMessageHolder").innerHTML=B}else{html_GetElement("htmldbNewTable").parentNode.innerHTML=B;html_GetElement("P149_CHECK").value="";html_GetElement("P149_SEL_COLS").options.length=0;if(A=="C"){g_conCount+=1;html_GetElement("P149_NAME").value=html_GetElement("P149_TABLE_NAME").value+"_ck"+g_conCount}else{g_ukCount+=1;html_GetElement("P149_NAME").value=html_GetElement("P149_TABLE_NAME").value+"_uk"+g_ukCount}html_GetElement("htmldbMessageHolder").innerHTML="";Shuttle.reset()}}function ob_rmConsRow(C){var B=new htmldb_Get(null,4500,"INTERNAL_APPLICATION_PROCESS=176138206577719675",0);B.add("P149_CONS_SEQ",C);var A=B.get();x=html_GetElement("consTab_"+C);x.parentNode.removeChild(x)}var gLastFilteredKey;function ob_DelayTableSearch(A){gLastFilteredKey=new Date();setTimeout(delayedFilter,250)}function delayedFilter(){if(((new Date()-gLastFilteredKey))>250){ob_createTableFKCols()}else{setTimeout(delayedFilter,250)}}function p149_RadioTog(){var A=html_RadioValue("P149_CONST_TYPE");if(A=="C"){html_ShowItemRow("P149_CHECK");html_HideItemRow("P149_AVAIL_COLS");html_HideItemRow("P149_SEL_COLS");html_GetElement("P149_NAME").value=html_GetElement("P149_TABLE_NAME").value+"_ck"+g_conCount}else{html_HideItemRow("P149_CHECK");html_ShowItemRow("P149_AVAIL_COLS");html_ShowItemRow("P149_SEL_COLS");html_GetElement("P149_NAME").value=html_GetElement("P149_TABLE_NAME").value+"_uk"+g_ukCount}}function ob_ToggleNN(B){var A=B.nextSibling;if(A!=null&&A.nodeType==3){A=A.nextSibling}if(B.checked==true){B.value="Y";A.value="Y"}else{B.value="N";A.value="N"}}function ob_table_getColOrder(){var E=html_GetElement("P602_COL_ORDER");var C=html_CascadeUpTill(html_GetElement("htmldbNewTable"),"TABLE");var D=C.getElementsByTagName("input");var B=0;var A="";for(B=0;B