weaverTable_wev8.js 150 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541
/*---------------------------------------*/
/**/ 
/*---------------------------------------*/
function weaverTable(xmlFile,refreshTime,tableInstanceId,tableString,mode,selectedstrs,tableInfo,showExpExcel,isShowTopInfo,isShowBottomInfo,isShowThumbnail,imageNumberPerRow,TopLeftText,BottomLeftText, isCellThumbnailDis){   
	isCellThumbnailDis=true;
	//初始化值	
	this.languageid=readCookie("languageidweaver");
	this.id = XTableHandler.getId();
	XTableHandler.all[this.id] = this;
	this.xmlFile = xmlFile;
	this.refreshTime=refreshTime;
	/*this.loadText = "正在加载,请稍候......";
	if(this.languageid==8) this.loadText = "Loading......";
	if(this.languageid==9) this.loadText = "正在加載,請稍候......";*/
	this.loadText = SystemEnv.getHtmlNoteName(3402,this.languageid);
	this.tableInfo = tableInfo=='null'?'':tableInfo;
	this.TopLeftText=TopLeftText=='null'?'':TopLeftText;
	this.BottomLeftText=BottomLeftText=='null'?'':BottomLeftText;
	this.showExpExcel = showExpExcel=='true'?true:false;
	this.isShowTopInfo = isShowTopInfo=='false'?false:true;
	this.isShowBottomInfo = isShowBottomInfo=='false'?false:true;
	
	/* edited by wdl 2006-05-24 left menu new requirement 显示缩略图 */
	this.isShowThumbnail = isShowThumbnail;
	this.imageNumberPerRow = imageNumberPerRow;
	/* edited by wdl end */
	
	this.div = this.createByName("div");
	
	//tableInfoDiv
	this.tableInfoDiv = this.createByName("div");	
	if((tableInfo!="null"&&tableInfo!="")||showExpExcel){
		jQuery(this.div).append(this.tableInfoDiv);
	}
	
	//info
	this.infoDivTop = this.createByName("div");
	jQuery(this.infoDivTop).attr("class", "xTable_info xTable_infoTop");
	jQuery(this.div).append(this.infoDivTop);


	//table
	this.tableDiv = this.createByName("div");
	jQuery(this.tableDiv).attr("class", "table");
	
	//info
	this.infoDiv = this.createByName("div");
	jQuery(this.infoDiv).attr("class", "xTable_info");

	//this.initDiv = this.createByName("div");
	//this.initDiv.innerHTML="<center><font color=\"AAAAAA\">"+this.loadText+"</font></center>";
	//this.tableDiv.appendChild(this.initDiv);
	//this.div.appendChild(this.tableDiv);
	jQuery(this.div).append(this.tableDiv);
	
	//messagge
	//this.messageDiv = this.createByName("div");
	//this.messageDiv.className="xTable_message";	
	//this.div.appendChild(this.messageDiv);
	
	this.tableInstanceId=tableInstanceId;
	this.tableString=tableString;
	this.mode=mode;
	this.selectedstrs = selectedstrs;
	this.customParams = null;	

	this.orderValue=null;						//排序列
	this.orderType = null;
	this.loading = false;						//是否正在加载
	
	this.page=true;							//是否分页?
	this.needPage = true;
	this.pageId = "";
	this.pageNum=0;
	this.nowPage=0;
	this.recordCount=0;
	this.pagesize=0;
	this.tabletype="";
	this.havaOperates="false";
	this.operatesWidth="";
	this.optUrls = null;
	this.optTexts = null;	
	this.optLinkkeys=null;	
	this.optTargets=null;
	this.isPageAutoWrap=0;
	
	var xttable = this;
	jQuery(function(){
		xttable.load();
	});
	
	//动态刷新
	if(this.refreshTime>0){
		var xt = this;
		window.clearInterval();
		window.setInterval(function(){xt.load();},xt.refreshTime);				
	}
	
	this.isCellThumbnailDis = (isCellThumbnailDis == null || undefined ) ? false : isCellThumbnailDis == true ? true : false;
	
	this.primarykeylist = new Array();
}


weaverTable.prototype.create = function(){
	return this.div;
}
weaverTable.prototype.toString = function(){
	return this.div.outerHTML;	
}

weaverTable.prototype.load = function(){
	//如果正在加载,则不重复加载
	if(this.loading){
		return;	
	}		
	this.loading = true;
	var xmlHttp = XmlHttp.create();	
	/*var postdata = "<?xml version=\"1.0\" encoding=\"GBK\"?>";
		postdata += "<postdata>";
		postdata += "<tableInstanceId>"+this.tableInstanceId+"</tableInstanceId>";
		postdata += "	<tableString>"+this.tableString+"</tableString>";
		postdata += "	<pageIndex>"+this.nowPage+"</pageIndex>";
		postdata += "	<orderBy>"+this.orderValue+"</orderBy>";
		postdata += "	<otype>"+this.orderType+"</otype>";
		postdata += "	<mode>"+this.mode+"</mode>";
		postdata += "	<selectedstrs>"+this.selectedstrs+"</selectedstrs>";
		postdata += "</postdata>";*/
		
		var postdata = "";
		postdata += "tableInstanceId="+this.tableInstanceId+"&";
		postdata += "tableString="+this.tableString+"&";
		postdata += "pageIndex="+this.nowPage+"&";
		postdata += "orderBy="+this.orderValue+"&";
		postdata += "otype="+this.orderType+"&";
		postdata += "mode="+this.mode+"&";
		postdata += "customParams="+this.customParams+"&";
		postdata += "selectedstrs="+this.selectedstrs;
		var pageId = jQuery("#pageId").val();
		if(!!pageId){
			postdata += "&pageId="+pageId;
		}
		var formmodeFlag = jQuery("#formmodeFlag").val();
		if(!!formmodeFlag){
			postdata += "&formmodeFlag="+formmodeFlag;
		}

		postdata = postdata.replace(new RegExp('&nbsp;', 'g'),' ');
		//异步加载数据
		try{
			if(this.xmlFile.indexOf("?")!=-1 && this.xmlFile.indexOf("__mould")!=-1){
				xmlHttp.open("GET", this.xmlFile+"&"+postdata, true);
				//xmlHttp.open("POST", this.xmlFile, true);
			}else{
				xmlHttp.open("GET", this.xmlFile+"?"+postdata, true);
				//xmlHttp.open("POST", this.xmlFile, true);
			}
		}catch(e){
			xmlHttp.open("GET", this.xmlFile+"?"+postdata, true);
			//xmlHttp.open("POST", this.xmlFile, true);
		}
		var weaverTable = this;		
		xmlHttp.onreadystatechange = function () {	
			switch (xmlHttp.readyState) {
			   case 0 :  //uninitialized
					break ;
			   case 1 :   //loading							
					break ;
			   case 2 :   //loaded
				   /*if(readCookie("languageidweaver")==8) 
					   weaverTable.showMessage("Executing....");
				   else if(readCookie("languageidweaver")==9) 
					   weaverTable.showMessage("服務器正在處理,請稍候....");
				   else 
					  weaverTable.showMessage("服务器正在处理,请稍候....");
					  */
					weaverTable.showMessage(SystemEnv.getHtmlNoteName(3403,readCookie("languageidweaver")));
				   break ;
			   case 3 :   //interactive
				   var message=SystemEnv.getHtmlNoteName(3404,readCookie("languageidweaver"));				   

                    weaverTable.showMessage(message);

				   break ;
			   case 4 :  //complete
					if (xmlHttp.status==200)  {
						weaverTable.showMessage(SystemEnv.getHtmlNoteName(3405,readCookie("languageidweaver")));
						var xmlDoc = XmlDocument.create();
						if(xmlHttp.responseXML!=null){
							xmlDoc = jQuery(xmlHttp.responseXML)[0];
						}
						if(xmlHttp.responseXML==null&&xmlHttp.responseText!=null){
							xmlDoc.async = false; 						
							xmlDoc = jQuery(xmlHttp.responseText)[0];
						}
						var responseText_temp = xmlHttp.responseText;
						responseText_temp=responseText_temp.replace(/(^\s*)|(\s*$)/g, "");	
						if(weaverTable.nowPage > 1 && responseText_temp=="NoData") {
							weaverTable.nowPage = 0;
							weaverTable.loading = false;
							weaverTable.reLoad();
							break;
						} else {
							weaverTable.parse(xmlDoc,xmlHttp.responseText);	
							break ;	
						}	
				   } else {	
					   if(xmlHttp.status!=0){
							var showTableDiv  = document.getElementById('_xTable');						
							showTableDiv.innerHTML=creatErrorStr(xmlHttp.status,xmlHttp.statusText,xmlHttp.responseText);
					   }
				   }			  		
			} 
		}
				
		xmlHttp.setRequestHeader("Content-Type","text/xml");	
		xmlHttp.send();		
}

weaverTable.prototype.showMessage= function(info){	
	var message_table_Div  = jQuery(document.getElementById("message_table_Div"));
	message_table_Div.css("display", "inline").html(info);
	
	var pTop= document.body.offsetHeight/2+document.body.scrollTop-50;
	var pLeft= document.body.offsetWidth/2-50;
	if(jQuery("div#_xTable").length>0){
		pLeft = pLeft-10;
	}
	message_table_Div.css("position", "absolute").css("top", pTop).css("left", pLeft);
}


weaverTable.prototype.parse = function(oXmlDoc,docStr){
	if (this.mode=="debug"){
		alert(docStr);			
	}		
	//如果用xmlhttp加载失败 显示出错信息
	if(oXmlDoc == null||oXmlDoc.documentElement == null){
	   var showTableDiv  = document.getElementById('_xTable');	
	   if(readCookie("languageidweaver")==8) 
		   showTableDiv.innerHTML=creatErrorStr(0,SystemEnv.getHtmlNoteName(3440,readCookie("languageidweaver")),docStr);
	   else if(readCookie("languageidweaver")==9) 
		   showTableDiv.innerHTML=creatErrorStr(0,SystemEnv.getHtmlNoteName(3440,readCookie("languageidweaver")),docStr);
	   else 
		   showTableDiv.innerHTML=creatErrorStr(0,SystemEnv.getHtmlNoteName(3440,readCookie("languageidweaver")),docStr);
	}
	if( oXmlDoc == null || oXmlDoc.documentElement == null) {
		var showTableDiv  = document.getElementById('_xTable');						
		showTableDiv.innerHTML=creatErrorStr('','',docStr);		
	}else {
		var root = oXmlDoc.documentElement;
	    /* edited by wdl 2006-05-24 left menu new requirement 显示缩略图 */
		if(this.isShowThumbnail==""){
			this.showData(root);
			//add by lsj 2014/1/17处理表格数据隐藏
			if(typeof agentrowspan==='function')
			{
				agentrowspan();
			}
		}else if(this.isShowThumbnail=="2"){//公文显示
			this.showOfficalDoc(root);
			jQuery("#_xTable").css("padding-top","10px")
		}
		else{
			this.showThumbnail(root);
			jQuery("#_xTable").css("padding-top","10px")
		}
			
		/* edited by wdl end */
		
		
		/*add by bpf on 2013-12-18 表格中的checkbox和表格全选的checkbox对齐*/
		var xTable_info = jQuery(".xTable_info");
		xTable_info.each(function(){
			jNiceWrapperLast = jQuery(this).find(".jNiceWrapper");
			jNiceWrapperLast.parent().css("text-align","left");
			if(!!jNiceWrapperLast && jNiceWrapperLast.size()!=0){
			    jQuery(".jNiceWrapper").parent().css("padding-left","10px");
						//jQuery(".ListStyle .jNiceWrapper:first").offset().left-1);
			}
		});
	}
	try{
		if(typeof(lazyLoadBrowser)=="function"){
			setTimeout(lazyLoadBrowser,100);
		}
	} catch(e) {
	}
}

/* edited by wdl 2006-05-24 left menu new requirement 显示缩略图 */
weaverTable.prototype.showThumbnail = function(re){
	try{
		var showColMenu = jQuery("button[onclick*='showColDialog']",document.getElementById("rightMenuIframe").contentWindow.document);
	    if(showColMenu.length>0){
	    	var menuIndex = showColMenu.closest("div[id^=menuItemDivId]").attr("id").replace(/\D/g,"");
	    	hiddenRCMenuItem(menuIndex);
	    }
	}catch(e){
		if(window.console)console.log(e);
	}
	var $re = jQuery(re);
	this.page = $re.attr("page");
	this.pageNum = $re.attr("pagenum");
	this.nowPage = $re.attr("nowpage");
	this.recordCount = $re.attr("recordCount");
	this.tabletype = $re.attr("tabletype");
	this.orderValue = $re.attr("orderValue");
	this.orderType = $re.attr("orderType");
	this.pagesize=$re.attr("pagesize");
	//added by wcd 2015-10-19
	this.rowClick = $re.attr("rowClick");
	
	this.havaOperates = $re.attr("havaOprates");
	this.operatesWidth = $re.attr("operatesWidth");
	
	if(this.imageNumberPerRow==""||this.imageNumberPerRow=="0") this.imageNumberPerRow = 5;

	// checkbox ids arrays
	var checkboxArrays = new Array(this.pagesize);

	var tab = this.createByName("table");
	var $tab = jQuery(tab);
	if (this.isCellThumbnailDis) {
		$tab.css("table-layout","fixed");
	} 
	
	$tab.css("width", jQuery(re).attr("width"));
	
	//by bpf 2013-10-16 start(去掉单元格空隙)
	//tab.cellSpacing="1pt";
	tab.cellSpacing="0";
	//by bpf 2013-10-16	end

	jQuery(this.div).css("width", jQuery(re).attr("width"));
	//tab.className="ListStyle";
	$tab.attr("class", "ListStyle");
	
	var tbody = this.createByName("tbody");	
	//tab.appendChild(tbody);	
	$tab.append(tbody);

	var rows = $re.children();
	var size = rows.length;
	var tempi = 0;				//记录奇偶行
	var _aligns;				//每列对齐样式
	var _hrefs;				//每列的链接
	var _colids;				//链接列的参数
	var _targets;				//每列链接的目标框架
	var _keys;				//主键列
	var row;
	var celstr;
	var titlestrs;
	var currentDocId = 0;
	var _widths;
	var _heights;
	
	if(this.recordCount==0){
		var tr =jQuery(this.createByName("tr"));
		tr.addClass("e8EmptyTR");
		var td = jQuery(this.createByName("td"));
		td.css("text-align","center").css("height","30px").css("color","#000").attr("colspan",hSize);
		var infoMsg=SystemEnv.getHtmlNoteName(3558,readCookie("languageidweaver"));
		td.html(infoMsg);
		tr.append(td);
		jQuery(tbody).append(tr);
		jQuery(".xTable_info").remove();
		jQuery("#msgBox").hide();
	}
	
	for(var i = 0;i<size;i++){		
		//表头
		if(rows[i].tagName=="head"){
			var heads = jQuery(rows[i]).children();
			
			var hSize = heads.length;			
		
			_aligns = new Array(hSize);
			_hrefs = new Array(hSize);
			_targets = new Array(hSize);
			_colids = new Array(hSize);
			_keys = new Array(hSize);
			_widths = new Array(hSize);
			_heights = new Array(hSize);
			var __coli = 0;
			
			titlestrs = new Array(hSize);
			
			for(var hi=0;hi<hSize;hi++){
				if(heads[hi].tagName!="col"){
					continue;
				}
				
				_hrefs[__coli] = jQuery(heads[hi]).attr("href");
				_targets[__coli] = jQuery(heads[hi]).attr("target");
				_keys[__coli] = jQuery(heads[hi]).attr("key");

				titlestrs[__coli] = jQuery(heads[hi]).attr("text");
				_widths[__coli] = jQuery(heads[hi]).attr("cusWidth");
				_heights[__coli] = jQuery(heads[hi]).attr("cusHeight");
				__coli++;
			}
		
			if(this.havaOperates=="true"){
			}

			continue;
		}
		
		if(rows[i].tagName!="row"){	
			continue;	
		}

		tempi ++;
		if(tempi == 1){
		    row = this.createByName("tr");
		}

		var cels = jQuery(rows[i]).children();
		var cSize = cels.length;

		var __coli = 0;
		var __optIds = new Array(cSize);
		
 		var cel = this.createByName("td");
		var $cel = jQuery(cel);
		//TD29472 注销此行 相册中显示的高度被固定,无法显示出全部的缩略图
 		if (this.isCellThumbnailDis) {
 			cel.style.height = "30px";
 			if(jQuery.browser.msie){
 				cel.style.height = "150px";
 			}
 		}
		//End TD29472 
 		if (this.isCellThumbnailDis && !(this.isPageAutoWrap==1||this.isPageAutoWrap=="1")) {
			jQuery(cel).css("text-Overflow", "ellipsis").css("white-Space", "nowrap").css("word-Break", "keep-all").css("overflow", "hidden");
 		}else{
 			jQuery(cel).css("word-break", "break-all").css("word-wrap", "break-word");
 		}
   		celstr = "";
   		var _tdstyle= this.isCellThumbnailDis && !(this.isPageAutoWrap==1||this.isPageAutoWrap=="1") ? " style=\"display:inline-block;word-break:keep-all;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;\" " : " style=\"word-wrap:break-word;word-break:break-all;\"";
		//行
		for(var j = 0;j<cSize;j++){
			var $celj = jQuery(cels[j]);
			if(cels[j].tagName=="col"){
			
				var __nowId = ($celj.attr("linkvalue")==null)?$celj.attr("text"):$celj.attr("linkvalue");
				
				var showvalue=$celj.attr("showvalue");
				var isChecked = ($celj.attr("checked")=="true"?true:false);
				
				//checkbox
				if ($celj.attr("type")=="checkbox") {//checkbox
					celstr+="<div style='margin-bottom:10px;'>"
					if (_xtable_checkedList.contains(__nowId)||isChecked)	{		
						checkboxArrays[i] = "_xTable_"+__nowId;
					}
					 
					celstr = celstr + "<input type=checkbox name=chkInTableTag id=_xTable_"+__nowId+" checkboxId="+__nowId+"  value=\""+showvalue+"\"  onClick=_xtalbe_chkCheck(this)>";					
					
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;
					}

					//check
					if (isChecked){

					}
					__coli++;				
					continue ;				
				
				} else if ($celj.attr("type")=="radio") {//radio
					celstr+="<div style='margin-bottom:10px;'>"
					if (_xtalbe_radiocheckId == __nowId||isChecked)	{
						
						celstr = celstr + "<input type=radio name=rdoInTableTag  radioId="+__nowId+" checked id=_xTable_"+__nowId+" value=\""+showvalue+"\" onClick=rdoCheck(this)>";
					    
					} else {
						
						celstr = celstr + "<input type=radio name=rdoInTableTag radioId="+__nowId+" id=_xTable_"+__nowId+" value=\""+showvalue+"\" onClick=rdoCheck(this)>";
					    
					}
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;
					}
					__coli++;
					continue ;
				
				} else if ($celj.attr("type")=="none") {
					
					celstr = celstr + "&nbsp;<input type=checkbox  style='display:none' id="+__nowId+" value=\""+showvalue+"\">";// xwj for td2180 20050818
					
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;	
					}
					
					__coli++;
					continue ;
				} else if ($celj.attr("type")=="thumbnail") {
					celstr+="<div style='margin-bottom:10px;'>"
					if (_xtable_checkedList.contains(__nowId)||isChecked)	{		
						checkboxArrays[i] = "_xTable_"+__nowId;
					}
					if($celj.attr("type2")=="none"){
						celstr = celstr + "&nbsp;<input type=checkbox  style='display:none' id="+__nowId+" value="+showvalue+">";// xwj for td2180 20050818
					}else{
						celstr = celstr + "<input type=checkbox name=chkInTableTag id=_xTable_"+__nowId+" checkboxId="+__nowId+"  value=\""+showvalue+"\"  onClick=_xtalbe_chkCheckThumbnail(this)>";
					}

					var imgsrc = $celj.attr("imgsrc");
			        //显示图片
			        celstr = "<div class='e8ThumbnailImg' style='line-height:152px;'>" +
			        		 "<img src='"+imgsrc+"' style='max-width:140px;max-height:145px;vertical-align:middle;'>" +
			        		 "</div>"+
			        		 celstr;
			        		 
				
					__coli++;
					continue ;
				} else if ($celj.attr("type")=="thumbnailNoCheck") {
					celstr+="<div style='margin-bottom:10px;'>"
					if (_xtable_checkedList.contains(__nowId)||isChecked)	{		
						checkboxArrays[i] = "_xTable_"+__nowId;
					}

					var imgsrc = $celj.attr("imgsrc");
					//alert(imgsrc)
			        //显示图片
					if(imgsrc.indexOf("?div=")>-1){
						imgsrc = imgsrc.replace("?div=","");
						  celstr = "<div class='e8ThumbnailImg' style='line-height:152px;'>" +
						  	"<div style='max-width:140px;max-height:145px;vertical-align:middle;text-align:center;height:142px;position:relative'>"
			        		  +imgsrc+
			        		   "</div>"+
			        		 "</div>"+
			        		 celstr;
					__coli++;
					}else{
						 celstr = "<div class='e8ThumbnailImg' style='line-height:152px;'>" +
			        		 "<img src='"+imgsrc+"' style='max-width:140px;max-height:145px;vertical-align:middle;'>" +
			        		 "</div>"+
			        		 celstr;
					}
			        
			       
				

					continue ;
				}
				
				//是否为主键
				if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
					__optIds[__coli] = __nowId;	
				}
				if(_hrefs[__coli]!=null){
				
					var str = $celj.text();
					if (_targets[__coli]=="_fullwindow"){
						if(str.indexOf("</a>")!=-1){
							
						}else{
							if(__nowId!=""){
								var tempUrl = _hrefs[__coli]+this.getAttendChar(_hrefs[__coli])+jQuery(cels[j]).attr("linkkey")+"="+__nowId;
								var options = {cusWidth:_widths[__coli],cusHeight:_heights[__coli]};
								str = "<a href=\"javascript:this.openFullWindowForXtable('"+tempUrl+"',this,{cusWidth:"+_widths[__coli]+",cusHeight:"+_heights[__coli]+"})\""  + _tdstyle + ">"+ jQuery(cels[j]).text()+"</a>";
							}
						}
					} else {
					     if(__nowId!=""){
							 str = "<a href=\""+_hrefs[__coli]+this.getAttendChar(_hrefs[__coli])+jQuery(cels[j]).attr("linkkey")+"="+__nowId+
							       "\" target=\""+_targets[__coli]+"\" " + _tdstyle + ">"+jQuery(cels[j]).text()+"</a>";
					     }
					}
					
					celstr = celstr + "<span>"+str+"<span>";
					
				} else {
				    var str = $celj.text();
				    
				    //if(celstr.substr(celstr.length-4)!="<br>") celstr = celstr + "<br>";
					celstr = celstr + "<span>"+str+"<span>";
					
				}
				
				__coli++;
				
			} else if (cels[j].tagName=="operates"){
			
				//显示操作栏				
				var optStrAll="";

				//var opas = cels[j].childNodes;
				var opas = $celj.children();
				for(var opti = 0;opti<opas.length;opti++){
					var opa = opas[opti];
					var $opa = jQuery(opa);
					var text = $opa.attr("text");
					var href = $opa.attr("href");
					var target = $opa.attr("target");
					var linkkey = $opa.attr("linkkey");
					var value = $opa.attr("value");
					var otherpara = $opa.attr("otherpara");
					var options = {cusWidth:$opa.attr("width"),cusHeight:$opa.attr("height")};
					if(otherpara==null)otherpara="";
					var operateStr="";
					if (href!=null) {				
						var operateStrLower = href.toLowerCase(); 				
						var pos =operateStrLower.indexOf("javascript:");						
						if (pos != -1)  {
							var strJavaScript="";
							var posBracketStart = href.lastIndexOf("(");
							var posBracketEnd = href.lastIndexOf(")");	
							var strInBracket = href.substring(posBracketStart+1,posBracketEnd);
							
							if (strInBracket.replace(/(^\s*)|(\s*$)/g, "")=="") {  //删除空格
								strJavaScript = href.substring(0,posBracketEnd)+"\""+value+"\",\""+otherpara+"\",this"+href.substring(posBracketEnd);		
							} else {
								strJavaScript = href.substring(0,posBracketEnd)+",\""+value+"\",\""+otherpara+"\",this"+href.substring(posBracketEnd);		
							}
							//operateStr = "<a href='"+strJavaScript+"'>"+text+"</a>";
							if(jQuery.browser.msie){
								operateStr = "<a href='#' onclick='"+strJavaScript+"'>"+text+"</a>";
							}else{
								operateStr = "<a href='#' onclick='"+strJavaScript+";return false;'>"+text+"</a>";
							}
						} else {
							if (target=="_fullwindow") {
								var tempStr = href+"?"+linkkey+"="+value;					
								operateStr = "<a href=javascript:this.openFullWindowForXtable('"+tempStr+"',this,{cusWidth:"+jQuery(opa).attr("width")+",cusHeight:"+jQuery(opa).attr("height")+"})>"+text+"</a>";	
							} else {
								operateStr = "<a href="+href+"?"+linkkey+"="+value+" target="+target+">"+text+"</a>";	
							}
						}									
					} else {
						operateStr=text;
					}
					optStrAll += "<span style='padding-left:5px;padding-right:5px;'>"+operateStr +"</span>";
				}
				celstr = celstr + "<div class='e8thumbnailop' style='top:123px;left:13px;'><div style='padding-left:5px;padding-right:5px;'>" + optStrAll+"</div></div>";
     		}
		}
		
		cel.align = "center";
		
		cel.vAlign = "top";
		celstr += "</div>";
		cel.innerHTML = celstr;
		$cel.css("position","relative");
		var thubnailImg = $cel.find("div.e8ThumbnailImg");
		var e8thumbnailop = $cel.find("div.e8thumbnailop");
		e8thumbnailop.css({
			"display":"none",
			"position":"absolute"
		});
		$cel.hover(function(){
			var $this = jQuery(this);
			var thubnailImg1 = $this.find("div.e8ThumbnailImg");
			thubnailImg1.addClass("e8ThumbnailImgHoverH");
			var e8thumbnailop1 = $this.find("div.e8thumbnailop");
			e8thumbnailop1.css({
				"top":thubnailImg1.position().top+thubnailImg1.height()-29,
				"left":thubnailImg1.position().left+1
			});
			e8thumbnailop1.fadeIn("normal",function(){
				e8thumbnailop1.css({
					"top":thubnailImg1.position().top+thubnailImg1.height()-e8thumbnailop1.height()+1,
					"left":thubnailImg1.position().left+1
				});
			});
			
		},function(){
			var $this = jQuery(this);
			var thubnailImg1 = $this.find("div.e8ThumbnailImg");
			thubnailImg1.removeClass("e8ThumbnailImgHoverH");
			var e8thumbnailop1 = $this.find("div.e8thumbnailop");
			e8thumbnailop1.fadeOut("normal");
		});
		thubnailImg.css("cursor","pointer")
				.bind("click",function(){
					var $this = jQuery(this);
					var checkbox = $this.next("div").children("span.jNiceWrapper").children("input");
					var isRadio = false;
					var _this = this;
					var tables = $cel.find("div.e8ThumbnailImgHover");
						tables.each(function(){
							if(_this===this){
							}else{
								jQuery(this).removeClass("e8ThumbnailImgHover");
							}
						});
					if(checkbox.attr("type")=="radio"){
						isRadio = true;
						var tables = $cel.find("div.e8ThumbnailImgHover");
						tables.each(function(){
							if(_this===this){
							}else{
								$this.removeClass("e8ThumbnailImgHover");
							}
						});
					}
					if($this.hasClass("e8ThumbnailImgHover")){
						if(checkbox.length>0){
							$this.removeClass("e8ThumbnailImgHover");
							if(isRadio && checkbox.length>0){
								changeRadioStatus(checkbox,false);
							}else if(checkbox.length>0){
								changeCheckboxStatus(checkbox,false);
							}
						}
					}else{
						if(checkbox.length>0){
							$this.removeClass("e8ThumbnailImgHoverH").addClass("e8ThumbnailImgHover");
							if(isRadio && checkbox.length>0){
								changeRadioStatus(checkbox,true);
							}else if(checkbox.length>0){
								changeCheckboxStatus(checkbox,true);
							}
						}
					}
				});
		
		cel.width = (100 / this.imageNumberPerRow).toString()+"%";
		celstr = "";
		
		jQuery(row).append(cel);
		if((tempi % this.imageNumberPerRow == 0 && tempi>1)||tempi==size-1){
		    if((tempi==size-1)&&(tempi%this.imageNumberPerRow!=0)){
		        for(var bi=0;bi< this.imageNumberPerRow - (tempi % this.imageNumberPerRow) ; bi++){
		            var nullcel = this.createByName("td");
		            nullcel.innerHTML = "&nbsp;";
		            //row.appendChild(nullcel);
		            jQuery(row).append(nullcel);
		        }
		        jQuery(tbody).append(row);
		    } else {
    		    //tbody.appendChild(row);
		    	jQuery(tbody).append(row);
    		    row = this.createByName("tr");
    		}
		}
	}

	//是否是重新加载
	if(this.tableDiv.firstChild!=null){
//		this.tableDiv.removeChild(this.tableDiv.firstChild);
		jQuery(this.tableDiv).empty();
	}
	//this.tableDiv.appendChild(tab);	
	jQuery(this.tableDiv).append(tab);
	if((this.page=="true"||this.page=="TRUE"||this.page=="Y")&&this.recordCount!=0){
		//this.div.appendChild(this.infoDiv);
		jQuery(this.div).append(this.infoDiv);
		if (this.isShowTopInfo){
			this.infoDivTop.innerHTML =  this.buildInfo("top");  //1:top 2:buttom
		}
		if (this.isShowBottomInfo){
			this.infoDiv.innerHTML =  this.buildInfo("buttom");	
		}
		this.tableInfoDiv.innerHTML =  this.buildInfo("tableInfoDiv");
		try{
			var pageId = this.pageId;
			if(!pageId){
				pageId = jQuery("#pageId").val();
			}
			jQuery("#pageSizeSel0").selectForK13({
				"width":"40px",
				pageSize:this.pagesize,
				pageId:pageId,
				callback:savePageSize,
				isWrap:false
			});
			jQuery("#pageSizeSel1").selectForK13({
				"width":"40px",
				pageSize:this.pagesize,
				pageId:pageId,
				callback:savePageSize,
                isWrap:false
			});
		}catch(e){
		}
	}

	this.loading = false;
	this.loadOver();
	
	//checked checkbox
	for (var i=0;i<checkboxArrays.length ;i++ )	{
		var temp = checkboxArrays[i];
		if (temp!=null&&temp!=this.pagesize)	{	
			var tempobj = document.getElementById(temp);
			if (tempobj.tagName=="INPUT")	{
				tempobj.checked=true;				
				//tempobj.parentElement.parentElement.className = "Selected"
				thumbnailSelected(tempobj);
			}
		}
	}
	try{
		//缩略图
		jQuery("IMG[src^='/weaver/weaver.splitepage.transform.SptmForThumbnail?fileid=']").live({
			  click: function() {
			  		selectImg(this);
			  },
			  mouseover: function() {
			  		showPreview(event);
			  		//showborder(this);
			    	jQuery(this).parents("table:first").css("border","1px solid #558ed5");
			  },
			  mouseout:function(){
			  		hidePreview(event);
			  		//hideborder();
			  		jQuery(this).parents("table:first").css("border","1px solid #ddd");
			  }
		});
	}catch(e){
		//console.log(e);
	}
	var $_xTable = jQuery("div#_xTable");
	try {
		weaverTableCallbackFunction();
	} catch (e) {
		window.setTimeout(function(){
			try {
				weaverTableCallbackFunction();
			} catch (e) {}
		},300);
	}
	try{
		$_xTable.jNice();
	}catch(e){
		window.setTimeout(function(){
			try{
				$_xTable.jNice();
			}catch(e){}
		},300);
	}
	
	try{
		jQuery("input[type=checkbox]").each(function(){
			if(jQuery(this).attr("tzCheckbox")=="true"){
				jQuery(this).tzCheckbox({labels:['','']});
			}
		});
	}
	catch(e){
		window.setTimeout(function(){
			try{
				jQuery("input[type=checkbox]").each(function(){
					if(jQuery(this).attr("tzCheckbox")=="true"){
						jQuery(this).tzCheckbox({labels:['','']});
					}
				});
			}catch(e){}
		},300);
	}
	
	try{
		var callbackpara = {
			pageNum : this.pageNum,
			nowPage : this.nowPage,
			recordCount : this.recordCount
		};
		//当列表加载完成后调用一个处理函数
		afterDoWhenLoaded(callbackpara);
	}catch(e){
		window.setTimeout(function(){
			try{
				var callbackpara = {
					pageNum : this.pageNum,
					nowPage : this.nowPage,
					recordCount : this.recordCount
				};
				//当列表加载完成后调用一个处理函数
				afterDoWhenLoaded(callbackpara);
			}catch(e){
				if(window.console)console.log(e);
			}
		},300);
	}
	

}
/* edited by wdl end */

/* edited by ll 2014-08-20 left menu new requirement 公文显示 */
weaverTable.prototype.showOfficalDoc = function(re){
	try{
		var showColMenu = jQuery("button[onclick*='showColDialog']",document.getElementById("rightMenuIframe").contentWindow.document);
	    if(showColMenu.length>0){
	    	var menuIndex = showColMenu.closest("div[id^=menuItemDivId]").attr("id").replace(/\D/g,"");
	    	hiddenRCMenuItem(menuIndex);
	    }
	}catch(e){
		if(window.console)console.log(e);
	}
	var $re = jQuery(re);
	this.page = $re.attr("page");
	this.pageNum = $re.attr("pagenum");
	this.nowPage = $re.attr("nowpage");
	this.recordCount = $re.attr("recordCount");
	this.tabletype = $re.attr("tabletype");
	this.orderValue = $re.attr("orderValue");
	this.orderType = $re.attr("orderType");
	this.pagesize=$re.attr("pagesize");
	//added by wcd 2015-10-19
	this.rowClick = $re.attr("rowClick");
	
	this.havaOperates = $re.attr("havaOprates");
	this.operatesWidth = $re.attr("operatesWidth");
	
	if(this.imageNumberPerRow==""||this.imageNumberPerRow=="0") this.imageNumberPerRow = 5;

	// checkbox ids arrays
	var checkboxArrays = new Array(this.pagesize);

	var tab = this.createByName("table");
	var $tab = jQuery(tab);
	if (this.isCellThumbnailDis) {
		$tab.css("table-layout","fixed");
	} 
	
	$tab.css("width", $re.attr("width"));
	
	//by bpf 2013-10-16 start(去掉单元格空隙)
	//tab.cellSpacing="1pt";
	tab.cellSpacing="0";
	//by bpf 2013-10-16	end

	jQuery(this.div).css("width", $re.attr("width"));
	//tab.className="ListStyle";
	$tab.attr("class", "ListStyle");
	
	var tbody = this.createByName("tbody");	
	//tab.appendChild(tbody);	
	$tab.append(tbody);

	var rows = $re.children();
	var size = rows.length;
	var tempi = 0;				//记录奇偶行
	var _aligns;				//每列对齐样式
	var _hrefs;				//每列的链接
	var _colids;				//链接列的参数
	var _targets;				//每列链接的目标框架
	var _keys;				//主键列
	var row;
	var celstr;
	var titlestrs;
	var currentDocId = 0;
	var _widths;
	var _heights;
	
	if(this.recordCount==0){
		var tr =jQuery(this.createByName("tr"));
		tr.addClass("e8EmptyTR");
		var td = jQuery(this.createByName("td"));
		td.css("text-align","center").css("height","30px").css("color","#000").attr("colspan",hSize);
		var infoMsg=SystemEnv.getHtmlNoteName(3558,readCookie("languageidweaver"));
		td.html(infoMsg);
		tr.append(td);
		jQuery(tbody).append(tr);
		jQuery(".xTable_info").remove();
	}
	
	for(var i = 0;i<size;i++){		
		//表头
		if(rows[i].tagName=="head"){
			var heads = jQuery(rows[i]).children();
			
			var hSize = heads.length;			
		
			_aligns = new Array(hSize);
			_hrefs = new Array(hSize);
			_targets = new Array(hSize);
			_colids = new Array(hSize);
			_keys = new Array(hSize);
			_widths = new Array(hSize);
			_heights = new Array(hSize);
			var __coli = 0;
			
			titlestrs = new Array(hSize);
			
			for(var hi=0;hi<hSize;hi++){
				if(heads[hi].tagName!="col"){
					continue;
				}
				
				_hrefs[__coli] = jQuery(heads[hi]).attr("href");
				_targets[__coli] = jQuery(heads[hi]).attr("target");
				_keys[__coli] = jQuery(heads[hi]).attr("key");

				titlestrs[__coli] = jQuery(heads[hi]).attr("text");
				_widths[__coli] = jQuery(heads[hi]).attr("cusWidth");
				_heights[__coli] = jQuery(heads[hi]).attr("cusHeight");
				__coli++;
			}
		
			if(this.havaOperates=="true"){
			}

			continue;
		}
		
		if(rows[i].tagName!="row"){	
			continue;	
		}

		tempi ++;
		if(tempi == 1){
		    row = this.createByName("tr");
		}

		var cels = jQuery(rows[i]).children();
		var cSize = cels.length;

		var __coli = 0;
		var __optIds = new Array(cSize);
		
 		var cel = this.createByName("td");
 		var $cel = jQuery(cel);
		
		//TD29472 注销此行 相册中显示的高度被固定,无法显示出全部的缩略图
 		if (this.isCellThumbnailDis) {
 			cel.style.height = "30px";
 			if(jQuery.browser.msie){
 				cel.style.height = "150px";
 			}
 		}
		//End TD29472 
 		if (this.isCellThumbnailDis && !(this.isPageAutoWrap==1||this.isPageAutoWrap=="1")) {
			$cel.css("text-Overflow", "ellipsis");
			$cel.css("white-Space", "nowrap");
			$cel.css("word-Break", "keep-all");
			$cel.css("overflow", "hidden");
 		}else{
 			$cel.css("word-break", "break-all");
 			$cel.css("word-wrap", "break-word");
 		}
   		celstr = "<div class='e8BGImg'></div>";
   		var _tdstyle= this.isCellThumbnailDis && !(this.isPageAutoWrap==1||this.isPageAutoWrap=="1") ? " style=\"display:inline-block;word-break:keep-all;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:100%;\" " : " style=\"word-wrap:break-word;word-break:break-all;\"";
		//行
		for(var j = 0;j<cSize;j++){
			var $celj = jQuery(cels[j]);
			if(cels[j].tagName=="col"){
			
				var __nowId = ($celj.attr("linkvalue")==null)?$celj.attr("text"):$celj.attr("linkvalue");
				
				var showvalue=$celj.attr("showvalue");
				var isChecked = ($celj.attr("checked")=="true"?true:false);
				
				//checkbox
				if ($celj.attr("type")=="checkbox") {//checkbox
					if (_xtable_checkedList.contains(__nowId)||isChecked)	{		
						checkboxArrays[i] = "_xTable_"+__nowId;
					}
					 
					celstr = celstr + "<input type=checkbox name=chkInTableTag id=_xTable_"+__nowId+" checkboxId="+__nowId+"  value=\""+showvalue+"\"  onClick=_xtalbe_chkCheck(this)>";					
					
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;
					}

					//check
					if (isChecked){

					}
					__coli++;				
					continue ;				
				
				} else if ($celj.attr("type")=="radio") {//radio
				
					if (_xtalbe_radiocheckId == __nowId||isChecked)	{
						
						celstr = celstr + "<input type=radio name=rdoInTableTag  radioId="+__nowId+" checked id=_xTable_"+__nowId+" value=\""+showvalue+"\" onClick=rdoCheck(this)>";
					    
					} else {
						
						celstr = celstr + "<input type=radio name=rdoInTableTag radioId="+__nowId+" id=_xTable_"+__nowId+" value=\""+showvalue+"\" onClick=rdoCheck(this)>";
					    
					}
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;
					}
					__coli++;
					continue ;
				
				} else if ($celj.attr("type")=="none") {
					
					celstr = celstr + "&nbsp;<input type=checkbox  style='display:none' id="+__nowId+" value=\""+showvalue+"\">";// xwj for td2180 20050818
					
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;	
					}
					
					__coli++;
					continue ;
				} else if ($celj.attr("type")=="officalDoc") {
					
					if (_xtable_checkedList.contains(__nowId)||isChecked)	{		
						checkboxArrays[i] = "_xTable_"+__nowId;
					}
					if(false && jQuery(cels[j]).attr("type2")=="none"){
						celstr = celstr + "&nbsp;<input type=checkbox  style='display:none' id="+__nowId+" value="+showvalue+">";// xwj for td2180 20050818
					}else{
						celstr = celstr + "<div style='text-align:center;display:none;'><input type=checkbox name=chkInTableTag id=_xTable_"+__nowId+" checkboxId="+__nowId+"  value=\""+showvalue+"\"  onClick=_xtalbe_chkCheckThumbnail(this)></div>";
					}

					/*var imgsrc = jQuery(cels[j]).attr("imgsrc");
			        //显示图片
			        celstr = "<table class='e8ThumbnailImg' cellpadding=\"1\" style=\"border:1px solid #DDD;border-collapse:collapse\">" +
			        		 "<tr><td style=\"width:96px;height:96px;text-align:center\">" +
			        		 "<img src='"+imgsrc+"'>" +
			        		 "</td></tr>" +
			        		 "</table>" +
			        		 celstr;*/
			        celstr = "<div class='e8ThumbnailImg e8OfficalDoc'>"+
				        		 "<div class='e8OfficalDocInner'>"+
				        		 	"<div class='e8OfficalDocTitle' title='#_titledocsubject#'>#_docsubject#</div>"+//显示docsubject
				        		 	"<div><div class='e8OfficalDocContent' title='#_docnumber#'><span style='padding-left:15px;'>#_docnumber#</span></div>"+//显示文号
				        		 		"<div class='e8OfficalDocContent' title='#_docisuser#'><span style='padding-left:15px;'>#_docisuser#</span></div>"+//显示签发人
				        		 	"</div>"+
				        		 "</div>"+
				        	 "</div>"
			        		 +celstr
			        		 	
			        		 
				
					__coli++;
					continue ;
				}
				
				//是否为主键
				if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
					__optIds[__coli] = __nowId;	
				}
				if(_hrefs[__coli]!=null){
				
					var str = $celj.text();
					if (_targets[__coli]=="_fullwindow"){
						_tdstyle+="margin-bottom:10px;";
						if(str.indexOf("</a>")!=-1){
							
						}else{
							if(__nowId!=""){
								var tempUrl = _hrefs[__coli]+this.getAttendChar(_hrefs[__coli])+jQuery(cels[j]).attr("linkkey")+"="+__nowId;
								var options = {cusWidth:_widths[__coli],cusHeight:_heights[__coli]};
								str = "<a href=\"javascript:this.openFullWindowForXtable('"+tempUrl+"',this,{cusWidth:"+_widths[__coli]+",cusHeight:"+_heights[__coli]+"})\""  + _tdstyle + ">"+ jQuery(cels[j]).text()+"</a>";
							}
						}
					} else {
					     if(__nowId!=""){
							 str = "<a href=\""+_hrefs[__coli]+this.getAttendChar(_hrefs[__coli])+jQuery(cels[j]).attr("linkkey")+"="+__nowId+
							       "\" target=\""+_targets[__coli]+"\" " + _tdstyle + ">"+jQuery(cels[j]).text()+"</a>";
					     }
					}
					
					//celstr = celstr + "<span style='margin-bottom:10px;'>"+str+"<span>";
					if(celstr.match(/#_docsubject#/)){
						celstr = celstr.replace(/#_titledocsubject#/g,jQuery(str).text());
						celstr = celstr.replace(/#_docsubject#/g,str);
					}else if(celstr.match(/#_docnumber#/)){
						celstr = celstr.replace(/#_docnumber#/g,str);
					}else if(celstr.match(/#_docisuser#/)){
						celstr = celstr.replace(/#_docisuser#/g,str);
					}
					
				} else {
				    var str = $celj.text();
				    
				    //if(celstr.substr(celstr.length-4)!="<br>") celstr = celstr + "<br>";
					//celstr = celstr + "<span style='margin-bottom:10px;'>"+str+"<span>";
					if(celstr.match(/#_docsubject#/)){
						celstr = celstr.replace(/#_titledocsubject#/g,jQuery(str).text());
						celstr = celstr.replace(/#_docsubject#/g,str);
					}else if(celstr.match(/#_docnumber#/)){
						celstr = celstr.replace(/#_docnumber#/g,SystemEnv.getHtmlNoteName(3582,readCookie("languageidweaver"))+str);
					}else if(celstr.match(/#_docisuser#/)){
						celstr = celstr.replace(/#_docisuser#/g,SystemEnv.getHtmlNoteName(3583,readCookie("languageidweaver"))+str);
					}
					
				}
				
				__coli++;
				
			} else if (cels[j].tagName=="operates"){
			
				//显示操作栏				
				var optStrAll="";

				//var opas = cels[j].childNodes;
				var opas = jQuery(cels[j]).children();
				for(var opti = 0;opti<opas.length;opti++){
					var opa = opas[opti];
					var $opa = jQuery(opa);
					var text = $opa.attr("text");
					var href = $opa.attr("href");
					var target = $opa.attr("target");
					var linkkey = $opa.attr("linkkey");
					var value = $opa.attr("value");
					var otherpara = $opa.attr("otherpara");
					var options = {cusWidth:$opa.attr("width"),cusHeight:$opa.attr("height")};
					if(otherpara==null)otherpara="";
					var operateStr="";
					if (href!=null) {				
						var operateStrLower = href.toLowerCase(); 				
						var pos =operateStrLower.indexOf("javascript:");						
						if (pos != -1)  {
							var strJavaScript="";
							var posBracketStart = href.lastIndexOf("(");
							var posBracketEnd = href.lastIndexOf(")");	
							var strInBracket = href.substring(posBracketStart+1,posBracketEnd);
							
							if (strInBracket.replace(/(^\s*)|(\s*$)/g, "")=="") {  //删除空格
								strJavaScript = href.substring(0,posBracketEnd)+"\""+value+"\",\""+otherpara+"\",this"+href.substring(posBracketEnd);		
							} else {
								strJavaScript = href.substring(0,posBracketEnd)+",\""+value+"\",\""+otherpara+"\",this"+href.substring(posBracketEnd);		
							}
							//operateStr = "<a href='"+strJavaScript+"'>"+text+"</a>";
							if(jQuery.browser.msie){
								operateStr = "<a href='#' onclick='"+strJavaScript+"'>"+text+"</a>";
							}else{
								operateStr = "<a href='#' onclick='"+strJavaScript+";return false;'>"+text+"</a>";
							}
						} else {
							if (target=="_fullwindow") {
								var tempStr = href+"?"+linkkey+"="+value;					
								operateStr = "<a href=javascript:this.openFullWindowForXtable('"+tempStr+"',this,{cusWidth:"+$opa.attr("width")+",cusHeight:"+$opa.attr("height")+"})>"+text+"</a>";	
							} else {
								operateStr = "<a href="+href+"?"+linkkey+"="+value+" target="+target+">"+text+"</a>";	
							}
						}									
					} else {
						operateStr=text;
					}
					optStrAll += "<span style='padding-left:5px;padding-right:5px;'>"+operateStr +"</span>";
				}
				celstr = celstr + "<div class='e8thumbnailop'><div style='padding-left:5px;padding-right:5px;'>" + optStrAll+"</div></div>";
     		}
		}
		
		cel.align = "center";
		
		cel.vAlign = "top";

		cel.innerHTML = celstr;
		$cel.css("position","relative");
		var thubnailImg = $cel.find("div.e8ThumbnailImg");
		var e8thumbnailop = $cel.find("div.e8thumbnailop");
		e8thumbnailop.css({
			"display":"none",
			"position":"absolute"
		});
		$cel.hover(function(){
			var $this = jQuery(this);
			var thubnailImg1 = $this.find("div.e8ThumbnailImg");
			var e8bgimg = $this.find("div.e8BGImg");
			e8bgimg.addClass("e8BGImgHover");
			thubnailImg1.addClass("e8ThumbnailImgHoverH");
			var e8thumbnailop1 = $this.find("div.e8thumbnailop");
			//e8thumbnailop1.show();
			e8thumbnailop1.css({
				"top":thubnailImg1.position().top+thubnailImg1.height()-24,
				"left":thubnailImg1.position().left+1
			});
			e8thumbnailop1.fadeIn("normal",
				function(){
					e8thumbnailop1.css({
						"top":thubnailImg1.position().top+thubnailImg1.height()-e8thumbnailop1.height()+6,
						"left":thubnailImg1.position().left+1
					});
				});
		},function(){
			var $this = jQuery(this);
			var thubnailImg1 = $this.find("div.e8ThumbnailImg");
			thubnailImg1.removeClass("e8ThumbnailImgHoverH");
			var e8bgimg = $this.find("div.e8BGImg");
			e8bgimg.removeClass("e8BGImgHover");
			var e8thumbnailop1 = $this.find("div.e8thumbnailop");
			//e8thumbnailop1.hide();
			e8thumbnailop1.fadeOut("normal");
		});
		thubnailImg.css("cursor","pointer")
				.bind("click",function(){
					var $this = jQuery(this);
					var checkbox = $this.next("div").next("div").children("span.jNiceWrapper").children("input");
					var isRadio = false;
					var _this = this;
					var tables = $cel.find("div.e8ThumbnailImgHover");
						tables.each(function(){
							if(_this===this){
							}else{
								jQuery(this).removeClass("e8ThumbnailImgHover");
							}
						});
					if(checkbox.attr("type")=="radio"){
						isRadio = true;
						var tables = jQuery(cel).find("div.e8ThumbnailImgHover");
						tables.each(function(){
							if(_this===this){
							}else{
								var $this = jQuery(this);
								$this.removeClass("e8ThumbnailImgHover");
								$this.siblings(".e8BGImg").removeClass("e8BGImgHover").removeClass("e8BGImgSel");
							}
						});
					}
					if($this.hasClass("e8ThumbnailImgHover")){
						if(checkbox.length>0){
							$this.removeClass("e8ThumbnailImgHover");
							$this.siblings(".e8BGImg").removeClass("e8BGImgSel");
							if(isRadio && checkbox.length>0){
								changeRadioStatus(checkbox,false);
							}else if(checkbox.length>0){
								changeCheckboxStatus(checkbox,false);
							}
						}
					}else{
						if(checkbox.length>0){
							$this.addClass("e8ThumbnailImgHover");
							$this.siblings(".e8BGImg").addClass("e8BGImgSel");
							if(isRadio && checkbox.length>0){
								changeRadioStatus(checkbox,true);
							}else if(checkbox.length>0){
								changeCheckboxStatus(checkbox,true);
							}
						}
					}
				});
		
		cel.width = (100 / this.imageNumberPerRow).toString()+"%";
		celstr = "";
		
		jQuery(row).append(cel);
		if((tempi % this.imageNumberPerRow == 0 && tempi>1)||tempi==size-1){
		    if((tempi==size-1)&&(tempi%this.imageNumberPerRow!=0)){
		        for(var bi=0;bi< this.imageNumberPerRow - (tempi % this.imageNumberPerRow) ; bi++){
		            var nullcel = this.createByName("td");
		            nullcel.innerHTML = "&nbsp;";
		            //row.appendChild(nullcel);
		            jQuery(row).append(nullcel);
		        }
		        jQuery(tbody).append(row);
		    } else {
    		    //tbody.appendChild(row);
		    	jQuery(tbody).append(row);
    		    row = this.createByName("tr");
    		}
		}
	}

	//是否是重新加载
	if(this.tableDiv.firstChild!=null){
//		this.tableDiv.removeChild(this.tableDiv.firstChild);
		jQuery(this.tableDiv).empty();
	}
	//this.tableDiv.appendChild(tab);	
	jQuery(this.tableDiv).append(tab);
	if((this.page=="true"||this.page=="TRUE"||this.page=="Y")&&this.recordCount!=0){
		//this.div.appendChild(this.infoDiv);
		jQuery(this.div).append(this.infoDiv);
		if (this.isShowTopInfo){
			this.infoDivTop.innerHTML =  this.buildInfo("top");  //1:top 2:buttom
		}
		if (this.isShowBottomInfo){
			this.infoDiv.innerHTML =  this.buildInfo("buttom");	
		}
		this.tableInfoDiv.innerHTML =  this.buildInfo("tableInfoDiv");
		try{
			var pageId = this.pageId;
			if(!pageId){
				pageId = jQuery("#pageId").val();
			}
			jQuery("#pageSizeSel0").selectForK13({
				"width":"40px",
				pageSize:this.pagesize,
				pageId:pageId,
				callback:savePageSize,
                isWrap:false
			});
			jQuery("#pageSizeSel1").selectForK13({
				"width":"40px",
				pageSize:this.pagesize,
				pageId:pageId,
				callback:savePageSize,
                isWrap:false
			});
		}catch(e){
		}
	}

	this.loading = false;
	this.loadOver();
	
	//checked checkbox
	for (var i=0;i<checkboxArrays.length ;i++ )	{
		var temp = checkboxArrays[i];
		if (temp!=null&&temp!=this.pagesize)	{	
			var tempobj = document.getElementById(temp);
			if (tempobj.tagName=="INPUT")	{
				tempobj.checked=true;				
				//tempobj.parentElement.parentElement.className = "Selected"
				thumbnailSelected(tempobj);
			}
		}
	}
	try{
		//缩略图
		jQuery("IMG[src^='/weaver/weaver.splitepage.transform.SptmForThumbnail?fileid=']").live({
			  click: function() {
			  		selectImg(this);
			  },
			  mouseover: function() {
			  		showPreview(event);
			  		//showborder(this);
			    	jQuery(this).parents("table:first").css("border","1px solid #558ed5");
			  },
			  mouseout:function(){
			  		hidePreview(event);
			  		//hideborder();
			  		jQuery(this).parents("table:first").css("border","1px solid #ddd");
			  }
		});
	}catch(e){
		//console.log(e);
	}
	try {
		weaverTableCallbackFunction();
	} catch (e) {
		window.setTimeout(function(){
			try {
				weaverTableCallbackFunction();
			} catch (e) {}
		},300);
	}
	try{
		jQuery('div#_xTable').jNice();
	}catch(e){
		window.setTimeout(function(){
			try{
				jQuery('div#_xTable').jNice();
			}catch(e){}
		},300);
	}
	
	try{
		jQuery("input[type=checkbox]").each(function(){
			if(jQuery(this).attr("tzCheckbox")=="true"){
				jQuery(this).tzCheckbox({labels:['','']});
			}
		});
	}
	catch(e){
		window.setTimeout(function(){
			try{
				jQuery("input[type=checkbox]").each(function(){
					if(jQuery(this).attr("tzCheckbox")=="true"){
						jQuery(this).tzCheckbox({labels:['','']});
					}
				});
			}catch(e){}
		},300);
	}
	
	try{
		var callbackpara = {
			pageNum : this.pageNum,
			nowPage : this.nowPage,
			recordCount : this.recordCount
		};
		//当列表加载完成后调用一个处理函数
		afterDoWhenLoaded(callbackpara);
	}catch(e){
		window.setTimeout(function(){
			try{
				var callbackpara = {
					pageNum : this.pageNum,
					nowPage : this.nowPage,
					recordCount : this.recordCount
				};
				//当列表加载完成后调用一个处理函数
				afterDoWhenLoaded(callbackpara);
			}catch(e){
				if(window.console)console.log(e);
			}
		},300);
	}
	

}
/* edited by ll end */


weaverTable.prototype.showData = function(re){
	var delayedFunctions=[];
	var $re = jQuery(re);
	this.page = $re.attr("page");
	this.pageId = $re.attr("pageId");
	this.pageNum = $re.attr("pagenum");
	this.nowPage = $re.attr("nowpage");
	this.isFromFromMode = $re.attr("isFromFromMode")=="true";
	this.isPageAutoWrap = $re.attr("isPageAutoWrap");
	var tbodyIframe = null;
	try{
		tbodyIframe = window.frames["rightMenuIframe"].document.getElementById("menuTable");
	}catch(e)
	{
		tbodyIframe = "";
	}
	
	//操作菜单异步加载提示
	var loadingAsync = jQuery("div#loadingAsycForPage");
	try{		
		if(loadingAsync.length==0){
			loadingAsync = jQuery("<div id='loadingAsycForPage'></div>").css({
				"width":"18px",
				"height":"18px",
				"background-image":"url(/images/loading-small_wev8.gif)",
				"background-repeat":"no-repeat",
				"display":"none",
				"position":"absolute",
				"top":"0px",
				"left":"0px"
			});
			jQuery(document.body).append(loadingAsync);
		}
	}catch(e){
	}
	/*
	if(tbodyIframe!=""&&tbodyIframe!=null){
	if(tbodyIframe.cells != undefined) {    // 使用右键菜单
		if(parseInt(this.nowPage)==1){	
			for(var i = 0; i < tbodyIframe.cells.length; i++) {
				//var val = tbodyIframe.cells[i].outerHTML;
				var val = jQuery(tbodyIframe.cells[i]).html();
				if(val.indexOf("新建首页") > 0 || val.indexOf("新建首頁") > 0 || val.indexOf("Newfirst page") > 0) {
					continue;
				}
				if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
				if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
			}	
		}
		if(parseInt(this.pageNum)==1){
			for(var i = 0; i < tbodyIframe.cells.length; i++) {
				//var val = tbodyIframe.cells[i].outerHTML;
				var val = jQuery(tbodyIframe.cells[i]).html();
				if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
				if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
			}
		}
	}else{// 不使用右键菜单
		if(parseInt(this.nowPage)==1){
			for(var i = 0; i < tbodyIframe.children.length; i++) {
				//var val = tbodyIframe.children[i].outerHTML;
				var val = jQuery(tbodyIframe.children[i]).html();
				if(val.indexOf("新建首页") > 0 || val.indexOf("新建首頁") > 0 || val.indexOf("Newfirst page") > 0) {
					continue;
				}
				if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
				if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
			}
		}
		if(parseInt(this.pageNum)==1){	
			for(var i = 0; i < tbodyIframe.children.length; i++) {
				//var val = tbodyIframe.children[i].outerHTML;
				var val = jQuery(tbodyIframe.children[i]).html();
				if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
				if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
			}
		}
	}
	}
	*/
	this.primarykeylist = new Array();
	
	this.recordCount = $re.attr("recordCount");
	this.tabletype = $re.attr("tabletype");
	this.orderValue = $re.attr("orderValue");
	this.orderType = $re.attr("orderType");
	this.pagesize=$re.attr("pagesize");
	this.havaOperates = $re.attr("havaOprates");
	this.operatesWidth = $re.attr("operatesWidth");
	this.needPage = $re.attr("needPage");
	//added by wcd 2015-10-19
	this.rowClick = $re.attr("rowClick");
	// checkbox ids arrays
	var checkboxArrays = new  Array(this.pagesize);
	var tab = this.createByName("table");
	var $tab = jQuery(tab);
	//重置计数器
	$tab.resetTableMax();
	if (this.isCellThumbnailDis) {
		$tab.css("table-layout","fixed");
	}
	
	$tab.css("width", $re.attr("width"));
	
	//by bpf 2013-10-16 start(去掉单元格空隙)
	tab.cellSpacing="0";
	//by bpf 2013-10-16	end

	this.valign=$re.attr("valign");
    if (this.valign==null) this.valign="middle"

	/*tab.onmousemove = this.mouseMove;
	tab.onmouseup = this.mouseUp;
	tab.onmousedown = this.mouseDown;
	//onmouseover
	tab.onmouseover=function (e){
		try{
			var evt = e ? e:(window.event?window.event:null);
			var targetObj = evt.srcElement ? evt.srcElement : evt.target;
			var targetObjParent = null;
			if (targetObj.tagName == "TD") {
				targetObjParent = jQuery(targetObj).parent(); 
			}else if( targetObj.tagName == "A" || (targetObj.tagName == "INPUT"&&targetObj.name!="_allselectcheckbox")){
				targetObjParent = jQuery(targetObj).closest("tr");
			}
			
			 
			
			// tr (每行鼠标移上去样式)
			targetObjParent.addClass("Selected");
		}catch(e){
			//TODO
		}
	};
	//onmouseout
	tab.onmouseout=function (e){	
		try{
			var evt = e ? e:(window.event?window.event:null);
			var targetObj = evt.srcElement ? evt.srcElement : evt.target;
			if (targetObj.tagName == "TD"||targetObj.tagName == "A" ||(targetObj.tagName == "INPUT"&&targetObj.name!="_allselectcheckbox")){		
				var p = null;
				if (targetObj.tagName == "TD") {
					p = jQuery(targetObj).parent()[0];
				} else {
					p = jQuery(targetObj).closest("tr").get(0);
				}
				jQuery(p).removeClass("Selected");
			
			}else{
				jQuery(".hover").remove();
			}
		}catch(e){
			//TODO
			alert(e);
		}
	};*/
	
	jQuery(this.div).css("width", $re.attr("width"));
	$tab.attr("class", "ListStyle");	
	var thead = this.createByName("thead");
	var tbody = this.createByName("tbody");	
	var colgroup = this.createByName("colgroup");
	$tab.append(colgroup);
	$tab.append(thead);
	$tab.append(tbody);
	

	//操作列
	var optNameColumn = null;

	var rows = jQuery(re).children();
	var size = rows.length;
	var tempi = 0;				//记录奇偶行
	var _aligns;				//每列对齐样式
	var _hrefs;				//每列的链接
	var _colids;				//链接列的参数
	var _targets;				//每列链接的目标框架
	var _keys;				//主键列
	var _widths;
	var _heights;
	var _needTitles=[];				
	var _definedCssRender=window._cssRender;
	var _renderFns=[];	
	var _spans = [];//用于遮罩处理
	for(var i = 0;i<size;i++){	
		
		//表头
		if(rows[i].tagName=="head"){
			var hd = this.createByName("tr");
			jQuery(hd).attr("class", "HeaderForXtalbe");
			
			var heads = jQuery(rows[i]).children();
			
			var hSize = heads.length;			
		
			_aligns = new Array(hSize);
			_hrefs = new Array(hSize);
			_targets = new Array(hSize);
			_colids = new Array(hSize);
			_keys = new Array(hSize);
			_widths = new Array(hSize);
			_heights = new Array(hSize);
			var __coli = 0;		
			
			var editPlugins=[];
			
			if(this.recordCount==0){
				var tr =jQuery(this.createByName("tr"));
				tr.addClass("e8EmptyTR");
				var td = jQuery(this.createByName("td"));
				td.attr("colspan",hSize);
				td.css("text-align","center");
				td.css("height","30px");
				td.css("color","#000");
				var infoMsg=SystemEnv.getHtmlNoteName(3558,readCookie("languageidweaver"));
				td.html(infoMsg);
				tr.append(td);
				jQuery(tbody).append(tr);
				jQuery(".xTable_info").remove();
			}
			
			/*
			表头循环
			*/
			var colTotalWidth = 0;
			var hasCheckbox = false;
			for(var hi=0;hi<hSize;hi++){	
				if(heads[hi].tagName!="col"){
					continue;
				}
				var hdi = this.createByName("th");	
				var col = this.createByName("col");
				jQuery(hdi).css("height", "30px");
				if (this.isCellThumbnailDis) {
					jQuery(hdi).css("text-overflow", "ellipsis").css("white-space", "nowrap")
						.css("word-break", "keep-all")
						.css("overflow", "hidden");
				}
				var _xtb = this;
				//排序操作
				var  hid = jQuery(heads[hi]).attr("orderkey");
				
				if(hid!=null){
					hdi.id = hid;
					//hdi.onclick=function(){_xtb.orderByCol(this);};
					jQuery(document.body).delegate("th","mouseup",function(e){
						var $this = jQuery(this);
						//alert(__weaverTableNamespace__.getCurrentTarget().css("cursor"));
						//console.log(jQuery(this).css("cursor"));
						if(e.which===1 && $this.attr("_canSort")){
							try{
								if(!__weaverTableNamespace__.getCurrentTarget() ||__weaverTableNamespace__.getCurrentTarget().css("cursor")!=="e-resize"){
									_xtb.orderByCol(this);
								}
							}catch(e){
								_xtb.orderByCol(this);
							}
						}
					});
					jQuery(hdi).attr("_canSort","true");
					 /*if(readCookie("languageidweaver")==8) 
					    hdi.title="click order by this"
					 if(readCookie("languageidweaver")==9) 
					    hdi.title="單擊按此列排序"
				     else 
						hdi.title="单击按此列排序"
						*/
						hdi.title = SystemEnv.getHtmlNoteName(3441,readCookie("languageidweaver"));
				}
				//宽度
				var colWidth = 0;
				var $headhi = jQuery(heads[hi]);
				var $col = jQuery(col);
				if($headhi.attr("width")!=null){
					//hdi.width = jQuery(heads[hi]).attr("width");
					jQuery(hdi).width($headhi.attr("width"));
					$col.width($headhi.attr("width"));
					try{
						var headW = $headhi.attr("width");
						if(headW&&!this.isFromFromMode){
							var fixNum = false;
							if(headW.indexOf("px")!=-1){
								fixNum = true;
							}
							headW = parseInt(headW.replace(/[%a-zA-Z]/g,""));
							if(fixNum){
								headW = Math.round(headW/jQuery(window).width());
							}
							if(headW<1)headW = 1;
							while(headW>100){
								headW = headW/10;
							}
							headW = Math.round(headW)+"%";
						}
						$col.attr("width",headW);
						$col.attr("_itemid",hi).attr("");
						$col.attr("_systemid",$headhi.attr("systemid"))
						jQuery(hdi).attr("_itemid",hi).attr("_systemid",$headhi.attr("systemid"));
					}catch(e){
						try{
							col.width = $headhi.attr("width");
						}catch(ex){}
					}
					colWidth =  $headhi.attr("width").replace(/[%a-zA-Z]/g,"");
					//hdi.width = 100;
				}	
				
				var needCol = true;
				if($headhi.attr("hide")=="true" || $headhi.attr("display")=="none"){
					//hdi.style.display ="none";
					jQuery(hdi).css("display", "none");
					jQuery(col).css("display", "none");
					jQuery(col).attr("_display","none");
					//needCol = false;
				}else{
					colTotalWidth += parseInt(colWidth);
				}	
				//对齐
				var __align  = $headhi.attr("align");			
				if (__align==null)	{
					__align="left";
				}
				/*if(__align!=null){
					hdi.align=__align;
				}*/				
				_aligns[__coli] = __align;
				jQuery(hdi).attr("align", __align);
				jQuery(hdi).attr("class",$headhi.attr("rowClass"));
				
				_hrefs[__coli] = $headhi.attr("href");
				_targets[__coli] = $headhi.attr("target");
				_keys[__coli] = $headhi.attr("key");
				_widths[__coli] = $headhi.attr("cusWidth");
				_heights[__coli] = $headhi.attr("cusHeight");
				
				_needTitles.push($headhi.attr("needTitle"));
				_colids[__coli] = hid;
				__coli++;
				
				var _istr = $headhi.attr("text");
				var algorithmdesc = $headhi.attr("algorithmdesc");
				
				
				
				//bpf start 2013-10-14
				var _renderFn;
				var renderId=$headhi.attr("id");
				if(renderId==null || renderId==undefined){
					renderId=$headhi.attr("column");
				}
				
				if(renderId!=null && renderId!=undefined){
					if(_definedCssRender!=null && _definedCssRender!=undefined){
						_renderFn=_definedCssRender[renderId];
					}		
				}
				if(_renderFn==undefined ){
					_renderFn=null;
				}
				_renderFns.push({renderId:renderId,_renderFn:_renderFn});
				
				
				
				//bpf end 2013-10-14
				var editPluginI=jQuery(heads[hi]).attr("editPlugin");
				if( (editPluginI==null || editPluginI==undefined) && jQuery(heads[hi]).attr("type")=="checkbox"){
					editPluginI={
						type:"checkbox",
						name:"chkInTableTag"
					};
				}
				editPlugins.push(editPluginI);
				
				
				//alert(_istr)
				//排序
				if(this.orderValue!=null&&this.orderValue==hid){
					if(this.orderType=="DESC"){
						if (window.ActiveXObject) {
							_istr += "<span class=\"xTable_order xTable_order_desc\">"+ this.getOrderButton("-") +"</span>";
						} else {
							_istr += "<span class=\"xTable_order_desc\" style=\"overflow:hidden;padding-left:5px;\">"+ "▼" +"</span>";
						}
					}else{
						if (window.ActiveXObject) {
							_istr += "<span class=\"xTable_order xTable_order_asc\">"+ this.getOrderButton("+") +"</span>";
						} else {
							_istr += "<span class=\"xTable_order_asc\" style=\"overflow:hidden;padding-left:5px;\">"+ "▲" +"</span>";
						}
						
					}
				}else if(hid!=null){
					_istr+="&nbsp;";
				}else{
					if(algorithmdesc){
						_istr="<span>"+_istr+"</span>"+"<span class=\"xTable_algorithmdesc\" title="+algorithmdesc+"><img src='/images/info_wev8.png' style='vertical-align:top;'/></span>"
					}
				}
				
				var otherWidth = 0;
				
				//-----------------------------
				// 当此列需要排序时,title的显示
				//-----------------------------
				var tabTitleStr = "";
				if (hdi.title != undefined && hdi.title != null && hdi.title != ""  ) {
					tabTitleStr = _istr.replace("&nbsp;", "").replace("", "") + "(" + hdi.title + ")";
				} else {
					tabTitleStr = _istr.replace("&nbsp;", "");
				}
				if (this.isCellThumbnailDis) {
					//-----------------------------
					// 当此列为checkbox时的处理
					//-----------------------------
					if ((_istr.indexOf("checkbox") != -1 || _istr.indexOf("CHECKBOX") != -1) && _istr.indexOf("notfirstcolumn") == -1) {
						tabTitleStr = "";
						hdi.width = "35px";// checkbox modified by bpf 2013-11-07
						jQuery(hdi).css("width","35px").css("max-width","35px").css("text-overflow","inherit");
						jQuery(col).css("width","35px").css("max-width","35px").attr("width","35px");
						if(colTotalWidth==0){
							if(this.isFromFromMode) {
								otherWidth += 35;
							} else {
								colTotalWidth+=3;
							}
						}
						hasCheckbox = true;
					}
					var spanExist = _istr.toLowerCase().indexOf("<span");
					if (spanExist != -1) {
						tabTitleStr = _istr.substring(0, spanExist);
					}
					
					
					//表头增加check框特殊处理
					if( _istr.indexOf("notfirstcolumn") > -1){
						var tempindex = _istr.indexOf(">");
						if(tempindex > -1)
							tabTitleStr = _istr.substring(tempindex + 1);
					}
				}
				
				
				hdi.title = tabTitleStr;
				hdi.innerHTML = _istr;//这里显示表头中的文字
				
				jQuery(hd).append(hdi);
				if(needCol){
					jQuery(colgroup).append(col);
				}
				
			}
			if(this.havaOperates=="true"){
				if(this.isFromFromMode) {
					otherWidth +=35;
				} else {
					colTotalWidth += 2;
				}
			}
			var leftColWidth = 0;
			if(this.isFromFromMode) {
				var splitPageContiner = $("#splitPageContiner");
				var allwidth = splitPageContiner.width() - otherWidth;
				var cols = jQuery(colgroup).children("col[_display!='none']");
				cols.each(function(idx,obj){
					if(!hasCheckbox || idx!=0){
						var width = jQuery(obj).attr("width");
						if(width){
							width = parseInt(width.replace(/\D/g,""));
							var newWidth = Math.round(allwidth*width/colTotalWidth);
						
							jQuery(obj).css("width",newWidth+"px");
							try{
								jQuery(obj).attr("width",newWidth+"px");
							}catch(e){
								try{
									obj.width = newWidth+"px";
								}catch(ex){}
							}
						}
					}
				});
			} else {
			
			if(colTotalWidth<100){
				leftColWidth = 100-colTotalWidth;
				var cols = jQuery(colgroup).children("col[_display!='none']");
				var length = cols.length;
				if(hasCheckbox){
					length = length - 1;
				}
				var pointWidth = 0;
				cols.each(function(idx,obj){
					if(!hasCheckbox || idx!=0){
						var width = jQuery(obj).attr("width");
						//var width = jQuery(obj).css("width");
						if(width){
							width = parseInt(width.replace(/\D/g,""));
							var newWidth = leftColWidth/length;
							pointWidth += newWidth - Math.floor(newWidth*100)/100;

							if(idx==cols.length-1){
								newWidth = Math.floor(newWidth)+Math.round(pointWidth);

							}else{
								newWidth = Math.floor(newWidth);


							}
							jQuery(obj).css("width",(width+newWidth)+"%");
							try{
								jQuery(obj).attr("width",(width+newWidth)+"%");
							}catch(e){
								try{
									obj.width = (width+newWidth)+"%";
								}catch(ex){}
							}
						}
					}
				});
			}else if(colTotalWidth>100){
				leftColWidth = colTotalWidth - 100;
				var cols = jQuery(colgroup).children("col[_display!='none']");
				var length = cols.length;
				if(hasCheckbox){
					length = length - 1;
				}
				var pointWidth = 0;
				cols.each(function(idx,obj){
					if(!hasCheckbox || idx!=0){
						var $this = jQuery(this);
						var width = $this.attr("width");
						if(width){
							width = parseInt(width.replace(/\D/g,""));
							var newWidth = leftColWidth/length;
							/*pointWidth += newWidth - Math.floor(newWidth*100)/100;
							if(idx==cols.length-1){
								newWidth = Math.floor(newWidth)+Math.round(pointWidth);
							}else{
								newWidth = Math.floor(newWidth);
							}*/
							$this.css("width",(width-newWidth)+"%");
							try{
								$this.attr("width",(width-newWidth)+"%");
							}catch(e){
							
							}
						}
					}
				});
			}
			}
			
			jQuery(tab).data("editPlugins",editPlugins);
			
			
			//操作列的表头
			if(this.havaOperates=="true"){
				var optCol = this.createByName("th");
				var optColw = this.createByName("col");
				jQuery(optCol).attr("class", "Header");
				optNameColumn = optCol;
				if (false && this.operatesWidth!=null){
					optCol.width=this.operatesWidth;
					jQuery(optColw).css("width",this.operatesWidth);
				}else{
					jQuery(optCol).css("width","35px");
					jQuery(optColw).css("width","35px");
				}	
				jQuery(colgroup).append(optColw);
				//bpf 2013-10-15 start
				//操作列不再显示
				jQuery(hd).append(optCol);
				//bpf 2013-10-15 end
			}
			if (this.isCellThumbnailDis) {
				if (optCol != undefined && optCol != null) {
					optCol.title = optCol.innerHTML;
				}
			}
			//thead.appendChild(hd);
			jQuery(thead).append(hd);
			// 表头下面的线
			var lineAfterHead = this.createByName("tr");
			jQuery(lineAfterHead).attr("class", "Line");

			var tempTD= this.createByName("th");
			tempTD.colSpan=50;		
			lineAfterHead.appendChild(tempTD);		
			//tbody.appendChild(lineAfterHead);
			continue;
		}		
		if(rows[i].tagName!="row"){	
			continue;	
		}
		tempi ++;
		
		$tab.addTableMax();
		var row = this.createByName("tr");
		var $row = jQuery(row);
		var $rowi = jQuery(rows[i]);
		$row.hover(function(){
			jQuery(this).addClass("Selected");
		},function(){
			jQuery(this).removeClass("Selected");
		});
		$row.css("vertical-align", this.valign);
		//row.style.verticalAlign =this.valign;
		if($rowi.attr("PageCount")=="true"){
			$row.addClass("e8PageCountClass");
		}
		if($rowi.attr("TotalCount")=="true"){
			$row.addClass("e8TotalCountClass");
		}
		if($rowi.attr("firstRow")=="true"){
			$row.addClass("e8FirstCountClass");
		}
		var cels = $rowi.children();
		var  cSize = cels.length;
		var __coli = 0;
		var __optIds = new Array(cSize);
		
		var _tdstyle= this.isCellThumbnailDis && !(this.isPageAutoWrap==1||this.isPageAutoWrap=="1") ? " style=\"display:inline-block;word-break:keep-all;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;\" " : " style=\"word-wrap:break-word;word-break:break-all;\"";
		
		
		//bpf start 2013-10-14
		for(var j = 0;j<_renderFns.length;j++){
			_renderFns[j].value=jQuery(cels[j]).text();
		}		
		var _rowDatas={};
		jQuery.each(_renderFns,function(){
			var _renderId=this.renderId;
			var _value=this.value;
			if(_renderId!=null && _renderId!=undefined){
				_rowDatas[_renderId]=_value;
			}
		});
		//bpf end 2013-10-14
		
		//行
		//cSize 为每一行的列数
		for(var j = 0;j<cSize;j++){
			var $celj = jQuery(cels[j]);
			if(cels[j].tagName=="col"){
				var __nowId = ($celj.attr("linkvalue")==null)?$celj.attr("text"):$celj.attr("linkvalue");			
				var cel = this.createByName("td");
				var $cel = jQuery(cel);
				var _name = $celj.attr("name");
				if(_name){
					$cel.attr("name",_name);
				}
 				//TD高度设置
				//cel.style.height = "30px";
				$cel.css("height", "30px");
				
				try{
					if(jQuery(heads[j]).attr("hide")=="true"){
						//hdi.style.display ="none";
						$cel.css("display", "none");
					}
				}catch(ee22){}
				
				var celTitle = "";
				
				var showvalue=$celj.attr("showvalue");
				var isChecked = ($celj.attr("checked")=="true"?true:false)				
				
				
				//bpf start 2013-10-14
				try{
					var _renderFn=_renderFns[j]._renderFn;
					if(_renderFn!=null){
						var returnVal=_renderFn(_rowDatas);
						if(returnVal!=null && returnVal!=undefined){
							if(typeof returnVal=="string"){
								$cel.addClass(returnVal);
							}else{
								var csses=returnVal.css;
								if(csses!=null && csses!=undefined){
									for(var c in csses){
										$cel.css(c, csses[c]);
									}
								}
								var className=returnVal.className;
								if(className!=null && className!=undefined){
									$cel.addClass(className);
								}
							}
						}
					}
				}catch(e){}
				//bpf end 2013-10-14
				var css=$celj.attr("css");
				if(css!=null && css!=undefined){
					var jsonCss=jQuery.parseJSON(css);
					var styles=jsonCss.map;
					var classnames=jsonCss.classnames;
					for(var style in styles){
						$cel.css(style,styles[style]);
					}
					jQuery.each(classnames,function(){
						$cel.addClass(this+"");
					});
				}
				
				var tdClass=$celj.attr("tdClass");
				if(tdClass!=null && tdClass!=undefined){
					$cel.addClass(tdClass);
				}	
				
				//是否为主键
				if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
					//this.ckcolids += "," + __nowId;	
					this.primarykeylist.push(__nowId);
				}
				//checkbox	
				if ($celj.attr("type")=="checkbox") {		
//xxxxxx			
					try{		
						if(showvalue.indexOf("</a>")!=-1){
							showvalue = jQuery(showvalue).text();
						}
						showvalue = showvalue.replace(/'|"/g,"");
					}catch(e){}
					if (_xtable_checkedList.contains(__nowId)||isChecked)	{		
						checkboxArrays[i] = "_xTable_"+__nowId;						
					} 
					cel.innerHTML ="<input type=checkbox name=chkInTableTag id=_xTable_"+__nowId+" checkboxId="+__nowId+"  value=\""+showvalue+"\"  onClick=_xtalbe_chkCheck(this)>";					
					//row.appendChild(cel);
					
					
					$row.append(cel);
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;	
					}

					//check
					if (isChecked){

					}
					__coli++;				
					continue ;				
				} else if ($celj.attr("type")=="radio") {		//radio		
					if (_xtalbe_radiocheckId == __nowId||isChecked)	{					
						cel.innerHTML ="<input type=radio name=rdoInTableTag  radioId="+__nowId+" checked id=_xTable_"+__nowId+" value=\""+showvalue+"\" onClick=rdoCheck(this)>";
					} else {
						cel.innerHTML ="<input type=radio name=rdoInTableTag radioId="+__nowId+"  id=_xTable_"+__nowId+"  value=\""+showvalue+"\"  onClick=rdoCheck(this)>";
					}
					//row.appendChild(cel);
					$row.append(cel);
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;	
					}
					__coli++;
					continue ;
				} else if ($celj.attr("type")=="none") {
					cel.innerHTML ="&nbsp;<input type=checkbox  style='display:none' id='"+__nowId+"' checkboxId=\""+showvalue+"\" value=\""+showvalue+"\">";// xwj for td2180 20050818				
					if (this.tabletype=="none"){
						//cel.style.display="none";
						$cel.css("display", "none");
					}
					//row.appendChild(cel);
					$row.append(cel);
					$cel.css("width","3%");// checkbox modified by bpf 2013-11-07
					//是否为主键
					if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
						__optIds[__coli] = __nowId;	
					}
					__coli++;	
					continue ;
				}
							
				if(_aligns[__coli]!=null){
					cel.align=_aligns[__coli];	
				}
				//是否为主键
				if(_keys[__coli]=="true"||_keys[__coli]=="TRUE"||_keys[__coli]=="Y"){
					__optIds[__coli] = __nowId;	
				}
				
				if(_hrefs[__coli]!=null){				
					var str = "";
					if(_hrefs[__coli].indexOf("javascript:")==-1){
					if (_targets[__coli]=="_fullwindow"){
						var thref = _hrefs[__coli];
						if(thref=="/hrm/resource/HrmResource.jsp")
						{
							if(__nowId!=""&&__nowId!="0"){
								
								str = "<a href='javaScript:openhrm("+__nowId+");' onclick='pointerXY(event);' " + _tdstyle + ">"+ $celj.text()+"</a>";
							}
						}
						else
						{
							if(__nowId!=""){
								var tempUrl = _hrefs[__coli]+this.getAttendChar(_hrefs[__coli])+$celj.attr("linkkey")+"="+__nowId;
								var options = {cusWidth:_widths[__coli],cusHeight:_heights[__coli]};
								if ($celj.text().indexOf("<a") != -1 || $celj.text().indexOf("<A") != -1) {
									str = "<span href=\"javascript:this.openFullWindowForXtable('"+tempUrl+"',this,{cusWidth:"+_widths[__coli]+",cusHeight:"+_heights[__coli]+"})\" " + (this.isCellThumbnailDis ? "" : "") + ">"+ $celj.text().substring(0, 2) + _tdstyle + $celj.text().substr(2) +"</span>";
								} else {
									str = "<a href=\"javascript:this.openFullWindowForXtable('"+tempUrl+"',this,{cusWidth:"+_widths[__coli]+",cusHeight:"+_heights[__coli]+"})\" " + _tdstyle + ">"+ $celj.text()+"</a>";
								}
							}
						}
						
					} else {
						if(__nowId!=""){
							 str = "<a href=\""+
							  _hrefs[__coli]+this.getAttendChar(_hrefs[__coli])+$celj.attr("linkkey")+"="+__nowId+
							  "\" target=\""+_targets[__coli]+"\" " + _tdstyle + ">"+				
							  $celj.text()+
								  "</a>";
						}
					}
					}else{
						if(__nowId!=""){
							 var tempurl=_hrefs[__coli].replace("{0}",__nowId);
							 str = "<a href=\""+tempurl+"\""+_tdstyle +">"+$celj.text()+"</a>";
						}
					}
					cel.innerHTML = str;
				}else{
					var celValue=$celj.text();
					var editPlugin = $celj.attr("editPlugin");
					var canEdit = $celj.attr("canedit");
					$cel.addEditPlugin({celValue:celValue,editPlugin:editPlugin,rowIndex:i-1,delayedFunctions:delayedFunctions},canEdit,this.isFromFromMode);
					
					//---------------------
					// 当td中为纯文本时
					//---------------------
					if (this.isCellThumbnailDis) {

						if(($rowi.attr("PageCount")=="true"||$rowi.attr("TotalCount")=="true") && j==1){
							$cel.css("text-align","right");
							$cel.css("color","rgb(120,119,117");
						}
						if($rowi.attr("PageCount")=="true"){
							$cel.css("color","rgb(120,119,117");
						}
						if(!!$cel.text() && $cel.text().match(/browserValue/)){
						}else{
							if(this.isPageAutoWrap==1||this.isPageAutoWrap=="1"){
								$cel.css("word-wrap", "break-word");
								$cel.css("word-break", "break-all");
							}else{
								$cel.css("white-space", "nowrap");
								$cel.css("text-overflow", "ellipsis");
								$cel.css("word-break", "keep-all");
								$cel.css("overflow", "hidden");
							}
							
						}
						

					}
				}
				var tempTitleStr = "";
				if ($celj.text().toLowerCase().indexOf("<a") != -1) {
					var astartIndex = $celj.text().indexOf(">");
					var aendIndex = $celj.text().indexOf("</");
					tempTitleStr = $celj.text().substring(astartIndex + 1, aendIndex);
				} else {
					tempTitleStr = $celj.text().replace(new RegExp("<br>","gm"), " ");
				}
				
				if (tempTitleStr.toLowerCase().indexOf("<span") != -1) {
					var astartIndex = tempTitleStr.indexOf(">");
					var aendIndex = tempTitleStr.indexOf("</");
					tempTitleStr = tempTitleStr.substring(astartIndex + 1, aendIndex);
					
					astartIndex = tempTitleStr.indexOf(">");
					if (astartIndex != -1) {
						tempTitleStr = tempTitleStr.substr(astartIndex + 1);
					}
				}
				if (this.isCellThumbnailDis) {
					if(!!$celj.text() && $celj.text().match(/browserValue/)){
					}else{
						if(!$cel.attr("_notitle")){
							if(this.isPageAutoWrap==1||this.isPageAutoWrap=="1"){
								
							}else{
								cel.title = removeHTMLTag($celj.text());
							}
						}
					}
				
					if ($cel.children("Table").length != 0) {
						var innerTr = jQuery($cel.children("Table")[0]).children("Tbody").children("TR");
						$cel.css("height", 38 + innerTr.length * 32 + "px");
					} 
				}
				__coli++;
				$row.append(cel);
				if(_needTitles[j]==true || _needTitles[j]=="true"){
					$cel.addClass("needTitle");
				}
			} else if (cels[j].tagName=="operates"){
				//显示操作栏				
				var optCol = this.createByName("td");
				
				var optTextCnt = "";			
				
				var optStrAll="";

				var opas = $celj.children();
				
				var opAsync = $celj.attr("async");
				var md5Str = $celj.attr("_md5");
				
				var optLength=opas.length;
				if(optLength!=0){
					for(var opti = 0;opti<opas.length;opti++){
						var opa = opas[opti];
						var $opa = jQuery(opa);
						var text = $opa.attr("text");
						var title = text;
						var href = $opa.attr("href");
						var target = $opa.attr("target");
						var linkkey = $opa.attr("linkkey");
						var value = $opa.attr("value");
						var otherpara = $opa.attr("otherpara");
						var async = $opa.attr("async");
						var _indexid = $opa.attr("index");
						var options = {cusWidth:$opa.attr("cusWidth"),cusHeight:$opa.attr("cusHeight")};
						if(otherpara==null)otherpara="";
						
						var operateStr="";
						var isABtn=false;
						if (href!=null) {				
							var operateStrLower = href.toLowerCase(); 				
							var pos =operateStrLower.indexOf("javascript:");						
							if (pos != -1)  {
								var strJavaScript="";
								var posBracketStart = href.lastIndexOf("(");
								var posBracketEnd = href.lastIndexOf(")");	
								var strInBracket = href.substring(posBracketStart+1,posBracketEnd);
								
								if (strInBracket.replace(/(^\s*)|(\s*$)/g, "")=="") {  //删除空格
									strJavaScript = href.substring(0,posBracketEnd)+"\""+value+"\",\""+otherpara+"\",this"+href.substring(posBracketEnd);		
								} else {
									strJavaScript = href.substring(0,posBracketEnd)+",\""+value+"\",\""+otherpara+"\",this"+href.substring(posBracketEnd);		
								}
								if(jQuery.browser.msie){
									operateStr = "<a href='#' _indexid='"+_indexid+"' onclick='"+strJavaScript+"' title=" + title + "><span class='operHoverSpan operHover_hand'>&nbsp;"+text+"&nbsp;</span></a>";
								}else{
									operateStr = "<a href='#' _indexid='"+_indexid+"' onclick='"+strJavaScript+";return false;' title=" + title + "><span class='operHoverSpan operHover_hand'>&nbsp;"+text+"&nbsp;</span></a>";
								}
							} else {
								var tempStr = "";
								if(href.indexOf("?") > -1){
						           tempStr = href+"&"+linkkey+"="+value;	
						        }else{
						           tempStr = href+"?"+linkkey+"="+value;
						        }			
								if (target=="_fullwindow") {													
									operateStr = "<a _indexid='"+_indexid+"' href=javascript:this.openFullWindowForXtable('"+tempStr+"',this,{cusWidth:"+jQuery(opa).attr("width")+",cusHeight:"+jQuery(opa).attr("height")+"}) title=" + title + "><span class='operHoverSpan operHover_hand'>&nbsp;"+text+"&nbsp;</span></a>";	
								} else {
									operateStr = "<a _indexid='"+_indexid+"' href="+tempStr+" target="+target+" title=" + title + "><span class='operHoverSpan operHover_hand'>&nbsp;"+text+"&nbsp;</span></a>";	
								}
							}									
							isABtn=true;
						} else {
							operateStr="<span class='operHoverSpan' _md5='"+md5Str+"'>&nbsp;"+text+"&nbsp;</span>";
						}
						//当是文件时,不允许下载
						var regexStr = /doDownload\(\"[0-9]*\",\"1\",this\)/;
                        if(regexStr.test(operateStr)){
                            operateStr = '';
						}
						optStrAll +=operateStr;
						optTextCnt += text + " ";
					}
					$row.append(optCol);
					jQuery(optCol).addClass("hoverOptCell")
						.css("text-align","center")
						.css("vertical-align","middle").css("line-height","30px")
						.html("<div class='e8operate' async="+async+" _md5='"+md5Str+"'>&nbsp;</div>");
					
					
					var hoverDiv=jQuery("<div class='hoverDiv' async="+opAsync+" _md5='"+md5Str+"'>&nbsp;&nbsp;&nbsp;" +optStrAll +"&nbsp;&nbsp;&nbsp;</div>");
					$row.data("hoverDiv",hoverDiv);
					hoverDiv.data("relatedRow",jQuery(row));
					
					jQuery(optCol).children("div.e8operate").hover(
						function(e){
							var $this = jQuery(this);
							var async = $this.attr("async");
							if((async!==false && async!=="false") || $this.attr("_loaded")){
								var _row = $this.closest("tr");
								jQuery(".hoverDiv").hide();
								var rowHoverDiv=jQuery(_row).data("hoverDiv");
								jQuery(row).parent().parent().before(rowHoverDiv);
								var topHeight=jQuery(_row).offset().top;
								if(rowHoverDiv.lastRowHoverDivWidth && rowHoverDiv.lastRowHoverDivWidth>jQuery(rowHoverDiv).width()){
									jQuery(rowHoverDiv).width(rowHoverDiv.lastRowHoverDivWidth);
								}else{
									rowHoverDiv.lastRowHoverDivWidth = jQuery(rowHoverDiv).width();
								}
								var _rowHeight = jQuery(_row).height();
								var _marginTop = jQuery(_row).offset().top-jQuery(_row).parent().parent().offset().top;
								if(window.__weaverTableNamespace__){
									var contentTable = __weaverTableNamespace__.getContentTable();
									if(contentTable && contentTable.length>0){
										var _ctop = contentTable.perfectScrollbar("getScrollTop");
										//console.log("ctop::"+_ctop);
										_marginTop -= _ctop;
									}
								}
								//console.log(_marginTop);
								if(_rowHeight>32){
									_marginTop = _marginTop+_rowHeight-32;
									_rowHeight=32;
	
								}
								rowHoverDiv.css("height",_rowHeight+"px");
								rowHoverDiv.css("line-height",_rowHeight+"px");
								rowHoverDiv.css("width",jQuery(rowHoverDiv).width()+"px");
								//rowHoverDiv.css("margin-top",_marginTop);
								var _table = jQuery("#_xTable div.table");
								var scroll = null;
								var scrollLeft = 0;
								var scrollTop = 0;
								try{
									if(_table.attr("_oriScrollbar")){
										scroll = jQuery("#_xTable table.ListStyle").offset();
										scrollLeft = scroll.left;
										scrollTop = scroll.top;
									}
								}catch(e){}
								if(!_table.attr("_oriScrollbar")){
									scrollLeft = 0;
									scrollTop = 0;
								}
								rowHoverDiv.css("margin-left",(jQuery(row).width()-jQuery(rowHoverDiv).width()+scrollLeft)+"px");
								rowHoverDiv.css("margin-top",_marginTop+scrollTop);
								rowHoverDiv.show();
								var _this = this;
								jQuery(_this).hide();
								rowHoverDiv.hover(function(){
									jQuery(this).data("relatedRow").addClass("Selected");
									jQuery(_this).hide();
								},function(){
									jQuery(this).data("relatedRow").removeClass("Selected");
									jQuery(this).hide();
									jQuery(_this).show();
								});
							}else{
								var _this = this;
								jQuery.ajax({
									url:"/weaver/weaver.common.util.taglib.SplitPageXmlServlet?src=getOperateStatus&md5="+$this.attr("_md5"),
									dataType:"json",
									beforeSend:function(){
										if(loadingAsync){
											try{
												loadingAsync.css("top",$this.offset().top+9).css("left",$this.offset().left-18).css("display","block");
											}catch(e){
											}
										}
									},
									complete:function(){
										if(loadingAsync){
											loadingAsync.hide();
										}
									},
									error:function(){
										top.Dialog.alert("error!");
									},
									success:function(data){
										if(data.msg){
											top.Dialog.alert(data.msg);
											return;
										}
										var _row = $this.closest("tr");
										jQuery(".hoverDiv").hide();
										var rowHoverDiv=jQuery(_row).data("hoverDiv");
										var operates = rowHoverDiv.children("a");
										operates.each(function(i,obj){
											var _$this = jQuery(this);
											var index = _$this.attr("_indexid")
											if(data["index_"+index]===false || data["index_"+index]==="false"){
												_$this.remove();
											}
										});
										$this.attr("_loaded",true);
										jQuery(row).parent().parent().before(rowHoverDiv);
										
										var topHeight=jQuery(_row).offset().top;
										if(rowHoverDiv.lastRowHoverDivWidth && rowHoverDiv.lastRowHoverDivWidth>jQuery(rowHoverDiv).width()){
											jQuery(rowHoverDiv).width(rowHoverDiv.lastRowHoverDivWidth);
										}else{
											rowHoverDiv.lastRowHoverDivWidth = jQuery(rowHoverDiv).width();
										}
										var _rowHeight = jQuery(_row).height();
										var _marginTop = jQuery(_row).offset().top-jQuery(_row).parent().parent().offset().top;
										if(window.__weaverTableNamespace__){
											var contentTable = __weaverTableNamespace__.getContentTable();
											if(contentTable && contentTable.length>0){
												var _ctop = contentTable.perfectScrollbar("getScrollTop");
												//console.log("ctop::"+_ctop);
												_marginTop -= _ctop;
											}
										}
										//console.log(_marginTop);
										if(_rowHeight>32){
											_marginTop = _marginTop+_rowHeight-32;
											_rowHeight=32;
			
										}
										rowHoverDiv.css("height",_rowHeight+"px");
										rowHoverDiv.css("line-height",_rowHeight+"px");
										
										var _table = jQuery("#_xTable div.table");
										var scroll = null;
										var scrollLeft = 0;
										var scrollTop = 0;
										try{
											if(_table.attr("_oriScrollbar")){
												scroll = jQuery("#_xTable table.ListStyle").offset();
												scrollLeft = scroll.left;
												scrollTop = scroll.top;
											}
										}catch(e){}
										if(!_table.attr("_oriScrollbar")){
											scrollLeft = 0;
											scrollTop = 0;
										}
										rowHoverDiv.css("margin-left",(jQuery(row).width()-jQuery(rowHoverDiv).width()+scrollLeft)+"px");
										rowHoverDiv.css("margin-top",_marginTop+scrollTop);
										rowHoverDiv.show();
										jQuery(_this).hide();
										rowHoverDiv.hover(function(){
											jQuery(this).data("relatedRow").addClass("Selected");
											jQuery(_this).hide();
										},function(){
											jQuery(this).data("relatedRow").removeClass("Selected");
											jQuery(this).hide();
											jQuery(_this).show();
										});
									}
								});
							}
						},function(e){
						}
					);
					$row.bind("mouseleave",function(e){
						var evt = e ? e:(window.event?window.event:null);
						var targetObj = jQuery(evt.toElement ? evt.toElement : evt.relatedTarget);
						jQuery(this).find("div.e8operate").show();
						if (targetObj.hasClass("hoverDiv") || targetObj.parent().hasClass("hoverDiv") || targetObj.parent().parent().hasClass("hoverDiv")) {
							
						}else{
							if(targetObj.closest("td.hoverOptCell").length==0){
								jQuery(this).data("hoverDiv").hide();
							}
						}
						/*if(window.event){
							window.event.cancelBubble = true ;
							return false;
						}else{
							evt.stopPropagation();
							evt.preventDefault()
						}*/
					});
					//bpf 2013-10-15 end
				}else if(this.havaOperates=="true"){
					$row.append(optCol);
				}
				
				if (this.isCellThumbnailDis) {
					try {
						if (parseInt(optNameColumn.width.replace("px"),"") < (optTextCnt.length * 11)) {
							optNameColumn.width = (optTextCnt.length * 11) + "px";
						}
					} catch (e) {}
				}
     		}
		}		
		//tbody.appendChild(row);
		jQuery(tbody).append(row);
		//added by wcd 2015-10-19
		if($rowi.attr("rowClick")!="") {
			$row.attr('onclick', '').click(eval("0,(function(){"+$rowi.attr("rowClick")+";});"));
		}
		var trSpacing = jQuery("<tr class='Spacing' style='height:1px!important;'></tr>")
		var tdSpacing = jQuery("<td></td>");
		var divSpacing = jQuery("<div class='intervalDivClass'></div>");
		if(jQuery(rows[i]).attr("PageCount")=="true"){
			trSpacing.addClass("e8PageCountSpacingClass");
		}else if(jQuery(rows[i]).attr("TotalCount")=="true"){
			trSpacing.addClass("e8TotalCountSpacingClass");
		}else{
			tdSpacing.append(divSpacing);
		}
		var hiddenLength = 0;
		$row.children("td").each(function(){
			if(jQuery(this).css("display")=="none"){
				hiddenLength++;
			}
		});
		tdSpacing.attr("colspan",$row.children("td").length-hiddenLength);
		trSpacing.append(tdSpacing);
		if(i!=size-1){
			if(i==size-3 && jQuery(rows[i+1]).attr("PageCount")=="true"){
				tdSpacing.addClass("paddingLeft0Table");
			}else{
				tdSpacing.addClass("paddingLeft0Table");
			}
			
		}else{
			tdSpacing.addClass("paddingLeft0Table");
		}
		jQuery(tbody).append(trSpacing);
		/*对于样式,移动到最后来处理*/
		//处理整行的样式
		var generatedRowStyle=jQuery(rows[i]).attr("css");
		if(generatedRowStyle!=null && generatedRowStyle!=undefined){
			var jsonCss=jQuery.parseJSON(generatedRowStyle);
			var styles=jsonCss.map;
			var classnames=jsonCss.classnames;
			var lastVisibleTD = null;
			jQuery(row).children("td").each(function(){
				if(jQuery(this).css("display")!="none"){
					lastVisibleTD = this;
				}
			});
			for(var style in styles){
				jQuery(lastVisibleTD).css(style,styles[style]);
			}
			jQuery.each(classnames,function(){
				jQuery(row).addClass(this+"");
			});
		}
	}
	// 最后一行 是一条线
	var lineAfterLast = this.createByName("tr");
	//lineAfterLast.className="xTable_line";
	jQuery(lineAfterLast).attr("class", "xTable_line");
	
	

	var tempTD= this.createByName("th");
	tempTD.colSpan=50;		
	
	jQuery(lineAfterLast).append(tempTD);

	
	
	//是否是重新加载/
	if(this.tableDiv.firstChild!=null){
//		this.tableDiv.removeChild(this.tableDiv.firstChild);
		jQuery(this.tableDiv).empty();
	}
	jQuery(this.tableDiv).append(tab);
	
	
	if((this.page=="true"||this.page=="TRUE"||this.page=="Y")&&this.recordCount!=0){
		//this.div.appendChild(this.infoDiv);
		jQuery(this.div).append(this.infoDiv);
		if (this.isShowTopInfo){
			this.infoDivTop.innerHTML =  this.buildInfo("top");  //1:top 2:buttom
		}
		if (this.isShowBottomInfo){
			this.infoDiv.innerHTML =  this.buildInfo("buttom");	
		}
		this.tableInfoDiv.innerHTML =  this.buildInfo("tableInfoDiv");	
		try{
			var pageId = this.pageId;
			if(!pageId){
				pageId = jQuery("#pageId").val();
			}
			jQuery("#pageSizeSel0").selectForK13({
				"width":"40px",
				pageSize:this.pagesize,
				pageId:pageId,
				callback:savePageSize,
                isWrap:false
			});
			jQuery("#pageSizeSel1").selectForK13({
				"width":"40px",
				pageSize:this.pagesize,
				pageId:pageId,
				callback:savePageSize,
                isWrap:false
			});
		}catch(e){
		}
	}

	this.loading = false;
	this.loadOver();
	
	//checked checkbox
	for (var i=0;i<checkboxArrays.length ;i++ )	{
		var temp = checkboxArrays[i];
		if (temp!=null&&temp!=this.pagesize)	{	
			var tempobj = document.getElementById(temp);
			if (tempobj.tagName=="INPUT")	{
				tempobj.checked=true;				
				jQuery(tempobj).closest("tr").attr("class", "Selected");
			}
		}
	}
	
	//处理门户里的列表开始
	try{		
		var oFrm=parent.document.frames["mainFrame"];			
		var realHeight=oFrm.document.body.scrollHeight;
		parent.document.getElementById("mainFrame").height=realHeight;		
	} catch(e){
		//alert(e)
	}
	//--门户里的列表结束
	
	jQuery("body").append(delayedFunctions.join(" "));
	
	try{
		__beforeJNice__();
	}catch(e){
	
	}
	
	//固定表头及配置可拖拽列宽
	try{
		var iscustom = jQuery("#iscustom").val();
		var formmodeFlag = jQuery("#formmodeFlag").val();
		if(formmodeFlag==1){
			if(iscustom == 1){
				if(jQuery("#pageId").length>0 && !window.__useOriScrollBar){
					__weaverTableNamespace__.init("#_xTable");
					__weaverTableNamespace__.fixHeader();
					__weaverTableNamespace__.resizeColumnWidth();
				}	
			}else{
				__weaverTableNamespace__.init("#_xTable");
				__weaverTableNamespace__.fixHeader();
			}
		}else{
			if(jQuery("#pageId").length>0 && !window.__useOriScrollBar){
				__weaverTableNamespace__.init("#_xTable");
				__weaverTableNamespace__.fixHeader();
				__weaverTableNamespace__.resizeColumnWidth();
			}
		}
	}catch(e){
		if(window.console)console.log(e+"--->weaverTable.js-->fixHeader");
	}
	
	try {
		weaverTableCallbackFunction();
	} catch (e) {
		window.setTimeout(function(){
			try {
				weaverTableCallbackFunction();
			} catch (e) {}
		},300);
	}
	try{
		jQuery('div#_xTable').jNice();
	}catch(e){
		window.setTimeout(function(){
			try{
				jQuery('div#_xTable').jNice();
			}catch(e){}
		},300);
	}
	
	try{
		beautySelect("div#_xTable select");
	}catch(e){
		window.setTimeout(function(){
			try{
				beautySelect("div#_xTable select");
			}catch(e){
				if(window.console)console.log(e+"-->weaverTable.js-->beautySelect()");
			}
		},300);
	}
	
	try{
		jQuery("input[type=checkbox]").each(function(){
			if(jQuery(this).attr("tzCheckbox")=="true"){
				jQuery(this).tzCheckbox({labels:['','']});
			}
		});
	}
	catch(e){
		window.setTimeout(function(){
			try{
				jQuery("input[type=checkbox]").each(function(){
					if(jQuery(this).attr("tzCheckbox")=="true"){
						jQuery(this).tzCheckbox({labels:['','']});
					}
				});
			}catch(e){}
		},300);
	}
	
	try{
		var callbackpara = {
			pageNum : this.pageNum,
			nowPage : this.nowPage,
			recordCount : this.recordCount
		};
		//当列表加载完成后调用一个处理函数
		afterDoWhenLoaded(callbackpara);
	}catch(e){
		window.setTimeout(function(){
			try{
				var callbackpara = {
					pageNum : this.pageNum,
					nowPage : this.nowPage,
					recordCount : this.recordCount
				};
				//当列表加载完成后调用一个处理函数
				afterDoWhenLoaded(callbackpara);
			}catch(e){
				if(window.console)console.log(e);
			}
		},300);
	}
}
//页面跳转
weaverTable.prototype.buildInfo = function(type){
	var returnStr="";
	
	if (type=="tableInfoDiv")	{
		var strExpExcel="";
		if (this.showExpExcel)	{
			 strExpExcel="<div align='right'><img title='"+SystemEnv.getHtmlNoteName(3442,readCookie("languageidweaver"))+"' onmouseover=\"javascript:this.src='/images/expExcel1_hover_wev8.png'\" onmouseout=\"javascript:this.src='/images/expExcel1_wev8.png'\" src='/images/expExcel1_wev8.png' style='cursor:pointer' onclick='javaScript:_xtable_getExcel()'>&nbsp;&nbsp;&nbsp;&nbsp;<img title='"+SystemEnv.getHtmlNoteName(3584,readCookie("languageidweaver"))+"'  onmouseover=\"javascript:this.src='/images/expExcel2_hover_wev8.png'\" onmouseout=\"javascript:this.src='/images/expExcel2_wev8.png'\" src='/images/expExcel2_wev8.png' style='cursor:pointer' onclick='javaScript:_xtable_getAllExcel()'></div>";
		}	
		returnStr="<table width=100%><tr><td><div align='left'>"+this.tableInfo+"</div></td><td>"+strExpExcel+"</td></tr> <tr class='xTable_line1'><td colspan=2></td></tr> </table>"		
		return returnStr;
	}
	var str = "";
	var pageSizeInput = this.pagesize;
	if(this.needPage=="false")return returnStr;
	if(!!jQuery("#pageId").val() || !!this.pageId){
		var pageId = this.pageId;
		if(!pageId){
			pageId = jQuery("#pageId").val();
		}
		var selPageId = "pageSizeSel";
		var spanPageId = "spanPage";
		if(type=="top"){
			selPageId+="0";
			spanPageId += "0";
		}else{
			selPageId+="1";
			spanPageId += "1";
		}
		//pageSizeInput = "<span onclick=\"jQuery('#"+selPageId+"').click();\" id=\""+spanPageId+"\" name=\""+spanPageId+"\" style=\"cursor:pointer;display: inline-block; width: 22px; height: 22px; position: absolute; top: 0px; left: 33px; background: none repeat scroll 0% 0% rgb(79, 151, 38);\" ></span>"+
		pageSizeInput = "<select class='_pageSize' id='"+selPageId+"' name='"+selPageId+"' style=\"background:transparent;border:none;width:50px;text-align:center;TEXT-DECORATION:none;height:20px;padding-right:2px;margin-left:5px;margin-right:5px;line-height:20px;display:none;\">"+
						"<option value='10'>10</option>"+
						"<option value='20'>20</option>"+
						"<option value='50'>50</option>"+
						"<option value='100'>100</option>"+
						"</select>";
        var pageSizeInputLis = "<li>10</li>"+
                        "<li>20</li>"+
                        "<li>50</li>"+
                        "<li>100</li>";
                        
        pageSizeInput = "<div class='K13_select'>"
                      + "    <div class='K13_select_checked'><input class='_pageSizeInput' AUTOCOMPLETE='off' maxLength=3 style='width:"+"40px"+";background:transparent;text-align:center;border:1px solid transparent;color:#fff;height:26px;vertical-align:top;' type='text' value='"+this.pagesize+"' name='" + selPageId + "inputText' id='" + selPageId+ "inputText'/></div><div class='K13_select_list'><ol>" + pageSizeInputLis + "</ol></div>" 
                      + "    " + pageSizeInput 
                      + "</div>"
		//pageSizeInput = "<input type=\"text\" onkeyup=\"savePageSize(event,this,'"+pageId+"');\" name=\"pagesize\" maxLength=2 value='"+this.pagesize+"' style=\"width:30px;text-align:center;TEXT-DECORATION:none;height:20px;padding-right:2px;margin-left:5px;margin-right:5px;line-height:20px\"/>";
	}
	var rightStr = "<span class=\"e8_splitpageinfo\">";
	/*if(readCookie("languageidweaver")==8) {
		//str = "&raquo; record:"+this.recordCount+"&nbsp&nbsp&nbsp current/page: "+this.nowPage+"/"+this.pageNum+"&nbsp&nbsp&nbsp ";
		//rightStr = "<span style=\"position:relative;TEXT-DECORATION:none;height:21px;padding-top:2px;\">&raquo; record:"+this.recordCount + "</span>";
		rightStr += "<span style=\"position:relative;TEXT-DECORATION:none;height:21px;padding-top:2px;\">"+pageSizeInput+"record/page&nbsp;|&nbsp;total"+this.recordCount+"records</span>";
	} else if(readCookie("languageidweaver")==9) { 
		//str = "&raquo; 共"+this.recordCount+"條記錄&nbsp&nbsp&nbsp每頁"+this.pagesize+"條&nbsp&nbsp&nbsp共"+this.pageNum+"頁&nbsp&nbsp&nbsp當前第"+this.nowPage + "頁";
		//rightStr = "<span style=\"position:relative;TEXT-DECORATION:none;height:21px;padding-top:2px;\">&raquo; 共"+this.recordCount+"條記錄&nbsp&nbsp&nbsp每頁"+pageSizeInput+"條" + "</span>";
		rightStr += "<span style=\"position:relative;TEXT-DECORATION:none;height:21px;padding-top:2px;\">"+pageSizeInput+"條/頁&nbsp;|&nbsp;共"+this.recordCount+"條</span>";
	} else { 
		//str = "&raquo; 共"+this.recordCount+"条记录&nbsp&nbsp&nbsp每页"+this.pagesize+"条&nbsp&nbsp&nbsp共"+this.pageNum+"页&nbsp&nbsp&nbsp当前第"+this.nowPage + "页";	
		//rightStr = "<span style=\"position:relative;TEXT-DECORATION:none;height:21px;padding-top:2px;\">&raquo; 共"+this.recordCount+"条记录&nbsp&nbsp&nbsp每页"+pageSizeInput+"条" + "</span>";
		rightStr += "<span style=\"position:relative;TEXT-DECORATION:none;height:21px;padding-top:2px;\">"+pageSizeInput+"条/页&nbsp;|&nbsp;共"+this.recordCount+"条</span>";
	}*/
	rightStr += "<span style=\"position:relative;TEXT-DECORATION:none;height:21px;padding-top:2px;\">"+pageSizeInput+SystemEnv.getHtmlNoteName(3585,readCookie("languageidweaver"))+"&nbsp;|&nbsp;"+SystemEnv.getHtmlNoteName(3586,readCookie("languageidweaver"))+this.recordCount+(readCookie("languageidweaver")==8?"":SystemEnv.getHtmlNoteName(3524,readCookie("languageidweaver")))+"</span>";
	rightStr += "</span>"
	
	
	//-------------------------------------------------
    // new page start 
    //-------------------------------------------------
    var sbf = "";
    var z_index = parseInt(this.nowPage) - 2;
    var y_num = parseInt(this.nowPage) + 2;
    var tempCent = "";
    var tempLeft = "";
    var tempRight = "";
	if (z_index > 1) {
        tempLeft += "<span class=\"e8_numberspan\" _jumpTo=\"" + this.id + "\" onClick=\"XTableHandler.jumpTo(this, 1)\">" + 1 + "</span>";
    }
    if (z_index > 2) {
        tempLeft += "<span class=\"e8_numberspan\">&nbsp;...&nbsp;</span>";
    }
    
    if (y_num < (this.pageNum - 1)) {
        tempRight += "<span class=\"e8_numberspan\">&nbsp;...&nbsp;</span>";
    }
    
    if (y_num < this.pageNum) {
        tempRight += "<span class=\"e8_numberspan\" _jumpTo=\"" + this.id + "\" onClick=\"XTableHandler.jumpTo(this, " + this.pageNum + ")\">" + this.pageNum + "</span>";
    }
    
    for(;z_index<=y_num; z_index++) {
        if (z_index>0 && z_index<=this.pageNum) {
            if (z_index == this.nowPage) {
                tempCent +="<span  _jumpTo=\"" + this.id + "\" onClick=\"XTableHandler.jumpTo(this, " + z_index + ")\" class=\"e8_numberspan weaverTableCurrentPageBg\" >" + z_index + "</span>";                
            } else {
                tempCent +="<span class=\"e8_numberspan\" _jumpTo=\"" + this.id + "\" onClick=\"XTableHandler.jumpTo(this, " + z_index + ")\">" + z_index + "</span>";
            }
        }
    }
    
    sbf = tempLeft + tempCent + tempRight;
	
	
	if(this.pageNum>=1){
		if(parseInt(this.nowPage)>1){
			str +="<span class=\"e8_numberspan weaverTablePrevPage weaverTablePage\" id=\""+this.id+"-pre\" onClick=\"+XTableHandler.prePage(this)\" onmouseover=\"pmouseover(this, true)\" onmouseout=\"pmouseover(this, false)\">&lt;</span>"	
			
		}else{
			str += "<span class=\"e8_numberspan weaverTablePrevPageOfDisabled weaverTablePage\">&lt;</span>";
		}
	}
	str += sbf;
	if(this.pageNum>=1){
		if(parseInt(this.nowPage)<this.pageNum){
			str +="<span class=\"e8_numberspan weaverTableNextPage weaverTablePage\" id=\""+this.id+"-next\" onClick=\"+XTableHandler.nextPage(this)\" onmouseover=\"pmouseover(this, true)\" onmouseout=\"pmouseover(this, false)\">&gt;</span>"	
		}else{
			str += "<span class=\"e8_numberspan weaverTableNextPageOfDisabled weaverTablePage\">&gt;</span>";
		}
	}	

	var tempTableInfo = this.tableInfo;
	if (type=="top"){
		/*if(readCookie("languageidweaver")==8){
			str += jumpInternational(this.id, this.nowPage, "", "PAGE", "jump", "_XTABLE_GOPAGE_top", "top",this.pageNum);
		}
		else if(readCookie("languageidweaver")==9){
			str += jumpInternational(this.id, this.nowPage, "第", "頁", "跳轉", "_XTABLE_GOPAGE_top", "top",this.pageNum);
		}else {
			str += jumpInternational(this.id, this.nowPage, "第", "页", "跳转", "_XTABLE_GOPAGE_top", "top",this.pageNum);  
		}*/
		str += jumpInternational(this.id, this.nowPage, SystemEnv.getHtmlNoteName(3587,readCookie("languageidweaver")), (readCookie("languageidweaver")==9?"&nbsp;":SystemEnv.getHtmlNoteName(3526,readCookie("languageidweaver"))),SystemEnv.getHtmlNoteName(3588,readCookie("languageidweaver")), "_XTABLE_GOPAGE_top", "top",this.pageNum);  
	} else {
		tempTableInfo = "" ;
		if(readCookie("languageidweaver")==8){
            str += jumpInternational(this.id, this.nowPage, "", "page", "GO", "_XTABLE_GOPAGE_buttom", "buttom",this.pageNum);
        } else {
            str += jumpInternational(this.id, this.nowPage, SystemEnv.getHtmlNoteName(3587,readCookie("languageidweaver")), SystemEnv.getHtmlNoteName(3526,readCookie("languageidweaver")), SystemEnv.getHtmlNoteName(3588,readCookie("languageidweaver")), "_XTABLE_GOPAGE_buttom", "buttom",this.pageNum);
        }
	}		
	str += "";	
	var strExcel="";	
	var selectAll="";
	/*if(readCookie("languageidweaver")==8){
		selectAll = "Select All";
	}else if(readCookie("languageidweaver")==9){
		selectAll = "全選";
	}else{
		selectAll = "全选";
	}*/
	selectAll = SystemEnv.getHtmlNoteName(3443,readCookie("languageidweaver"));
	str += rightStr;
	//var strExcel="<div align=left><button class=xTable_btnExcel onclick='javascript:_xtable_getExcel()'>export this</button>&nbsp;<button class=xTable_btnExcel onclick='javascript:_xtable_getAllExcel()'>export all</button></div>";
	if (this.tabletype=="checkbox"){	
			if (type=="top"){
				returnStr = "<div><table width=100%><tr><td>"+this.TopLeftText+"</td><td><div align=right><span class=\"e8_pageinfo\">"+str+"</span></div></td></tr></table></div>"
			} else {				
				returnStr = "<div><table width=100%><tr><td>"+this.BottomLeftText+" <input name='_allselectcheckbox' type=checkbox onClick='checkAllChkBox(this.checked)'> "+selectAll+"</td><td><div align=right><span class=\"e8_pageinfo\">"+str+"</span></div></td></tr></table></div>"
			}
	} else if(this.tabletype=="thumbnail"){
			if (type=="top"){
				returnStr = "<div><table width=100%><tr><td>"+this.TopLeftText+"</td><td><div align=right>"+str+"</div></td></tr></table></div>"
			} else {				
				returnStr = "<div><table width=100%><tr><td>"+this.BottomLeftText+" <input name='_allselectcheckbox' type=checkbox onClick='checkAllThumbnailBox(this.checked)'> "+selectAll+"</td><td><div align=right><span class=\"e8_pageinfo\">"+str+"</span></div></td></tr></table></div>"
			}
	} else if(this.tabletype=="thumbnailNoCheck"){
			if (type=="top"){
				returnStr = "<div><table width=100%><tr><td>"+this.TopLeftText+"</td><td><div align=right><span class=\"e8_pageinfo\">"+str+"</span></div></td></tr></table></div>"
			} else {				
				returnStr = "<div><table width=100%><tr><td>"+this.BottomLeftText+"</td><td><div align=right><span class=\"e8_pageinfo\">"+str+"</span></div></td></tr></table></div>"
			}
	} else {
		if (type=="top"){
				returnStr = "<div><table width=100%><tr><td>"+this.TopLeftText+" "+strExcel+"</td><td><div  align=right><span class=\"e8_pageinfo\">"+str+"</span></div></td></tr></table></div>"		
			} else {				
				returnStr = "<div><table width=100%><tr><td>"+this.BottomLeftText+" "+strExcel+"</td><td><div  align=right><span class=\"e8_pageinfo\">"+str+"</span></div></td></tr></table></div>"		
			}	
	}
	return returnStr;
}


//转到按钮的语言设置
function jumpInternational(id, nowPage, jTo, jPg, jJump, topOrButtom, what,pageNum) {
    var result = "";
    result += "<span style=\""+(pageNum>=1?"":"padding-left:10px;")+"float:left;TEXT-DECORATION:none;height:30px;line-height:30px;color:#666666;\">" + jTo + "</span>";
    result += "<span id=\""+id+topOrButtom+"_go_page_wrap\" style=\"float:left;display:inline-block;width:30px;height:20px;border:1px solid #FFF;margin:0px 1px;padding:0px;position:relative;left:0px;top:5px;\">";
    result += "<span id=\""+id+topOrButtom+"-goPage\" onclick=\"+XTableHandler.goPage(this,'" + what + "')\" style=\"float:left;cursor:pointer;width: 44px; height: 22px; line-height: 20px; padding: 0px; text-align: center; border: 0px; background-color: rgb(0, 99, 220); color: rgb(255, 255, 255); position: absolute; left: 0px; top: -1px; display: none;z-index:10000\">" + jJump + "</span>";
    result += "<input id=\""+ id + topOrButtom + "\" type=\"text\"  onfocus=\"+XTableHandler.focus_goPage(this)\" onkeypress=\"return weaverTable_checkInput(event);\" onblur=\"+XTableHandler.blur_goPage(this)\" value=\""+nowPage+"\" size=\"3\" onMouseOver=\"if(jQuery('#"+id+topOrButtom+"-goPage').css('display')=='none'){jQuery(this).css('border','1px solid #DDDDDD');}\" onMouseout=\"jQuery(this).css('border','1px solid transparent')\" style=\"color:#666666;width:30px;height:18px;line-height:18px;float:left;text-align:center;border:0px;position:absolute;left:0px;top:0px;outline:none;border:1px solid transparent;\"/></span>";
    result += "<span style=\"float:left;TEXT-DECORATION:none;height:30px;line-height:30px;color:#666666;padding-right:10px;\">" + jPg + "</span>"
//    result += "&nbsp;<span id=\""+id+"-goPage\" onClick=\"+XTableHandler.goPage(this,'" + what + "')\" style=\"display:inline-block;line-height:21px;cursor:pointer;background:url(/wui/theme/" + GLOBAL_CURRENT_THEME + "/skins/" + GLOBAL_SKINS_FOLDER + "/table/jump_wev8.png) no-repeat;height:21px;width:30px;margin-right:5px;text-align:center;border:none;\">" + jJump + "</span>";
    return result;
}

function pmouseover(obj, flag) {
    if (obj == undefined) {
        return;
    }
    if (flag == true) {
    	if (jQuery(obj).hasClass("weaverTableNextPage")) {
    		//obj.className = "weaverTableNextSltPage";
    		jQuery(obj).removeClass("weaverTableNextPage").addClass("weaverTableNextSltPage");
    	} else {
    		//obj.className = "weaverTablePrevSltPage";
    		jQuery(obj).removeClass("weaverTablePrePage").addClass("weaverTablePrevSltPage");
    	}
    } else {
        if (jQuery(obj).hasClass("weaverTableNextSltPage")) {
        	jQuery(obj).removeClass("weaverTableNextSltPage").addClass("weaverTableNextPage");
        } else {
        	jQuery(obj).removeClass("weaverTablePrevSltPage").addClass("weaverTablePrevPage");
        }
    }
}
//排序按钮
weaverTable.prototype.getOrderButton = function(x1){
	var ch = "";
	if(document.all){
		switch(x1){
			case "+":ch="5";break;
			case "-":ch="6";break;
		}
	}else{
		switch(x1){
			case "+":ch=">";break;
			case "-":ch="<";break;
		}
	}
	return ch;
}
//翻页按钮
weaverTable.prototype.getPageButton = function(x1,useable){
	var c = (useable?"class=\"xTable_pageua\"":"class=\"xTable_pageda\"");
	var ch = "";
	//if(readCookie("languageidweaver")==8){
		if(document.all){
			switch(x1){
				case 1:ch=SystemEnv.getHtmlNoteName(3444,readCookie("languageidweaver"));break;
				case 2:ch=SystemEnv.getHtmlNoteName(3445,readCookie("languageidweaver"));break;
				case 3:ch=SystemEnv.getHtmlNoteName(3446,readCookie("languageidweaver"));break;
				case 4:ch=SystemEnv.getHtmlNoteName(3447,readCookie("languageidweaver"));break;
			}
		}else{
			var alt = "";
			var gif = "";
			switch(x1){
				case 1:ch=SystemEnv.getHtmlNoteName(3444,readCookie("languageidweaver"));break;
				case 2:ch=SystemEnv.getHtmlNoteName(3445,readCookie("languageidweaver"));break;
				case 3:ch=SystemEnv.getHtmlNoteName(3446,readCookie("languageidweaver"));break;
				case 4:ch=SystemEnv.getHtmlNoteName(3447,readCookie("languageidweaver"));break;
			}
		}
	//}
	/*else if(readCookie("languageidweaver")==9) {
		if(document.all)
		{ 
			switch(x1)
			{ 
				case 1:ch="首頁";break; 
				case 2:ch="上一頁";break; 
				case 3:ch="下一頁";break; 
				case 4:ch="尾頁";break; 
			} 
		}
		else
		{ 
			var alt = ""; 
			var gif = ""; 
			switch(x1){ 
				case 1:ch="首頁";break; 
				case 2:ch="上一頁";break; 
				case 3:ch="下一頁";break; 
				case 4:ch="尾頁";break; 
			} 
		}
    } 
	else{
		if(document.all){
			switch(x1){
				case 1:ch="首页";break;
				case 2:ch="上一页";break;
				case 3:ch="下一页";break;
				case 4:ch="尾页";break;
			}
		}else{
			var alt = "";
			var gif = "";
			switch(x1){
				case 1:ch="首页";break;
				case 2:ch="上一页";break;
				case 3:ch="下一页";break;
				case 4:ch="尾页";break;
			}
		}
    }*/
	return str ="<span>"+ch+"</span>";
}


//显示加载信息
weaverTable.prototype.startLoad = function(){
	var message_table_Div  = document.getElementById("message_table_Div");
	//message_table_Div.style.display="inline";	
	jQuery(message_table_Div).css("display", "inline").html(SystemEnv.getHtmlNoteName(3403,readCookie("languageidweaver")));	
	/*if(readCookie("languageidweaver")==8)
    	jQuery(message_table_Div).html("Executing....");
    else if(readCookie("languageidweaver")==9)
    	jQuery(message_table_Div).html("服務器正在處理,請稍候....");
	else 
		jQuery(message_table_Div).html("服务器正在处理,请稍候....");
	*/
	var pTop= document.body.offsetHeight/2+document.body.scrollTop-50;
	var pLeft= document.body.offsetWidth/2-50;
	
//	message_table_Div.style.position="absolute"
//	message_table_Div.style.posTop=pTop;
//	message_table_Div.style.posLeft=pLeft;
	
	jQuery(message_table_Div).css("position", "absolute");
	jQuery(message_table_Div).css("top", pTop);
	jQuery(message_table_Div).css("left", pLeft);
}
//隐藏加载信息
weaverTable.prototype.loadOver = function(){
	var message_table_Div  = document.getElementById("message_table_Div");	 	
	//message_table_Div.style.display="none";	
	jQuery(message_table_Div).css("display", "none");	
}
//得到消息层的位置。
weaverTable.prototype.getPosition = function(element){
	var xy = new Array(2);
    	if ( arguments.length != 1 || element == null ) 
    	{ 
        	element = this.div;
    	} 
    	var offsetTop = element.offsetTop; 
    	var offsetLeft = element.offsetLeft; 
    	var offsetWidth = element.offsetWidth; 
    	var offsetHeight = element.offsetHeight; 
    	while( element = element.offsetParent ){ 
	        offsetTop += element.offsetTop; 
	        offsetLeft += element.offsetLeft; 
    	} 
    	offsetLeft += offsetWidth/2 - this.messageDiv.offsetWidth;
    	offsetTop += offsetHeight/2 - this.messageDiv.offsetHeight;
    	xy[0] = offsetLeft;
    	xy[1] = offsetTop;
    	return xy;
}

weaverTable.prototype.getAttendChar = function(str){
	return /\?/g.test(str)?"&":"?";
}
//排序
weaverTable.prototype.orderByCol = function(oid){
	if(this.orderValue!=null&&this.orderValue==oid.id){		
		if(this.orderType=="DESC"){			
			this.orderType = "ASC";
		}else{
			this.orderType = "DESC";
		}
	}else if(this.orderValue!=oid.id){
		this.orderType = "DESC";
	}
	this.orderValue = oid.id;
	this.reLoad();
}
//重新加载
weaverTable.prototype.reLoad = function(){
	jQuery(".hoverDiv").remove();
	this.startLoad();	
	this.load();
}

weaverTable.prototype.firstPage=function(){
	if(parseInt(this.nowPage)!=1){
		this.nowPage=0;
		this.reLoad();
	}
	if(window.frames["rightMenuIframe"]==undefined || window.frames["rightMenuIframe"]==null || window.frames["rightMenuIframe"].length==0){
		return;
	}
	/*var tbodyIframe = window.frames["rightMenuIframe"].document.getElementById("menuTable");
	if(tbodyIframe.cells != undefined) {   // 使用右键菜单
		for(var i = 0; i < tbodyIframe.cells.length; i++) {
			//var val = tbodyIframe.cells[i].outerHTML;
			var val = jQuery(tbodyIframe.cells[i]).html();
			if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = true;
			}
			if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = true;
			}
			if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = '';
			}
			if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = '';
			}
		}
	}else{// 不使用右键菜单
		for(var i = 0; i < tbodyIframe.children.length; i++) {
			//var val = tbodyIframe.children[i].outerHTML;
			var val = jQuery(tbodyIframe.children[i]).html();
			
			if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = true;
			}
			if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = true;
			}
			if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = '';
			}
			if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = '';
			}
		}
	}*/
}

weaverTable.prototype.prePage=function(){
	if(parseInt(this.nowPage)>1){
		this.nowPage--;
		this.reLoad();
	}
	this.pre();
}

weaverTable.prototype.nextPage=function(){
	if(parseInt(this.nowPage)<parseInt(this.pageNum)){
		this.nowPage++;
		this.reLoad();
	}
	this.next();
}


weaverTable.prototype.lastPage=function(){
	if(this.nowPage!=this.pageNum){
		this.nowPage=this.pageNum;
		this.reLoad();
	}
	
	if(window.frames["rightMenuIframe"]==undefined || window.frames["rightMenuIframe"]==null || window.frames["rightMenuIframe"].length==0){
		return;
	}
	
	/*var tbodyIframe = window.frames["rightMenuIframe"].document.getElementById("menuTable");
	if(tbodyIframe.cells != undefined) {    // 使用右键菜单
		for(var i = 0; i < tbodyIframe.cells.length; i++) {
			//var val = tbodyIframe.cells[i].outerHTML;
			var val = jQuery(tbodyIframe.cells[i]).html();
			if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = '';
			}
			if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = '';
			}
			if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = true;
			}
			if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
				var button = tbodyIframe.cells[i].children[0];
				button.disabled = true;
			}
		}
	}else{// 不使用右键菜单
		for(var i = 0; i < tbodyIframe.children.length; i++) {
			//var val = tbodyIframe.children[i].outerHTML;
			var val = jQuery(tbodyIframe.children[i]).html();
			if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = '';
			}
			if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = '';
			}
			if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = true;
			}
			if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
				var button = tbodyIframe.children[i];
				button.disabled = true;
			}
		}
	}*/
}

weaverTable.prototype.goPage=function(a){
	 try{
   		var flag = e8beforeJump();
   		if(!flag)return;
   }catch(e){}	
	if(a>0&&a<=this.pageNum&&a!=this.nowPage){
		this.nowPage=a;
		this.reLoad();
	}
	this.pre();
	this.next();
}

weaverTable.prototype.focus_goPage = function (id){
	var btnGo = jQuery('#'+id+"-goPage");
	jQuery('#'+id).attr('hideFocus',true);
	//btnGo.show();
	btnGo.get(0).style.display="block";
	btnGo.css('left','0px');
	jQuery('#'+id+'_go_page_wrap').css('border-color','#6694E3');
	btnGo.animate({left: '+=30'}, 50,function(){
		//$('#go_page_wrap').css('width','88px');
	});
}


weaverTable.prototype.blur_goPage = function(id){
	setTimeout(function(){
		var btnGo = jQuery('#'+id+"-goPage");
		//$('#go_page_wrap').css('width','44px');
		btnGo.animate({
		    left: '-=44'
		  }, 100, function() {
			  jQuery('#'+id+"-goPage").css('left','0px');
			  jQuery('#'+id+"-goPage").hide();
			  jQuery('#'+id+'_go_page_wrap').css('border-color','#fff');
		  });
	},400);
}

weaverTable.prototype.createByName = function(n){
	return document.createElement(n);
}


//事件监听
XTableHandler = {
	idCounter : 0,
	idPrefix  : "-weaverTable-",
	all       : {},
	getId     : function() { return this.idPrefix + this.idCounter++; },
	firstPage : function (oItem) { this.all[oItem.id.replace('-first','')].firstPage(); },	
	prePage   : function (oItem) { this.all[oItem.id.replace('-pre','')].prePage(); },
	nextPage  : function (oItem) { this.all[oItem.id.replace('-next','')].nextPage(); },
	lastPage  : function (oItem) { this.all[oItem.id.replace('-last','')].lastPage(); },
	goPage	  :function(oItem,type){			
		//跳转到第几页
		
		var nid=oItem.id.replace('-goPage','');
		var goPage ;
		if(nid.indexOf("_XTABLE_GOPAGE_")==-1){
			if (type=="top"){
				goPage = document.getElementById(nid+"_XTABLE_GOPAGE_top");
			} else {
				goPage = document.getElementById(nid+"_XTABLE_GOPAGE_buttom");
			}
		}else{
			goPage = document.getElementById(nid);
		}
		nid = nid.replace("_XTABLE_GOPAGE_top","");
		nid = nid.replace("_XTABLE_GOPAGE_buttom","");			
		 if(goPage!=null){
		 	var goone = parseInt(jQuery(goPage).val());
		 	//检查是否越界
		 	if(goone>0&&goone<=this.all[nid].pageNum&&goone!=this.all[nid].nowPage){
		 		this.all[nid].goPage(goone);
			}else{
				//重新赋值
				goPage.value=this.all[nid].nowPage;
			}
		}
	},
	focus_goPage:function(oItem){
		jQuery(oItem).css("border","1px solid transparent");
		var nid=oItem.id.replace('_XTABLE_GOPAGE_top','').replace('_XTABLE_GOPAGE_buttom','');
		this.all[nid].focus_goPage(oItem.id);
	},
	blur_goPage:function(oItem){
		var nid=oItem.id.replace('_XTABLE_GOPAGE_top','').replace('_XTABLE_GOPAGE_buttom','');
		this.all[nid].blur_goPage(oItem.id);
	},
	jumpTo  : function(obj, a) {
	   var nid = jQuery(obj).attr("_jumpTo");
	   this.all[nid].goPage(a);
	}
}

/***********************************************************/

function creatErrorStr(status,statusText,responseText){
	var returnStr ="";
	responseText=responseText.replace(/(^\s*)|(\s*$)/g, "");	
	if(responseText=="NoData"){
		returnStr=SystemEnv.getHtmlNoteName(3448,readCookie("languageidweaver"));
	} else {
		 returnStr =""+	
		"<font size=2>"+SystemEnv.getHtmlNoteName(3589,readCookie("languageidweaver"))+"<br>"+
		SystemEnv.getHtmlNoteName(3590,readCookie("languageidweaver"))+":"+status+"<br>"+
		SystemEnv.getHtmlNoteName(3591,readCookie("languageidweaver"))+":"+statusText+"<br>"+
		SystemEnv.getHtmlNoteName(3592,readCookie("languageidweaver"))+":<a href=\"javaScript:isShowErrorDiv()\""+SystemEnv.getHtmlNoteName(3593,readCookie("languageidweaver"))+"</a><br></font><br>"+
		"<div id='showerrordiv' style=\"overflow:auto;height:300px;width:100%;display:none\">"+responseText+"</div>"+
		"<hr>"+
		"<font size=2>"+SystemEnv.getHtmlNoteName(3594,readCookie("languageidweaver"))+": <br>"+
		"</font>"+
		"<UL>"+
			"<li>"+SystemEnv.getHtmlNoteName(3595,readCookie("languageidweaver"))+"<a href=javascript:location.reload()>"+SystemEnv.getHtmlNoteName(3596,readCookie("languageidweaver"))+"</a>"+SystemEnv.getHtmlNoteName(3597,readCookie("languageidweaver"))+
			"<li>"+SystemEnv.getHtmlNoteName(3598,readCookie("languageidweaver"))+"<a  href='javascript:document.URL=\"http://\"+location.host;'>"+SystemEnv.getHtmlNoteName(3599,readCookie("languageidweaver"))+"</a>)"+
			"<li>"+SystemEnv.getHtmlNoteName(3600,readCookie("languageidweaver"))+				
		"</UL>";
	}
	
   return returnStr;
}
function isShowErrorDiv(){
//	if(document.getElementById('showerrordiv').style.display=='none'){
//		document.getElementById('showerrordiv').style.display='';
//	}else{
//		document.getElementById('showerrordiv').style.display='none';
//	}
	if(jQuery("#showerrordiv").css("display") == "none"){
		jQuery("#showerrordiv").css("display", "");
	}else{
		jQuery("#showerrordiv").css("display", "none");
	}
}


function  rowOnMouseOver(obj){
	//obj.parentElement.parentElement.className = "Selected"
	//jQuery(obj).parent().parent().attr("class", "Selected");
	jQuery(obj).closest("tr").attr("class", "Selected");
	//jQuery(obj).closest("tr").next("tr.Spacing").find("div").addClass("intervalHoverClass");
}

function  rowOnMouseOut(obj){
	//var p = obj.parentElement.parentElement;
	
	/*by bpf 2013-10-29
	var p = jQuery(obj).parent().parent()[0];
	if (p.rowIndex % 2==0)	{				
		//p.className = "DataLight"
		jQuery(p).attr("class", "DataLight");
	} else {
		//p.className = "DataDark"
		jQuery(p).attr("class", "DataDark");
	}
	*/
}
/***************checkbo radio*******************************/

function checkAllChkBox(btnChecked){
    var chkboxElems= document.getElementsByName("chkInTableTag")  
    var _allselectcheckboxs = document.getElementsByName("_allselectcheckbox")
    for (i=0;i<_allselectcheckboxs.length;i++){
    	var $span = jQuery(_allselectcheckboxs[i]).next('span');
        if (btnChecked) { 
            _allselectcheckboxs[i].checked = true ;
            if(!$span.hasClass('jNiceChecked')){
             	$span.addClass('jNiceChecked');
             }
        } else {
            _allselectcheckboxs[i].checked = false ;
            if($span.hasClass('jNiceChecked')){
            	$span.removeClass('jNiceChecked');
            }
        }
   }
    for (j=0;j<chkboxElems.length;j++){
    	var $span = jQuery(chkboxElems[j]).next('span');
        if (btnChecked) {
            chkboxElems[j].checked = true ;
            if(!$span.hasClass('jNiceChecked')){	
		    	$span.addClass('jNiceChecked');
		    }
        } else {       
            chkboxElems[j].checked = false ;
            if($span.hasClass('jNiceChecked')){
	        	$span.removeClass('jNiceChecked');
	        }
        }
        _xtalbe_chkCheck(chkboxElems[j]);   
    }
    
    
}
function _xtalbe_chkCheck(obj){
 if (obj.checked){
     if (!_xtable_checkedList.contains(jQuery(obj).attr("checkboxId"))){
         _xtable_checkedList.add(jQuery(obj).attr("checkboxId"));
         _xtalbe_checkedValueList.add(jQuery(obj).attr("value"));
     }
	 //rowOnMouseOver(obj);
 } else {
     if (_xtable_checkedList.contains(jQuery(obj).attr("checkboxId"))){
         var tempPos = _xtable_checkedList.indexOf(jQuery(obj).attr("checkboxId"));
         _xtable_checkedList.setElementAt(tempPos,null);
         _xtalbe_checkedValueList.setElementAt(tempPos,null);
     }   
	  rowOnMouseOut(obj);
 }
}
function checkAllThumbnailBox(btnChecked){
    var chkboxElems= document.getElementsByName("chkInTableTag")  
    var _allselectcheckboxs = document.getElementsByName("_allselectcheckbox")  
    for (i=0;i<_allselectcheckboxs.length;i++){
    	var $span = jQuery(_allselectcheckboxs[i]).next('span');
        if (btnChecked) {
        	if(!$span.hasClass('jNiceChecked')){	
		    	$span.addClass('jNiceChecked');
		    } 
            _allselectcheckboxs[i].checked = true ;
        } else {
            _allselectcheckboxs[i].checked = false ;
		    if($span.hasClass('jNiceChecked')){
            	$span.removeClass('jNiceChecked');
            }
        }
   }
    for (j=0;j<chkboxElems.length;j++){
    	var $span = jQuery(chkboxElems[j]).next('span'); 
        if (btnChecked) {
            chkboxElems[j].checked = true ;
             if(!$span.hasClass('jNiceChecked')){	
		    	$span.addClass('jNiceChecked');
		    }
        } else {       
            chkboxElems[j].checked = false ;
            if($span.hasClass('jNiceChecked')){
	        	$span.removeClass('jNiceChecked');
	        }
        }
        _xtalbe_chkCheckThumbnail(chkboxElems[j]);   
    }
}
function _xtalbe_chkCheckThumbnail(obj){ 

 if (obj.checked){

     if (!_xtable_checkedList.contains(jQuery(obj).attr("checkboxId"))){
         _xtable_checkedList.add(jQuery(obj).attr("checkboxId"));
         _xtalbe_checkedValueList.add(jQuery(obj).attr("value"));
     }
	 thumbnailSelected(obj)
 } else {
     if (_xtable_checkedList.contains(jQuery(obj).attr("checkboxId"))){
         var tempPos = _xtable_checkedList.indexOf(jQuery(obj).attr("checkboxId"));
         _xtable_checkedList.setElementAt(tempPos,null);
         _xtalbe_checkedValueList.setElementAt(tempPos,null);
     }
	 thumbnailUnSelected(obj)
 }
}
function thumbnailSelected(obj){
	/*while(obj.tagName!="TD"){obj = jQuery(obj).parent()[0];}
	//obj.style.backgroundColor = "aliceblue";
	jQuery(obj).css("background-color", "aliceblue");*/
	jQuery(obj).closest("td").children(".e8ThumbnailImg").addClass("e8ThumbnailImgHover");
	
}
function thumbnailUnSelected(obj){
	/*while(obj.tagName!="TD"){obj = jQuery(obj).parent()[0];}
	//obj.style.backgroundColor = "";
	jQuery(obj).css("background-color", "");*/
	jQuery(obj).closest("td").children(".e8ThumbnailImg").removeClass("e8ThumbnailImgHover");
}
//radio
function rdoCheck(obj){	
	if (obj.checked) {
		_xtalbe_radiocheckId =  jQuery(obj).attr("radioId");
		_xtalbe_radiocheckValue = jQuery(obj).val();
	} else {		
		rowOnMouseOut(obj);
	}
}


function openFullWindowForXtable(url,$this,options){
  var redirectUrl = url ;
  var width = screen.availWidth ;
  var height = screen.availHeight ;
  //if (height == 768 ) height -= 75 ;
  //if (height == 600 ) height -= 60 ;
  var szFeatures = "";
  if(!!options && !!options.cusWidth){
  	if(options.cusWidth<=1){
  		options.cusWidth = options.cusWidth*screen.width;
  	}
  	szFeatures ="left="+(screen.width - options.cusWidth) / 2+"," ;
  	szFeatures +="width="+options.cusWidth+"," ;
  }else{
  	//szFeatures ="left="+(screen.width - width*2/3-50) / 2+"," ;
  	//szFeatures +="width="+width*2/3+"," ;
	szFeatures ="left=0," ;
  	szFeatures +="width="+(width-10)+"," ;
  }
  if(!!options && !!options.cusHeight){
  	if(options.cusHeight<=1){
  		options.cusHeight = options.cusHeight*screen.height;
  	}
  	szFeatures += "top="+(screen.height - options.cusHeight) / 2+"," ; 
	szFeatures +="height="+options.cusHeight+"," ; 
  }else{
  	//szFeatures += "top="+(screen.height - height*2/3-50) / 2+"," ; 
	//szFeatures +="height="+height*2/3+"," ; 
	szFeatures += "top=0," ; 
	szFeatures +="height="+(jQuery.browser.msie?height:(height-60))+"," ;
  }
  szFeatures +="directories=no," ;
  szFeatures +="status=yes," ;
  szFeatures +="menubar=no," ;
  szFeatures +="scrollbars=yes," ;
  szFeatures +="resizable=yes" ; //channelmode
  window.open(redirectUrl,"",szFeatures) ;
}
/*******************以下是功能函数***************************/
//得到checked ids
 function _xtable_CheckedCheckboxId(){
 var strSelected = "";
 for (i=0;i<_xtable_checkedList.size();i++)  {
     if  (_xtable_checkedList.get(i)==null) continue;
     strSelected += _xtable_checkedList.get(i)+",";
 }
 return strSelected;
}

 function _xtable_CheckedCheckboxIdForCP(){
 var strSelected = "";
 var checkboxs = jQuery("#_xTable").find("table.ListStyle tbody").find("input[type='checkbox'][name='chkInTableTag']:checked");
 checkboxs.each(function(){
 	 strSelected += jQuery(this).attr("checkboxid")+",";
 });
 return strSelected;
}

//得到unchecked ids
function _xtable_unCheckedCheckboxId(){
	var strSelected = "";
	var checkboxs = jQuery("#_xTable").find("table.ListStyle tbody").find("input[type='checkbox'][name='chkInTableTag']").not(":checked");
	 checkboxs.each(function(){
	 	 strSelected += jQuery(this).attr("checkboxid")+",";
	 });
	 return strSelected;
}

//得到checked values
function  _xtable_CheckedCheckboxValue(){
     var strSelected = "";
     for (i=0;i<_xtalbe_checkedValueList.size();i++)  {
         if  (_xtalbe_checkedValueList.get(i)==null) continue;
         strSelected += _xtalbe_checkedValueList.get(i)+",";
     }
	 return strSelected;    
}
function  _xtable_CheckedCheckboxValueForCP(){
     var strSelected = "";
      var checkboxs = jQuery("#_xTable").find("table.ListStyle tbody").find("input[type='checkbox'][name='chkInTableTag']:checked");
	 checkboxs.each(function(){
	 	 strSelected += jQuery(this).attr("value")+",";
	 });
 return strSelected;    
}

//得到unchecked values
function  _xtable_unCheckedCheckboxValue(){
     var strSelected = "";
      var checkboxs = jQuery("#_xTable").find("table.ListStyle tbody").find("input[type='checkbox'][name='chkInTableTag']").not(":checked");
	 checkboxs.each(function(){
	 	 strSelected += jQuery(this).attr("value")+",";
	 });
 return strSelected;    
}

//清空checked
function _xtable_CleanCheckedCheckbox(){
	while(!_xtable_checkedList.isEmpty()){
    	_xtable_checkedList.remove();
    }
    while(!_xtalbe_checkedValueList.isEmpty()){
    	_xtalbe_checkedValueList.remove();
    }
    checkAllChkBox(false);
    $GetEle("_allselectcheckbox").checked=false;
}

//得到 radio id
function _xtable_CheckedRadioId(){
    return _xtalbe_radiocheckId
}

//得到 radio value
function _xtable_CheckedRadioValue(){
    return  _xtalbe_radiocheckValue;
}

//清空 radio id
function _xtable_CleanCheckedRadio(){
    document.getElementById(_xtalbe_radiocheckId).checked=false;
    _xtalbe_radiocheckId =""; 
    _xtalbe_radiocheckValue = "";
}
 
 //得到当前页的excel
function _xtable_getExcel(){ 	
	window.location='/weaver/weaver.common.util.taglib.CreateExcelServer'
}


 //得到全部的excel
function _xtable_getAllExcel(from,objpara2){ 
	var tmpurl='/weaver/weaver.common.util.taglib.CreateExcelServer?showOrder=all';
	if(from&&from.length){
		tmpurl+="&from="+from;
	}
	if(objpara2){
		for(var s in objpara2){
			if(typeof(objpara2[s])=="function"){  
				objpara2[s]();  
			}else{  
				tmpurl+="&"+s+"="+objpara2[s];  
	        }
		}
	}
    window.location=tmpurl;
}

//
weaverTable.prototype.mouseMove = function(re){}
weaverTable.prototype.mouseUp = function(re){}
weaverTable.prototype.mouseDown = function(re){}

weaverTable.prototype.pre=function(){
	if(window.frames["rightMenuIframe"]==undefined || window.frames["rightMenuIframe"]==null || window.frames["rightMenuIframe"].length==0){
		return;
	}
	/*var tbodyIframe = window.frames["rightMenuIframe"].document.getElementById("menuTable");
	if(tbodyIframe.cells != undefined) {    // 使用右键菜单
		if(parseInt(this.nowPage)==1){			
			for(var i = 0; i < tbodyIframe.cells.length; i++) {
				//var val = tbodyIframe.cells[i].outerHTML;
				var val = jQuery(tbodyIframe.cells[i]).html();
				if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
				if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
			}
		}
		
		if(parseInt(this.nowPage)<parseInt(this.pageNum)){
			for(var i = 0; i < tbodyIframe.cells.length; i++) {
				//var val = tbodyIframe.cells[i].outerHTML;
				var val = jQuery(tbodyIframe.cells[i]).html();
				if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = '';
				}
				if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = '';
				}
			}
		}
	}else{// 不使用右键菜单
		if(parseInt(this.nowPage)==1){			
			for(var i = 0; i < tbodyIframe.children.length; i++) {
				//var val = tbodyIframe.children[i].outerHTML;
				var val = jQuery(tbodyIframe.children[i]).html();
				if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
				if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
			}
		}
		
		if(parseInt(this.nowPage)<parseInt(this.pageNum)){
			for(var i = 0; i < tbodyIframe.children.length; i++) {
				//var val = tbodyIframe.children[i].outerHTML;
				var val = jQuery(tbodyIframe.children[i]).html();
				if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = '';
				}
				if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = '';
				}
			}
		}
	}*/
}
weaverTable.prototype.next=function(){
	if(window.frames["rightMenuIframe"]==undefined || window.frames["rightMenuIframe"]==null || window.frames["rightMenuIframe"].length==0){
		return;
	}
	/*var tbodyIframe = window.frames["rightMenuIframe"].document.getElementById("menuTable");
	if(tbodyIframe.cells != undefined) {    // 使用右键菜单
		if(parseInt(this.nowPage)>=parseInt(this.pageNum)){
			for(var i = 0; i < tbodyIframe.cells.length; i++) {
				//var val = tbodyIframe.cells[i].outerHTML;
				var val = jQuery(tbodyIframe.cells[i]).html();
				if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
				if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = true;
				}
			}
		}
		if(parseInt(this.nowPage)>1){	
			for(var i = 0; i < tbodyIframe.cells.length; i++) {
				//var val = tbodyIframe.cells[i].outerHTML;
				var val = jQuery(tbodyIframe.cells[i]).html();
				if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = '';
				}
				if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
					var button = tbodyIframe.cells[i].children[0];
					button.disabled = '';
				}
			}	
		}
	}else{// 不使用右键菜单
		if(parseInt(this.nowPage)>=parseInt(this.pageNum)){
			for(var i = 0; i < tbodyIframe.children.length; i++) {
				//var val = tbodyIframe.children[i].outerHTML;
				var val = jQuery(tbodyIframe.children[i]).html();
				if(val.indexOf("下一页") > 0 || val.indexOf("下一頁") > 0 || val.indexOf("Next Page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
				if(val.indexOf("尾页") > 0 || val.indexOf("尾頁") > 0 || val.indexOf("last page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = true;
				}
			}
		}
		if(parseInt(this.nowPage)>1){	
			for(var i = 0; i < tbodyIframe.children.length; i++) {
				//var val = tbodyIframe.children[i].outerHTML;
				var val = jQuery(tbodyIframe.children[i]).html();
				if(val.indexOf("首页") > 0 || val.indexOf("首頁") > 0 || val.indexOf("first page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = '';
				}
				if(val.indexOf("上一页") > 0 || val.indexOf("上一頁") > 0 || val.indexOf("Front Page") > 0) {
					var button = tbodyIframe.children[i];
					button.disabled = '';
				}
			}	
		}
	}*/
}
function removeHTMLTag(str) {
    str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
    str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
    //str = str.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行
    str=str.replace(/&nbsp;/ig,'');//去掉&nbsp;
    str = str.replace(/&gt;/ig,">");
    str = str.replace(/&lt;/ig,"<");
	str = str.replace(/&quot;/ig,"\"");
    return str;
}

//add by bpf 2013-10-30 start
  /*jQuery(".operHoverSpan").on('mouseenter', function() {
      jQuery(this).addClass("operHoverSpan_hover");
  }).on('mouseleave', function() {
      jQuery(this).removeClass("operHoverSpan_hover");
  });*/
  jQuery(".table").delegate("operHover_hand","click",function(){
  	jQuery(this).find("a").click();
  });
 //add by bpf 2013-10-30 end
 
 
 
//add by bpf 2013-11-05 start
(function (jQuery) {
	jQuery.fn.addEditPlugin = function (options,canedit, isformmode) {
		var cell=jQuery(this);
		cell.css("vertical-align","middle");
		var celValue=options.celValue;
		var editPlugin=options.editPlugin;
		var rowIndex=options.rowIndex;
		if(editPlugin!=null && editPlugin!=undefined){
			var tempEditPlugin=window[editPlugin];
			if(tempEditPlugin==null || tempEditPlugin==undefined ){
				tempEditPlugin=editPlugin;
			}
			
			var type=tempEditPlugin.type;
			var name=tempEditPlugin.name;
			if(celValue == null || celValue==undefined ){
				celValue=tempEditPlugin.defaultValue;
			}
			if(celValue == null || celValue==undefined ){
				celValue="";
			}
			if(type==null || type==undefined){
				type="input";
			}
			if(type=="hidden"){
				var input=jQuery("<input type='hidden' value=''/>");
				if(rowIndex!=null){
					if(!!name && name.match(/#rowIndex#/)){
						name = name.replace(/#rowIndex#/,rowIndex);
					}else if(tempEditPlugin.addIndex==false){
						
					}else{
						name = name+"_"+rowIndex;
					}
				}
				input.css("width","90%");
				input.val(celValue);
				input.attr("name",name);
				cell.append(input);
		        cell.hide();		
				input.keyup(function(){
					jQuery(this).validateVal();
				});
			}else if(type=="input"){
				if(canedit=="false"){
					cell.html(celValue);
				}else{
					var input=jQuery("<input class='inputStyle' type='text' value=''/>");
					if(rowIndex!=null){
						if(!!name && name.match(/#rowIndex#/)){
							name = name.replace(/#rowIndex#/,rowIndex);
						}else if(tempEditPlugin.addIndex==false){
						}else{
							name = name+"_"+rowIndex;
						}
					}
					input.css("width","90%");
					input.val(celValue);
					input.attr("name",name);
					cell.append(input);
					
					input.keyup(function(){
						jQuery(this).validateVal();
					});
				}
				
			}else if(type=="password"){
				if(canedit=="false"){
					cell.html(celValue);
				}else{
					var input=jQuery("<input type='password' value=''/>");
					if(rowIndex!=null){
						if(!!name && name.match(/#rowIndex#/)){
							name = name.replace(/#rowIndex#/,rowIndex);
						}else if(tempEditPlugin.addIndex==false){
						}else{
							name = name+"_"+rowIndex;
						}
					}
					input.css("width","90%");
					input.val(celValue);
					input.attr("name",name);
					cell.append(input);
					
					input.keyup(function(){
						jQuery(this).validateVal();
					});
				}
				
			}else if(type=="select"){
				var select=jQuery("<select></select>");
				if(canedit=="false"){
					select.attr("disabled",true);
				}
				//select.css("width","90%");
				var options=tempEditPlugin.options;
				jQuery.each(options,function(){
					select.append("<option value='"+this.value+"'>"+this.text+"</option>");
				});
				if(rowIndex!=null){
					if(!!name && name.match(/#rowIndex#/)){
						name = name.replace(/#rowIndex#/,rowIndex);
					}else if(tempEditPlugin.addIndex==false){
					}else{
						name = name+"_"+rowIndex;
					}
				}
				
				select.val(celValue);
				select.attr("name",name);
				cell.append(select);
				
				select.change(function(){
					jQuery(this).validateVal();
				});
			}else if(type=="browser"){
				var browserOptions=tempEditPlugin.attr;
				if(!browserOptions.nameBak){
					browserOptions.nameBak = browserOptions.name;
				}else{
					browserOptions.name = browserOptions.nameBak;
				}
				if(!browserOptions.browserOnClickBak){
					browserOptions.browserOnClickBak = browserOptions.browserOnClick;
				}else{
					browserOptions.browserOnClick = browserOptions.browserOnClickBak;
				}
				if(rowIndex!=null){
					if(!!browserOptions.name && browserOptions.name.match(/#rowIndex#/)){
						browserOptions.name = browserOptions.name.replace(/#rowIndex#/g,rowIndex);
					}else if(tempEditPlugin.addIndex==false){
					
					}else{
						browserOptions.name=browserOptions.name+"_"+rowIndex;
					}
					
					if(!!browserOptions.browserOnClick && browserOptions.browserOnClick.match(/#rowIndex#/)){
						browserOptions.browserOnClick = browserOptions.browserOnClick.replace(/#rowIndex#/g,rowIndex);
					}
				}
				
				var browserKeyValues=jQuery.parseJSON(celValue);
				if(jQuery.isArray(browserKeyValues)){
					var browserValues=[];
					var browserSpanValues=[];
					jQuery.each(browserKeyValues,function(i,browserKeyValue){
						browserValues.push(browserKeyValue.browserValue);
						browserSpanValues.push(browserKeyValue.browserSpanValue);
					});
					browserOptions.browserValue=browserValues.join(",");
					browserOptions.browserSpanValue=browserSpanValues.join("__");
				}else{
					browserOptions.browserValue = "";
					browserOptions.browserSpanValue = "";
				}
				if(canedit=="false"){
					try{
						browserOptions["isMustInput"] = "0";
					}catch(e){
						if(window.console){
							console.log(e);
						}
					}
				}
				var js=cell.e8Browser(browserOptions);
				options.delayedFunctions.push(js);
				jQuery(cell).attr("_notitle",true);
			}else if(type=="checkbox"){
				var options=tempEditPlugin.options;
				if(options==null || options==undefined ){
					var checkbox=jQuery("<input type='checkbox' />");
					checkbox.val(celValue);
					checkbox.attr("name",name);
					if(canedit=="false"){
						checkbox.attr("readonly",true);
					}
					cell.append(checkbox);
				}else{
					jQuery.each(options,function(i,option){
						if(option){
							var name = option.name;
							if(rowIndex!=null && !!name){
								if(name.match(/#rowIndex#/)){
									name = name.replace(/#rowIndex#/,rowIndex);
								}else if(tempEditPlugin.addIndex==false){
								}else{
									name = name+"_"+rowIndex;
								}
							}
							var checkbox = jQuery("<input type='checkbox' />")
							checkbox.val(option.value);
							checkbox.attr("name",name);
							if(canedit=="false"){
								checkbox.attr("readonly",true);
							}
							cell.append(checkbox);
							cell.append(option.text);
							//cell.append("&nbsp;&nbsp;");
						}
					});
				}
				
				if(celValue!=null && celValue!=undefined && celValue!=""){
					var checkedValues=celValue.split(",");
					jQuery.each(checkedValues,function(i,checkedValue){
						cell.find("[value='"+checkedValue+"']").attr("checked","true");
					});
				}
				cell.find("[type='checkbox']").click(function(){
					jQuery(this).validateVal();
				});
				jQuery(cell).attr("_notitle",true);
				
			}else if(type=="radio"){
				var options=tempEditPlugin.options;
				jQuery.each(options,function(i,option){
					if(rowIndex!=null){
						if(!!name && name.match(/#rowIndex#/)){
							name = name.replace(/#rowIndex#/,rowIndex);
						}else if(tempEditPlugin.addIndex==false){
						}else{
								name = name+"_"+rowIndex;
						}
					}
					var radio = jQuery("<input type='radio' />");
					radio.val(option.value);
					radio.attr("name",name);
					if(canedit=="false"){
							radio.attr("readonly",true);
						}
					cell.append(radio);
					cell.append(option.text);
					cell.append("&nbsp;&nbsp;");
				});
				
				if(celValue!=null && celValue!=undefined){
					cell.find("[value='"+celValue+"']").attr("checked","true");
				}
				
				cell.find("[type='radio']").click(function(){
					jQuery(this).validateVal();
				});
				jQuery(cell).attr("_notitle",true);
			}
			var mustSpan=jQuery("<span><img class='notNullImg' align='absmiddle' src='/images/BacoError_wev8.gif'></span>");
			var notNull=tempEditPlugin.notNull;
			if(notNull==true){
				cell.append(mustSpan);
				if(celValue==undefined || celValue=="" || celValue==null){
				
				}else{
					mustSpan.find("img").hide();
				}
			}
			cell.find("[name]").e8bindFn(tempEditPlugin.bind);
		}else{
			if(celValue == null || celValue==undefined ){
				celValue="&nbsp;";
			}
			if(isformmode) {
				
			} else {
				celValue=celValue.replace(new RegExp("<br>","gm"), "&nbsp;");
			}
			
			if(jQuery.trim(celValue)==""){
				celValue="&nbsp;";
			}
			cell.html(celValue);
		}
	};
	
	//添加新行
	jQuery.fn.addNewRow = function (options) {
		var table=jQuery(this);
		table.find("tr.e8EmptyTR").remove();
		var editPlugins=table.data("editPlugins");
		var tr=jQuery("<tr></tr>");
		
		var delayedFunctions=[];
		
		jQuery.each(editPlugins,function(i,editPlugin){
			var td=jQuery("<td></td>");
			var tableMax=jQuery("form [name='tableMax']");
			if(tableMax.size()==0){
				tableMax=0;
			}else{
				tableMax=parseInt(tableMax.val());
			}
			
			td.addEditPlugin({editPlugin:editPlugin,rowIndex:tableMax,delayedFunctions:delayedFunctions});
			tr.append(td);
		});
		
		
		table.children("tbody tr.Spacing:last").children("td").attr("class","paddingLeft0Table");
		
		table.append(tr);
		var trSpacing = jQuery("<tr class='Spacing' style='height:1px!important;'></tr>")
		var tdSpacing = jQuery("<td></td>");
		var divSpacing = jQuery("<div class='intervalDivClass'></div>");
		tdSpacing.append(divSpacing);
		tdSpacing.attr("colspan",tr.children("td").length);
		trSpacing.append(tdSpacing);
		tdSpacing.addClass("paddingLeft0Table");
		
		table.append(trSpacing);
		
		table.addTableMax();
		jQuery("body").append(delayedFunctions.join(" "));
		try{
			//resetDivPosition("pageSizeSel0",jQuery("#pageSizeSel0"),true);
			//resetDivPosition("pageSizeSel1",jQuery("#pageSizeSel1"),true);
		}catch(e){
		}
	};
	
	//删除表格中被选中的行
	jQuery.fn.deleteSelectedRow = function (options) {
		var table=jQuery(this);
		var selectedTrs=table.find("tr:has([name='chkInTableTag']:checked)");
		if(selectedTrs.size()==0){
			window.top.Dialog.alert(SystemEnv.getHtmlNoteName(3529,readCookie("languageidweaver")));
			return;
		}
		window.top.Dialog.confirm(SystemEnv.getHtmlNoteName(3580,readCookie("languageidweaver")),function(){
			selectedTrs.each(function(){
				jQuery(this).next("tr.Spacing").remove();
				jQuery(this).remove();
				table.children("tbody tr.Spacing:last").children("td").attr("class","paddingLeft0Table");
			});
			
			try{
				//resetDivPosition("pageSizeSel0",jQuery("#pageSizeSel0"),true);
				//resetDivPosition("pageSizeSel1",jQuery("#pageSizeSel1"),true);
			}catch(e){
			}
		});
	};
	
	
	jQuery.fn.validateVal = function (options) {
		var changedElement=jQuery(this);
		var name=changedElement.attr("name");
		var isNull=true;
		if(changedElement.is("select") || changedElement.is(":text") || changedElement.is(":password")){
			isNull=(jQuery.trim(changedElement.val())=="");
		}
		if(changedElement.is(":checkbox") || changedElement.is(":radio")){
			isNull=changedElement.parent().find(":checked").size()==0;
		}
		if(isNull){
			changedElement.parent().find(".notNullImg").show();
		}else{
			changedElement.parent().find(".notNullImg").hide();
		}
	};
	
	//验证
	jQuery.fn.validateTable = function (options) {
		var table=jQuery(this);//notNullImg
		return table.find(".notNullImg:visible").size()==0;
	};
	
	jQuery.fn.addTableMax = function () {
//		var table=jQuery(this);
		var tableMax=jQuery("form [name='tableMax']");
		if(tableMax.size()==0){
			jQuery("form").append("<input type='hidden' name='tableMax' value='0'/>");
		}
		tableMax=jQuery("form [name='tableMax']");
		var newaddTableMax=parseInt(tableMax.val())+1;
		tableMax.val(newaddTableMax);
		return newaddTableMax;
	};
	
	jQuery.fn.resetTableMax = function () {
//		var table=jQuery(this);
		var tableMax=jQuery("form [name='tableMax']");
		if(tableMax.size()==0){
			try{
				jQuery("form").append("<input type='hidden' name='tableMax' value='0'/>");
			}catch(e){
				if(window.console){
					console.log(e+"--->weaverTable_wev8.js resetTableMax");
				}
			}
		}
		tableMax=jQuery("form [name='tableMax']");
		var newaddTableMax=0;
		tableMax.val(newaddTableMax);
		return newaddTableMax;
	};
	
	//为每一行中的可编辑元素添加绑定事件
	jQuery.fn.e8bindFn = function (bind) {
		if(bind==null || bind==undefined){
			return;
		}
		var node=this;
		jQuery.each(bind,function(i,bindFn){
			node.bind(bindFn.type,bindFn.fn);
		});
	};
	
	//add by bpf on 2013-11-14获取鼠标悬停所在的行对象
	jQuery.getSelectedRow = function () {
		return jQuery(".ListStyle .Selected").get(0);
	};
})(jQuery);
//add by bpf 2013-11-05 end
 
 
 function hideTH(){
 	var cols = jQuery("div#_xTable").find("colgroup col");
 	jQuery("div#_xTable").find("thead tr.HeaderForXtalbe th").each(function(){
 		//console.log(parseInt(jQuery(this).css("width").replace(/[ |px]/g,"")));
 		var $this = jQuery(this);
		if(!$this.css("width")||parseInt($this.css("width").replace(/[ |px]/g,""))<=0){
			$this.hide();
			var _itemid = $this.attr("_itemid");
			if(_itemid){
				var idx = parseInt(_itemid)-1;
				if(idx>0)
					cols.eq(parseInt(_itemid)-1).hide();
			}
		}
	});
 }
 
 //保存每页显示的记录数
 function savePageSize(e,obj,pageId,save){
 	var event = e||window.event;
 	var pageSize = parseInt(jQuery(obj).val());
 	var minPageSize = 1;
 	var defaultPageSize = 10;
 	var maxPageSize = 100;
 	if((event.type.toLowerCase()=="keyup"&&event.keyCode==13) || !!save){
 		if(pageSize!=0 && pageSize<minPageSize){
 			jQuery(obj).val(minPageSize);
 			//window.top.Dialog.alert("每页记录数必须不小于"+minPageSize+"条!");
 			return;
 		}/*else{
 			if(pageSize!=0&&pageSize>maxPageSize){
 				jQuery(obj).val(maxPageSize);
	 			window.top.Dialog.alert("每页记录数必须不大于"+maxPageSize+"条!");
	 			return;
 			}
 		}*/
 		if(!!pageId){
 			 try{
		   		var flag = e8beforeJump();
		   		if(!flag)return;
		   }catch(e){}	
	 		jQuery.ajax({
	 			url:"/weaver/weaver.common.util.taglib.ShowColServlet?src=savePageSize&timestap="+new Date().getTime(),
	 			type:"get",
	 			dataType:"json",
	 			data:{
	 				pageSize:pageSize,
	 				pageId:pageId
	 			},
	 			success:function(data){
	 				if(data.result==0){
	 					window.top.Dialog.alert(data.msg);
	 				}else{
	 					try{
	 						reloadPage();
	 					}catch(e){
	 						if(jQuery("span#searchblockspan",parent.document).find("img:first").length>0){
	 							jQuery("span#searchblockspan",parent.document).find("img:first").click();
	 						}else{
	 							window.location.reload();
							}
	 					}
	 				}
	 			},
	 			failure:function(xhr,status,e){
	 				window.top.Dialog.alert(SystemEnv.getHtmlNoteName(3601,readCookie("languageidweaver")));
	 			}
	 		});
 		}else{
 			window.top.Dialog.alert(SystemEnv.getHtmlNoteName(3602,readCookie("languageidweaver")));
 			return;
 		}
 	}else if(event.type.toLowerCase()=="keyup"){
 		if(pageSize<0){
 			jQuery(obj).val(defaultPageSize);
 		}
 	}
 }
 
 function weaverTable_checkInput(e){
 	var evt = e||window.event;
 	if((evt.keyCode<48&&evt.keyCode!=8&&evt.keyCode!=13&&evt.keyCode!=0) || evt.keyCode>57){return false;}
 	return true;
 }