MARQ 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (635) hide show
  1. data/LICENSE +20 -0
  2. data/R/CustomDS.R +80 -0
  3. data/R/GEO.R +249 -0
  4. data/R/MA.R +359 -0
  5. data/README.rdoc +29 -0
  6. data/bin/marq_config +170 -0
  7. data/install_scripts/CustomDS/Rakefile +223 -0
  8. data/install_scripts/GEO/Rakefile +258 -0
  9. data/install_scripts/GEO/platforms/GPL100.yaml +7 -0
  10. data/install_scripts/GEO/platforms/GPL1002.yaml +7 -0
  11. data/install_scripts/GEO/platforms/GPL1007.yaml +7 -0
  12. data/install_scripts/GEO/platforms/GPL101.yaml +7 -0
  13. data/install_scripts/GEO/platforms/GPL1010.yaml +7 -0
  14. data/install_scripts/GEO/platforms/GPL1073.yaml +7 -0
  15. data/install_scripts/GEO/platforms/GPL1074.yaml +4 -0
  16. data/install_scripts/GEO/platforms/GPL1090.yaml +7 -0
  17. data/install_scripts/GEO/platforms/GPL1104.yaml +7 -0
  18. data/install_scripts/GEO/platforms/GPL118.yaml +7 -0
  19. data/install_scripts/GEO/platforms/GPL1205.yaml +4 -0
  20. data/install_scripts/GEO/platforms/GPL1211.yaml +7 -0
  21. data/install_scripts/GEO/platforms/GPL1213.yaml +7 -0
  22. data/install_scripts/GEO/platforms/GPL1219.yaml +4 -0
  23. data/install_scripts/GEO/platforms/GPL1223.yaml +7 -0
  24. data/install_scripts/GEO/platforms/GPL1226.yaml +7 -0
  25. data/install_scripts/GEO/platforms/GPL1229.yaml +7 -0
  26. data/install_scripts/GEO/platforms/GPL1230.yaml +7 -0
  27. data/install_scripts/GEO/platforms/GPL1231.yaml +7 -0
  28. data/install_scripts/GEO/platforms/GPL1232.yaml +7 -0
  29. data/install_scripts/GEO/platforms/GPL1260.yaml +4 -0
  30. data/install_scripts/GEO/platforms/GPL1261.yaml +4 -0
  31. data/install_scripts/GEO/platforms/GPL127.yaml +4 -0
  32. data/install_scripts/GEO/platforms/GPL128.yaml +7 -0
  33. data/install_scripts/GEO/platforms/GPL1290.yaml +7 -0
  34. data/install_scripts/GEO/platforms/GPL1292.yaml +7 -0
  35. data/install_scripts/GEO/platforms/GPL1293.yaml +7 -0
  36. data/install_scripts/GEO/platforms/GPL1294.yaml +7 -0
  37. data/install_scripts/GEO/platforms/GPL1295.yaml +7 -0
  38. data/install_scripts/GEO/platforms/GPL13.yaml +4 -0
  39. data/install_scripts/GEO/platforms/GPL1310.yaml +7 -0
  40. data/install_scripts/GEO/platforms/GPL1313.yaml +7 -0
  41. data/install_scripts/GEO/platforms/GPL1323.yaml +7 -0
  42. data/install_scripts/GEO/platforms/GPL1331.yaml +7 -0
  43. data/install_scripts/GEO/platforms/GPL1352.yaml +4 -0
  44. data/install_scripts/GEO/platforms/GPL1355.yaml +4 -0
  45. data/install_scripts/GEO/platforms/GPL1382.yaml +7 -0
  46. data/install_scripts/GEO/platforms/GPL1387.yaml +7 -0
  47. data/install_scripts/GEO/platforms/GPL1397.yaml +4 -0
  48. data/install_scripts/GEO/platforms/GPL14.yaml +7 -0
  49. data/install_scripts/GEO/platforms/GPL1412.yaml +7 -0
  50. data/install_scripts/GEO/platforms/GPL1415.yaml +7 -0
  51. data/install_scripts/GEO/platforms/GPL1420.yaml +7 -0
  52. data/install_scripts/GEO/platforms/GPL144.yaml +7 -0
  53. data/install_scripts/GEO/platforms/GPL1449.yaml +7 -0
  54. data/install_scripts/GEO/platforms/GPL1458.yaml +7 -0
  55. data/install_scripts/GEO/platforms/GPL1523.yaml +7 -0
  56. data/install_scripts/GEO/platforms/GPL1524.yaml +7 -0
  57. data/install_scripts/GEO/platforms/GPL1528.yaml +7 -0
  58. data/install_scripts/GEO/platforms/GPL153.yaml +7 -0
  59. data/install_scripts/GEO/platforms/GPL1530.yaml +7 -0
  60. data/install_scripts/GEO/platforms/GPL1535.yaml +4 -0
  61. data/install_scripts/GEO/platforms/GPL155.yaml +7 -0
  62. data/install_scripts/GEO/platforms/GPL163.yaml +7 -0
  63. data/install_scripts/GEO/platforms/GPL168.yaml +7 -0
  64. data/install_scripts/GEO/platforms/GPL169.yaml +7 -0
  65. data/install_scripts/GEO/platforms/GPL1704.yaml +4 -0
  66. data/install_scripts/GEO/platforms/GPL1708.yaml +7 -0
  67. data/install_scripts/GEO/platforms/GPL1739.yaml +7 -0
  68. data/install_scripts/GEO/platforms/GPL1740.yaml +4 -0
  69. data/install_scripts/GEO/platforms/GPL1749.yaml +7 -0
  70. data/install_scripts/GEO/platforms/GPL177.yaml +7 -0
  71. data/install_scripts/GEO/platforms/GPL1790.yaml +7 -0
  72. data/install_scripts/GEO/platforms/GPL1792.yaml +7 -0
  73. data/install_scripts/GEO/platforms/GPL181.yaml +7 -0
  74. data/install_scripts/GEO/platforms/GPL1818.yaml +7 -0
  75. data/install_scripts/GEO/platforms/GPL1820.yaml +4 -0
  76. data/install_scripts/GEO/platforms/GPL1823.yaml +7 -0
  77. data/install_scripts/GEO/platforms/GPL1826.yaml +7 -0
  78. data/install_scripts/GEO/platforms/GPL183.yaml +7 -0
  79. data/install_scripts/GEO/platforms/GPL1831.yaml +7 -0
  80. data/install_scripts/GEO/platforms/GPL1833.yaml +7 -0
  81. data/install_scripts/GEO/platforms/GPL1872.yaml +4 -0
  82. data/install_scripts/GEO/platforms/GPL1911.yaml +7 -0
  83. data/install_scripts/GEO/platforms/GPL1914.yaml +4 -0
  84. data/install_scripts/GEO/platforms/GPL1928.yaml +7 -0
  85. data/install_scripts/GEO/platforms/GPL1942.yaml +7 -0
  86. data/install_scripts/GEO/platforms/GPL1945.yaml +7 -0
  87. data/install_scripts/GEO/platforms/GPL1964.yaml +7 -0
  88. data/install_scripts/GEO/platforms/GPL198.yaml +4 -0
  89. data/install_scripts/GEO/platforms/GPL1981.yaml +4 -0
  90. data/install_scripts/GEO/platforms/GPL200.yaml +7 -0
  91. data/install_scripts/GEO/platforms/GPL2006.yaml +7 -0
  92. data/install_scripts/GEO/platforms/GPL201.yaml +4 -0
  93. data/install_scripts/GEO/platforms/GPL2011.yaml +7 -0
  94. data/install_scripts/GEO/platforms/GPL2026.yaml +7 -0
  95. data/install_scripts/GEO/platforms/GPL205.yaml +7 -0
  96. data/install_scripts/GEO/platforms/GPL207.yaml +7 -0
  97. data/install_scripts/GEO/platforms/GPL2136.yaml +7 -0
  98. data/install_scripts/GEO/platforms/GPL220.yaml +7 -0
  99. data/install_scripts/GEO/platforms/GPL226.yaml +7 -0
  100. data/install_scripts/GEO/platforms/GPL24.yaml +4 -0
  101. data/install_scripts/GEO/platforms/GPL246.yaml +4 -0
  102. data/install_scripts/GEO/platforms/GPL247.yaml +7 -0
  103. data/install_scripts/GEO/platforms/GPL2507.yaml +4 -0
  104. data/install_scripts/GEO/platforms/GPL2529.yaml +4 -0
  105. data/install_scripts/GEO/platforms/GPL2531.yaml +7 -0
  106. data/install_scripts/GEO/platforms/GPL254.yaml +7 -0
  107. data/install_scripts/GEO/platforms/GPL2569.yaml +7 -0
  108. data/install_scripts/GEO/platforms/GPL257.yaml +7 -0
  109. data/install_scripts/GEO/platforms/GPL2598.yaml +7 -0
  110. data/install_scripts/GEO/platforms/GPL260.yaml +7 -0
  111. data/install_scripts/GEO/platforms/GPL2614.yaml +4 -0
  112. data/install_scripts/GEO/platforms/GPL2622.yaml +7 -0
  113. data/install_scripts/GEO/platforms/GPL2623.yaml +7 -0
  114. data/install_scripts/GEO/platforms/GPL2660.yaml +7 -0
  115. data/install_scripts/GEO/platforms/GPL2670.yaml +7 -0
  116. data/install_scripts/GEO/platforms/GPL2677.yaml +7 -0
  117. data/install_scripts/GEO/platforms/GPL2700.yaml +4 -0
  118. data/install_scripts/GEO/platforms/GPL2721.yaml +7 -0
  119. data/install_scripts/GEO/platforms/GPL2727.yaml +7 -0
  120. data/install_scripts/GEO/platforms/GPL273.yaml +7 -0
  121. data/install_scripts/GEO/platforms/GPL2763.yaml +7 -0
  122. data/install_scripts/GEO/platforms/GPL2824.yaml +7 -0
  123. data/install_scripts/GEO/platforms/GPL284.yaml +7 -0
  124. data/install_scripts/GEO/platforms/GPL287.yaml +4 -0
  125. data/install_scripts/GEO/platforms/GPL2872.yaml +7 -0
  126. data/install_scripts/GEO/platforms/GPL288.yaml +4 -0
  127. data/install_scripts/GEO/platforms/GPL2883.yaml +7 -0
  128. data/install_scripts/GEO/platforms/GPL289.yaml +4 -0
  129. data/install_scripts/GEO/platforms/GPL2895.yaml +4 -0
  130. data/install_scripts/GEO/platforms/GPL2897.yaml +7 -0
  131. data/install_scripts/GEO/platforms/GPL2902.yaml +7 -0
  132. data/install_scripts/GEO/platforms/GPL2987.yaml +4 -0
  133. data/install_scripts/GEO/platforms/GPL2995.yaml +7 -0
  134. data/install_scripts/GEO/platforms/GPL3039.yaml +4 -0
  135. data/install_scripts/GEO/platforms/GPL3050.yaml +7 -0
  136. data/install_scripts/GEO/platforms/GPL3084.yaml +7 -0
  137. data/install_scripts/GEO/platforms/GPL3113.yaml +7 -0
  138. data/install_scripts/GEO/platforms/GPL317.yaml +7 -0
  139. data/install_scripts/GEO/platforms/GPL319.yaml +7 -0
  140. data/install_scripts/GEO/platforms/GPL32.yaml +4 -0
  141. data/install_scripts/GEO/platforms/GPL3222.yaml +7 -0
  142. data/install_scripts/GEO/platforms/GPL3295.yaml +7 -0
  143. data/install_scripts/GEO/platforms/GPL3305.yaml +4 -0
  144. data/install_scripts/GEO/platforms/GPL3306.yaml +7 -0
  145. data/install_scripts/GEO/platforms/GPL3307.yaml +7 -0
  146. data/install_scripts/GEO/platforms/GPL333.yaml +4 -0
  147. data/install_scripts/GEO/platforms/GPL3341.yaml +7 -0
  148. data/install_scripts/GEO/platforms/GPL3349.yaml +7 -0
  149. data/install_scripts/GEO/platforms/GPL339.yaml +4 -0
  150. data/install_scripts/GEO/platforms/GPL340.yaml +4 -0
  151. data/install_scripts/GEO/platforms/GPL3408.yaml +7 -0
  152. data/install_scripts/GEO/platforms/GPL341.yaml +4 -0
  153. data/install_scripts/GEO/platforms/GPL3415.yaml +4 -0
  154. data/install_scripts/GEO/platforms/GPL3423.yaml +7 -0
  155. data/install_scripts/GEO/platforms/GPL3440.yaml +7 -0
  156. data/install_scripts/GEO/platforms/GPL3457.yaml +4 -0
  157. data/install_scripts/GEO/platforms/GPL3504.yaml +4 -0
  158. data/install_scripts/GEO/platforms/GPL3506.yaml +4 -0
  159. data/install_scripts/GEO/platforms/GPL355.yaml +7 -0
  160. data/install_scripts/GEO/platforms/GPL3558.yaml +7 -0
  161. data/install_scripts/GEO/platforms/GPL3607.yaml +7 -0
  162. data/install_scripts/GEO/platforms/GPL368.yaml +4 -0
  163. data/install_scripts/GEO/platforms/GPL3695.yaml +7 -0
  164. data/install_scripts/GEO/platforms/GPL371.yaml +7 -0
  165. data/install_scripts/GEO/platforms/GPL3834.yaml +4 -0
  166. data/install_scripts/GEO/platforms/GPL4006.yaml +7 -0
  167. data/install_scripts/GEO/platforms/GPL4055.yaml +7 -0
  168. data/install_scripts/GEO/platforms/GPL409.yaml +7 -0
  169. data/install_scripts/GEO/platforms/GPL4191.yaml +7 -0
  170. data/install_scripts/GEO/platforms/GPL4226.yaml +7 -0
  171. data/install_scripts/GEO/platforms/GPL4371.yaml +7 -0
  172. data/install_scripts/GEO/platforms/GPL4567.yaml +4 -0
  173. data/install_scripts/GEO/platforms/GPL4685.yaml +4 -0
  174. data/install_scripts/GEO/platforms/GPL483.yaml +7 -0
  175. data/install_scripts/GEO/platforms/GPL49.yaml +7 -0
  176. data/install_scripts/GEO/platforms/GPL50.yaml +7 -0
  177. data/install_scripts/GEO/platforms/GPL500.yaml +7 -0
  178. data/install_scripts/GEO/platforms/GPL507.yaml +4 -0
  179. data/install_scripts/GEO/platforms/GPL51.yaml +7 -0
  180. data/install_scripts/GEO/platforms/GPL513.yaml +7 -0
  181. data/install_scripts/GEO/platforms/GPL519.yaml +7 -0
  182. data/install_scripts/GEO/platforms/GPL52.yaml +7 -0
  183. data/install_scripts/GEO/platforms/GPL529.yaml +7 -0
  184. data/install_scripts/GEO/platforms/GPL53.yaml +7 -0
  185. data/install_scripts/GEO/platforms/GPL5356.yaml +7 -0
  186. data/install_scripts/GEO/platforms/GPL538.yaml +7 -0
  187. data/install_scripts/GEO/platforms/GPL54.yaml +7 -0
  188. data/install_scripts/GEO/platforms/GPL543.yaml +7 -0
  189. data/install_scripts/GEO/platforms/GPL544.yaml +7 -0
  190. data/install_scripts/GEO/platforms/GPL545.yaml +7 -0
  191. data/install_scripts/GEO/platforms/GPL546.yaml +7 -0
  192. data/install_scripts/GEO/platforms/GPL547.yaml +7 -0
  193. data/install_scripts/GEO/platforms/GPL549.yaml +7 -0
  194. data/install_scripts/GEO/platforms/GPL550.yaml +4 -0
  195. data/install_scripts/GEO/platforms/GPL56.yaml +7 -0
  196. data/install_scripts/GEO/platforms/GPL560.yaml +4 -0
  197. data/install_scripts/GEO/platforms/GPL564.yaml +7 -0
  198. data/install_scripts/GEO/platforms/GPL57.yaml +7 -0
  199. data/install_scripts/GEO/platforms/GPL570.yaml +4 -0
  200. data/install_scripts/GEO/platforms/GPL571.yaml +4 -0
  201. data/install_scripts/GEO/platforms/GPL576.yaml +7 -0
  202. data/install_scripts/GEO/platforms/GPL58.yaml +7 -0
  203. data/install_scripts/GEO/platforms/GPL5823.yaml +4 -0
  204. data/install_scripts/GEO/platforms/GPL59.yaml +7 -0
  205. data/install_scripts/GEO/platforms/GPL5915.yaml +4 -0
  206. data/install_scripts/GEO/platforms/GPL5947.yaml +7 -0
  207. data/install_scripts/GEO/platforms/GPL61.yaml +7 -0
  208. data/install_scripts/GEO/platforms/GPL64.yaml +7 -0
  209. data/install_scripts/GEO/platforms/GPL6419.yaml +7 -0
  210. data/install_scripts/GEO/platforms/GPL6424.yaml +7 -0
  211. data/install_scripts/GEO/platforms/GPL65.yaml +7 -0
  212. data/install_scripts/GEO/platforms/GPL6574.yaml +4 -0
  213. data/install_scripts/GEO/platforms/GPL6649.yaml +4 -0
  214. data/install_scripts/GEO/platforms/GPL67.yaml +7 -0
  215. data/install_scripts/GEO/platforms/GPL6720.yaml +7 -0
  216. data/install_scripts/GEO/platforms/GPL7054.yaml +4 -0
  217. data/install_scripts/GEO/platforms/GPL737.yaml +7 -0
  218. data/install_scripts/GEO/platforms/GPL738.yaml +7 -0
  219. data/install_scripts/GEO/platforms/GPL74.yaml +4 -0
  220. data/install_scripts/GEO/platforms/GPL75.yaml +4 -0
  221. data/install_scripts/GEO/platforms/GPL76.yaml +4 -0
  222. data/install_scripts/GEO/platforms/GPL764.yaml +7 -0
  223. data/install_scripts/GEO/platforms/GPL772.yaml +7 -0
  224. data/install_scripts/GEO/platforms/GPL782.yaml +7 -0
  225. data/install_scripts/GEO/platforms/GPL783.yaml +7 -0
  226. data/install_scripts/GEO/platforms/GPL784.yaml +7 -0
  227. data/install_scripts/GEO/platforms/GPL80.yaml +4 -0
  228. data/install_scripts/GEO/platforms/GPL81.yaml +4 -0
  229. data/install_scripts/GEO/platforms/GPL82.yaml +4 -0
  230. data/install_scripts/GEO/platforms/GPL83.yaml +4 -0
  231. data/install_scripts/GEO/platforms/GPL85.yaml +4 -0
  232. data/install_scripts/GEO/platforms/GPL86.yaml +4 -0
  233. data/install_scripts/GEO/platforms/GPL87.yaml +4 -0
  234. data/install_scripts/GEO/platforms/GPL870.yaml +7 -0
  235. data/install_scripts/GEO/platforms/GPL875.yaml +7 -0
  236. data/install_scripts/GEO/platforms/GPL884.yaml +7 -0
  237. data/install_scripts/GEO/platforms/GPL887.yaml +7 -0
  238. data/install_scripts/GEO/platforms/GPL89.yaml +4 -0
  239. data/install_scripts/GEO/platforms/GPL890.yaml +7 -0
  240. data/install_scripts/GEO/platforms/GPL891.yaml +7 -0
  241. data/install_scripts/GEO/platforms/GPL90.yaml +7 -0
  242. data/install_scripts/GEO/platforms/GPL91.yaml +4 -0
  243. data/install_scripts/GEO/platforms/GPL92.yaml +4 -0
  244. data/install_scripts/GEO/platforms/GPL920.yaml +7 -0
  245. data/install_scripts/GEO/platforms/GPL922.yaml +7 -0
  246. data/install_scripts/GEO/platforms/GPL924.yaml +7 -0
  247. data/install_scripts/GEO/platforms/GPL93.yaml +4 -0
  248. data/install_scripts/GEO/platforms/GPL96.yaml +4 -0
  249. data/install_scripts/GEO/platforms/GPL968.yaml +4 -0
  250. data/install_scripts/GEO/platforms/GPL97.yaml +4 -0
  251. data/install_scripts/GEO/platforms/GPL98.yaml +7 -0
  252. data/install_scripts/GEO/platforms/GPL981.yaml +7 -0
  253. data/install_scripts/GEO/platforms/GPL99.yaml +7 -0
  254. data/install_scripts/GEO/platforms/GPL999.yaml +7 -0
  255. data/install_scripts/GEO/series/GSE10018.yaml +61 -0
  256. data/install_scripts/GEO/series/GSE1002.yaml +135 -0
  257. data/install_scripts/GEO/series/GSE10066.yaml +31 -0
  258. data/install_scripts/GEO/series/GSE10073.yaml +19 -0
  259. data/install_scripts/GEO/series/GSE10091.yaml +15 -0
  260. data/install_scripts/GEO/series/GSE101.yaml +17 -0
  261. data/install_scripts/GEO/series/GSE10100.yaml +15 -0
  262. data/install_scripts/GEO/series/GSE10101.yaml +15 -0
  263. data/install_scripts/GEO/series/GSE10102.yaml +15 -0
  264. data/install_scripts/GEO/series/GSE10267.yaml +37 -0
  265. data/install_scripts/GEO/series/GSE10268.yaml +115 -0
  266. data/install_scripts/GEO/series/GSE10279.yaml +23 -0
  267. data/install_scripts/GEO/series/GSE103.yaml +19 -0
  268. data/install_scripts/GEO/series/GSE104.yaml +19 -0
  269. data/install_scripts/GEO/series/GSE10514.yaml +27 -0
  270. data/install_scripts/GEO/series/GSE10521.yaml +56 -0
  271. data/install_scripts/GEO/series/GSE10554.yaml +19 -0
  272. data/install_scripts/GEO/series/GSE1073.yaml +127 -0
  273. data/install_scripts/GEO/series/GSE10860.yaml +25 -0
  274. data/install_scripts/GEO/series/GSE10930.yaml +15 -0
  275. data/install_scripts/GEO/series/GSE10933.yaml +15 -0
  276. data/install_scripts/GEO/series/GSE10944.yaml +21 -0
  277. data/install_scripts/GEO/series/GSE10947.yaml +21 -0
  278. data/install_scripts/GEO/series/GSE10948.yaml +21 -0
  279. data/install_scripts/GEO/series/GSE11061.yaml +19 -0
  280. data/install_scripts/GEO/series/GSE11071.yaml +67 -0
  281. data/install_scripts/GEO/series/GSE11111.yaml +25 -0
  282. data/install_scripts/GEO/series/GSE11236.yaml +25 -0
  283. data/install_scripts/GEO/series/GSE11282.yaml +19 -0
  284. data/install_scripts/GEO/series/GSE11377.yaml +19 -0
  285. data/install_scripts/GEO/series/GSE11380.yaml +13 -0
  286. data/install_scripts/GEO/series/GSE11397.yaml +55 -0
  287. data/install_scripts/GEO/series/GSE11412.yaml +11 -0
  288. data/install_scripts/GEO/series/GSE11452.yaml +354 -0
  289. data/install_scripts/GEO/series/GSE11620.yaml +33 -0
  290. data/install_scripts/GEO/series/GSE11621.yaml +31 -0
  291. data/install_scripts/GEO/series/GSE11651.yaml +94 -0
  292. data/install_scripts/GEO/series/GSE11754.yaml +29 -0
  293. data/install_scripts/GEO/series/GSE11799.yaml +59 -0
  294. data/install_scripts/GEO/series/GSE11856.yaml +11 -0
  295. data/install_scripts/GEO/series/GSE11878.yaml +19 -0
  296. data/install_scripts/GEO/series/GSE11983.yaml +15 -0
  297. data/install_scripts/GEO/series/GSE12004.yaml +41 -0
  298. data/install_scripts/GEO/series/GSE12055.yaml +109 -0
  299. data/install_scripts/GEO/series/GSE12061.yaml +13 -0
  300. data/install_scripts/GEO/series/GSE12104.yaml +10 -0
  301. data/install_scripts/GEO/series/GSE12138.yaml +13 -0
  302. data/install_scripts/GEO/series/GSE12150.yaml +32 -0
  303. data/install_scripts/GEO/series/GSE12684.yaml +47 -0
  304. data/install_scripts/GEO/series/GSE12685.yaml +34 -0
  305. data/install_scripts/GEO/series/GSE1365.yaml +14 -0
  306. data/install_scripts/GEO/series/GSE1404.yaml +596 -0
  307. data/install_scripts/GEO/series/GSE1492.yaml +15 -0
  308. data/install_scripts/GEO/series/GSE15222.yaml +731 -0
  309. data/install_scripts/GEO/series/GSE1553.yaml +23 -0
  310. data/install_scripts/GEO/series/GSE1617.yaml +39 -0
  311. data/install_scripts/GEO/series/GSE1688.yaml +36 -0
  312. data/install_scripts/GEO/series/GSE1693.yaml +60 -0
  313. data/install_scripts/GEO/series/GSE1752.yaml +32 -0
  314. data/install_scripts/GEO/series/GSE1753.yaml +16 -0
  315. data/install_scripts/GEO/series/GSE1754.yaml +19 -0
  316. data/install_scripts/GEO/series/GSE1758.yaml +15 -0
  317. data/install_scripts/GEO/series/GSE1759.yaml +18 -0
  318. data/install_scripts/GEO/series/GSE1760.yaml +18 -0
  319. data/install_scripts/GEO/series/GSE1763.yaml +19 -0
  320. data/install_scripts/GEO/series/GSE1915.yaml +39 -0
  321. data/install_scripts/GEO/series/GSE1927.yaml +14 -0
  322. data/install_scripts/GEO/series/GSE1941.yaml +23 -0
  323. data/install_scripts/GEO/series/GSE1942.yaml +31 -0
  324. data/install_scripts/GEO/series/GSE1944.yaml +58 -0
  325. data/install_scripts/GEO/series/GSE1975.yaml +65 -0
  326. data/install_scripts/GEO/series/GSE20.yaml +24 -0
  327. data/install_scripts/GEO/series/GSE2107.yaml +14 -0
  328. data/install_scripts/GEO/series/GSE2159.yaml +31 -0
  329. data/install_scripts/GEO/series/GSE2246.yaml +157 -0
  330. data/install_scripts/GEO/series/GSE2263.yaml +57 -0
  331. data/install_scripts/GEO/series/GSE2267.yaml +155 -0
  332. data/install_scripts/GEO/series/GSE23.yaml +58 -0
  333. data/install_scripts/GEO/series/GSE2329.yaml +43 -0
  334. data/install_scripts/GEO/series/GSE2330.yaml +55 -0
  335. data/install_scripts/GEO/series/GSE2349.yaml +19 -0
  336. data/install_scripts/GEO/series/GSE2412.yaml +58 -0
  337. data/install_scripts/GEO/series/GSE2419.yaml +27 -0
  338. data/install_scripts/GEO/series/GSE2420.yaml +29 -0
  339. data/install_scripts/GEO/series/GSE2434.yaml +37 -0
  340. data/install_scripts/GEO/series/GSE2526.yaml +23 -0
  341. data/install_scripts/GEO/series/GSE2579.yaml +19 -0
  342. data/install_scripts/GEO/series/GSE2806.yaml +11 -0
  343. data/install_scripts/GEO/series/GSE2831.yaml +35 -0
  344. data/install_scripts/GEO/series/GSE2832.yaml +17 -0
  345. data/install_scripts/GEO/series/GSE29.yaml +16 -0
  346. data/install_scripts/GEO/series/GSE3006.yaml +35 -0
  347. data/install_scripts/GEO/series/GSE3043.yaml +18 -0
  348. data/install_scripts/GEO/series/GSE3122.yaml +12 -0
  349. data/install_scripts/GEO/series/GSE3130.yaml +12 -0
  350. data/install_scripts/GEO/series/GSE3151.yaml +118 -0
  351. data/install_scripts/GEO/series/GSE3160.yaml +31 -0
  352. data/install_scripts/GEO/series/GSE3190.yaml +14 -0
  353. data/install_scripts/GEO/series/GSE3205.yaml +36 -0
  354. data/install_scripts/GEO/series/GSE3206.yaml +23 -0
  355. data/install_scripts/GEO/series/GSE3315.yaml +13 -0
  356. data/install_scripts/GEO/series/GSE3335.yaml +15 -0
  357. data/install_scripts/GEO/series/GSE34.yaml +31 -0
  358. data/install_scripts/GEO/series/GSE3470.yaml +15 -0
  359. data/install_scripts/GEO/series/GSE35.yaml +80 -0
  360. data/install_scripts/GEO/series/GSE3503.yaml +19 -0
  361. data/install_scripts/GEO/series/GSE3683.yaml +83 -0
  362. data/install_scripts/GEO/series/GSE3684.yaml +19 -0
  363. data/install_scripts/GEO/series/GSE3685.yaml +31 -0
  364. data/install_scripts/GEO/series/GSE3686.yaml +63 -0
  365. data/install_scripts/GEO/series/GSE3687.yaml +83 -0
  366. data/install_scripts/GEO/series/GSE3802.yaml +19 -0
  367. data/install_scripts/GEO/series/GSE3803.yaml +19 -0
  368. data/install_scripts/GEO/series/GSE3804.yaml +19 -0
  369. data/install_scripts/GEO/series/GSE3805.yaml +19 -0
  370. data/install_scripts/GEO/series/GSE3813.yaml +9 -0
  371. data/install_scripts/GEO/series/GSE3814.yaml +71 -0
  372. data/install_scripts/GEO/series/GSE3815.yaml +75 -0
  373. data/install_scripts/GEO/series/GSE3817.yaml +13 -0
  374. data/install_scripts/GEO/series/GSE3818.yaml +15 -0
  375. data/install_scripts/GEO/series/GSE3819.yaml +13 -0
  376. data/install_scripts/GEO/series/GSE3820.yaml +61 -0
  377. data/install_scripts/GEO/series/GSE3821.yaml +55 -0
  378. data/install_scripts/GEO/series/GSE3844.yaml +11 -0
  379. data/install_scripts/GEO/series/GSE3853.yaml +31 -0
  380. data/install_scripts/GEO/series/GSE3935.yaml +12 -0
  381. data/install_scripts/GEO/series/GSE3969.yaml +14 -0
  382. data/install_scripts/GEO/series/GSE4049.yaml +80 -0
  383. data/install_scripts/GEO/series/GSE4144.yaml +9 -0
  384. data/install_scripts/GEO/series/GSE4261.yaml +59 -0
  385. data/install_scripts/GEO/series/GSE4295.yaml +63 -0
  386. data/install_scripts/GEO/series/GSE4398.yaml +50 -0
  387. data/install_scripts/GEO/series/GSE4719.yaml +76 -0
  388. data/install_scripts/GEO/series/GSE4720.yaml +78 -0
  389. data/install_scripts/GEO/series/GSE4721.yaml +14 -0
  390. data/install_scripts/GEO/series/GSE4807.yaml +67 -0
  391. data/install_scripts/GEO/series/GSE4826.yaml +39 -0
  392. data/install_scripts/GEO/series/GSE4934.yaml +23 -0
  393. data/install_scripts/GEO/series/GSE5027.yaml +31 -0
  394. data/install_scripts/GEO/series/GSE5070.yaml +25 -0
  395. data/install_scripts/GEO/series/GSE5238.yaml +31 -0
  396. data/install_scripts/GEO/series/GSE5267.yaml +55 -0
  397. data/install_scripts/GEO/series/GSE5281.yaml +492 -0
  398. data/install_scripts/GEO/series/GSE5290.yaml +24 -0
  399. data/install_scripts/GEO/series/GSE5376.yaml +107 -0
  400. data/install_scripts/GEO/series/GSE5575.yaml +13 -0
  401. data/install_scripts/GEO/series/GSE5835.yaml +25 -0
  402. data/install_scripts/GEO/series/GSE5836.yaml +37 -0
  403. data/install_scripts/GEO/series/GSE5837.yaml +37 -0
  404. data/install_scripts/GEO/series/GSE5938.yaml +187 -0
  405. data/install_scripts/GEO/series/GSE600.yaml +29 -0
  406. data/install_scripts/GEO/series/GSE6018.yaml +55 -0
  407. data/install_scripts/GEO/series/GSE6066.yaml +20 -0
  408. data/install_scripts/GEO/series/GSE6067.yaml +31 -0
  409. data/install_scripts/GEO/series/GSE6068.yaml +55 -0
  410. data/install_scripts/GEO/series/GSE6070.yaml +31 -0
  411. data/install_scripts/GEO/series/GSE6071.yaml +30 -0
  412. data/install_scripts/GEO/series/GSE6072.yaml +37 -0
  413. data/install_scripts/GEO/series/GSE6101.yaml +26 -0
  414. data/install_scripts/GEO/series/GSE6111.yaml +20 -0
  415. data/install_scripts/GEO/series/GSE6190.yaml +30 -0
  416. data/install_scripts/GEO/series/GSE6277.yaml +19 -0
  417. data/install_scripts/GEO/series/GSE6331.yaml +51 -0
  418. data/install_scripts/GEO/series/GSE6346.yaml +49 -0
  419. data/install_scripts/GEO/series/GSE6358.yaml +22 -0
  420. data/install_scripts/GEO/series/GSE6405.yaml +36 -0
  421. data/install_scripts/GEO/series/GSE6450.yaml +51 -0
  422. data/install_scripts/GEO/series/GSE6687.yaml +15 -0
  423. data/install_scripts/GEO/series/GSE6705.yaml +19 -0
  424. data/install_scripts/GEO/series/GSE6801.yaml +27 -0
  425. data/install_scripts/GEO/series/GSE6847.yaml +18 -0
  426. data/install_scripts/GEO/series/GSE6870.yaml +23 -0
  427. data/install_scripts/GEO/series/GSE7103.yaml +28 -0
  428. data/install_scripts/GEO/series/GSE7140.yaml +19 -0
  429. data/install_scripts/GEO/series/GSE7188.yaml +23 -0
  430. data/install_scripts/GEO/series/GSE7261.yaml +16 -0
  431. data/install_scripts/GEO/series/GSE7337.yaml +19 -0
  432. data/install_scripts/GEO/series/GSE7338.yaml +19 -0
  433. data/install_scripts/GEO/series/GSE7362.yaml +123 -0
  434. data/install_scripts/GEO/series/GSE7369.yaml +15 -0
  435. data/install_scripts/GEO/series/GSE7525.yaml +33 -0
  436. data/install_scripts/GEO/series/GSE7537.yaml +27 -0
  437. data/install_scripts/GEO/series/GSE7645.yaml +152 -0
  438. data/install_scripts/GEO/series/GSE7660.yaml +41 -0
  439. data/install_scripts/GEO/series/GSE7820.yaml +30 -0
  440. data/install_scripts/GEO/series/GSE79.yaml +32 -0
  441. data/install_scripts/GEO/series/GSE8035.yaml +19 -0
  442. data/install_scripts/GEO/series/GSE8088.yaml +13 -0
  443. data/install_scripts/GEO/series/GSE8089.yaml +19 -0
  444. data/install_scripts/GEO/series/GSE8111.yaml +15 -0
  445. data/install_scripts/GEO/series/GSE8237.yaml +35 -0
  446. data/install_scripts/GEO/series/GSE8326.yaml +37 -0
  447. data/install_scripts/GEO/series/GSE8399.yaml +13 -0
  448. data/install_scripts/GEO/series/GSE850.yaml +15 -0
  449. data/install_scripts/GEO/series/GSE8506.yaml +32 -0
  450. data/install_scripts/GEO/series/GSE8542.yaml +47 -0
  451. data/install_scripts/GEO/series/GSE8558.yaml +19 -0
  452. data/install_scripts/GEO/series/GSE8559.yaml +47 -0
  453. data/install_scripts/GEO/series/GSE8613.yaml +19 -0
  454. data/install_scripts/GEO/series/GSE8629.yaml +18 -0
  455. data/install_scripts/GEO/series/GSE8729.yaml +19 -0
  456. data/install_scripts/GEO/series/GSE8761.yaml +55 -0
  457. data/install_scripts/GEO/series/GSE8765.yaml +15 -0
  458. data/install_scripts/GEO/series/GSE8805.yaml +64 -0
  459. data/install_scripts/GEO/series/GSE8825.yaml +79 -0
  460. data/install_scripts/GEO/series/GSE8895.yaml +31 -0
  461. data/install_scripts/GEO/series/GSE8897.yaml +17 -0
  462. data/install_scripts/GEO/series/GSE8898.yaml +18 -0
  463. data/install_scripts/GEO/series/GSE8900.yaml +43 -0
  464. data/install_scripts/GEO/series/GSE8982.yaml +106 -0
  465. data/install_scripts/GEO/series/GSE920.yaml +20 -0
  466. data/install_scripts/GEO/series/GSE960.yaml +10 -0
  467. data/install_scripts/GEO/series/GSE961.yaml +14 -0
  468. data/install_scripts/GEO/series/GSE962.yaml +20 -0
  469. data/install_scripts/GEO/series/GSE963.yaml +14 -0
  470. data/install_scripts/GEO/series/GSE964.yaml +14 -0
  471. data/install_scripts/GEO/series/GSE965.yaml +14 -0
  472. data/install_scripts/GEO/series/GSE966.yaml +14 -0
  473. data/install_scripts/GEO/series/GSE993.yaml +9 -0
  474. data/lib/MARQ.rb +79 -0
  475. data/lib/MARQ/CustomDS.rb +99 -0
  476. data/lib/MARQ/GEO.rb +585 -0
  477. data/lib/MARQ/ID.rb +148 -0
  478. data/lib/MARQ/MADB.rb +243 -0
  479. data/lib/MARQ/annotations.rb +740 -0
  480. data/lib/MARQ/fdr.rb +177 -0
  481. data/lib/MARQ/main.rb +227 -0
  482. data/lib/MARQ/rankproduct.rb +146 -0
  483. data/lib/MARQ/score.rb +395 -0
  484. data/merb/Rakefile +35 -0
  485. data/merb/app/controllers/application.rb +2 -0
  486. data/merb/app/controllers/exceptions.rb +13 -0
  487. data/merb/app/controllers/help.rb +22 -0
  488. data/merb/app/controllers/main.rb +72 -0
  489. data/merb/app/controllers/normalize.rb +41 -0
  490. data/merb/app/controllers/results.rb +247 -0
  491. data/merb/app/controllers/series.rb +44 -0
  492. data/merb/app/helpers/global_helpers.rb +5 -0
  493. data/merb/app/helpers/main_helper.rb +5 -0
  494. data/merb/app/helpers/results_helper.rb +50 -0
  495. data/merb/app/stylesheets/marq.sass +561 -0
  496. data/merb/app/stylesheets/marq_mixins.sass +23 -0
  497. data/merb/app/stylesheets/rounded_corners.sass +35 -0
  498. data/merb/app/views/exceptions/not_acceptable.html.erb +63 -0
  499. data/merb/app/views/exceptions/not_found.html.erb +47 -0
  500. data/merb/app/views/help/_menu.html.haml +4 -0
  501. data/merb/app/views/help/index.html.haml +110 -0
  502. data/merb/app/views/help/meth.html.haml +301 -0
  503. data/merb/app/views/help/quick.html.haml +149 -0
  504. data/merb/app/views/layout/application.html.haml +27 -0
  505. data/merb/app/views/main/index.html.haml +96 -0
  506. data/merb/app/views/normalize/index.html.haml +51 -0
  507. data/merb/app/views/partials/_annotations.html.haml +37 -0
  508. data/merb/app/views/partials/_enrichment.html.haml +17 -0
  509. data/merb/app/views/partials/_experiment.html.haml +33 -0
  510. data/merb/app/views/partials/_ie.html.haml +19 -0
  511. data/merb/app/views/partials/_video.html.haml +5 -0
  512. data/merb/app/views/results/compare.html.haml +161 -0
  513. data/merb/app/views/results/error.html.haml +5 -0
  514. data/merb/app/views/results/explore_hits.html.haml +54 -0
  515. data/merb/app/views/results/images.html.haml +18 -0
  516. data/merb/app/views/results/main.html.haml +125 -0
  517. data/merb/app/views/results/wait.html.haml +10 -0
  518. data/merb/app/views/series/main.html.haml +99 -0
  519. data/merb/autotest/discover.rb +1 -0
  520. data/merb/autotest/merb.rb +149 -0
  521. data/merb/autotest/merb_rspec.rb +165 -0
  522. data/merb/config.ru +76 -0
  523. data/merb/config/environments/development.rb +15 -0
  524. data/merb/config/environments/production.rb +10 -0
  525. data/merb/config/environments/rake.rb +11 -0
  526. data/merb/config/environments/staging.rb +10 -0
  527. data/merb/config/environments/test.rb +12 -0
  528. data/merb/config/init.rb +66 -0
  529. data/merb/config/rack.rb +11 -0
  530. data/merb/config/router.rb +64 -0
  531. data/merb/doc/rdoc/generators/merb_generator.rb +1362 -0
  532. data/merb/doc/rdoc/generators/template/merb/api_grease.js +640 -0
  533. data/merb/doc/rdoc/generators/template/merb/index.html.erb +37 -0
  534. data/merb/doc/rdoc/generators/template/merb/merb.css +252 -0
  535. data/merb/doc/rdoc/generators/template/merb/merb.rb +351 -0
  536. data/merb/doc/rdoc/generators/template/merb/merb_doc_styles.css +492 -0
  537. data/merb/doc/rdoc/generators/template/merb/prototype.js +2515 -0
  538. data/merb/lib/helper.rb +452 -0
  539. data/merb/public/favicon.ico +0 -0
  540. data/merb/public/images/guide/annotations.png +0 -0
  541. data/merb/public/images/guide/compare.png +0 -0
  542. data/merb/public/images/guide/compare_page.png +0 -0
  543. data/merb/public/images/guide/download.png +0 -0
  544. data/merb/public/images/guide/genes.png +0 -0
  545. data/merb/public/images/guide/hits.png +0 -0
  546. data/merb/public/images/guide/name.png +0 -0
  547. data/merb/public/images/guide/organism.png +0 -0
  548. data/merb/public/images/guide/table.png +0 -0
  549. data/merb/public/images/loadingAnimation.gif +0 -0
  550. data/merb/public/images/logo_ARTECS.jpg +0 -0
  551. data/merb/public/images/logo_BCU.jpg +0 -0
  552. data/merb/public/images/logo_MICRO.png +0 -0
  553. data/merb/public/images/macFFBgHack.png +0 -0
  554. data/merb/public/images/merb.jpg +0 -0
  555. data/merb/public/images/meth/G.gif +0 -0
  556. data/merb/public/images/meth/MARQ.gif +0 -0
  557. data/merb/public/images/meth/PS_bottom.gif +0 -0
  558. data/merb/public/images/meth/PS_bottom_formula.gif +0 -0
  559. data/merb/public/images/meth/PS_top.gif +0 -0
  560. data/merb/public/images/meth/PS_top_formula.gif +0 -0
  561. data/merb/public/images/meth/Q.gif +0 -0
  562. data/merb/public/images/meth/Rplot.png +0 -0
  563. data/merb/public/images/meth/S_bottom.gif +0 -0
  564. data/merb/public/images/meth/S_diff.gif +0 -0
  565. data/merb/public/images/meth/S_down.gif +0 -0
  566. data/merb/public/images/meth/S_top.gif +0 -0
  567. data/merb/public/images/meth/S_up.gif +0 -0
  568. data/merb/public/images/meth/alpha.gif +0 -0
  569. data/merb/public/images/meth/beta_0.gif +0 -0
  570. data/merb/public/images/meth/beta_1.gif +0 -0
  571. data/merb/public/images/meth/d.gif +0 -0
  572. data/merb/public/images/meth/d_formula.gif +0 -0
  573. data/merb/public/images/meth/d_noabs.gif +0 -0
  574. data/merb/public/images/meth/d_range.gif +0 -0
  575. data/merb/public/images/meth/g.gif +0 -0
  576. data/merb/public/images/meth/i.gif +0 -0
  577. data/merb/public/images/meth/m.gif +0 -0
  578. data/merb/public/images/meth/p.gif +0 -0
  579. data/merb/public/images/meth/penalty.gif +0 -0
  580. data/merb/public/images/meth/q.gif +0 -0
  581. data/merb/public/images/meth/w.gif +0 -0
  582. data/merb/public/images/meth/w_formula.gif +0 -0
  583. data/merb/public/images/meth/w_weight.gif +0 -0
  584. data/merb/public/images/meth/weight.gif +0 -0
  585. data/merb/public/images/meth/weight_function.gif +0 -0
  586. data/merb/public/images/top.png +0 -0
  587. data/merb/public/images/top2.png +0 -0
  588. data/merb/public/images/wait.gif +0 -0
  589. data/merb/public/javascripts/jquery-ui.core.js +519 -0
  590. data/merb/public/javascripts/jquery-ui.hitarea.js +168 -0
  591. data/merb/public/javascripts/jquery.js +19 -0
  592. data/merb/public/javascripts/jquery.scrollTo.js +11 -0
  593. data/merb/public/javascripts/jquery.tablescroll.js +124 -0
  594. data/merb/public/javascripts/jquery.tabs.js +642 -0
  595. data/merb/public/javascripts/marq.js +51 -0
  596. data/merb/public/javascripts/marq_pages.js +504 -0
  597. data/merb/public/javascripts/thickbox.js +320 -0
  598. data/merb/public/javascripts/wz_jsgraphics.js +1108 -0
  599. data/merb/public/merb.fcgi +22 -0
  600. data/merb/public/plugins/dialog/javascripts/jquery-ui.dialog.js +44 -0
  601. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  602. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  603. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  604. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  605. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  606. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  607. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  608. data/merb/public/plugins/dialog/stylesheets/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  609. data/merb/public/plugins/dialog/stylesheets/images/ui-icons_222222_256x240.png +0 -0
  610. data/merb/public/plugins/dialog/stylesheets/images/ui-icons_2e83ff_256x240.png +0 -0
  611. data/merb/public/plugins/dialog/stylesheets/images/ui-icons_454545_256x240.png +0 -0
  612. data/merb/public/plugins/dialog/stylesheets/images/ui-icons_888888_256x240.png +0 -0
  613. data/merb/public/plugins/dialog/stylesheets/images/ui-icons_cd0a0a_256x240.png +0 -0
  614. data/merb/public/plugins/dialog/stylesheets/jquery-ui.dialog.css +404 -0
  615. data/merb/public/plugins/tablesorter/images/asc.gif +0 -0
  616. data/merb/public/plugins/tablesorter/images/bg.gif +0 -0
  617. data/merb/public/plugins/tablesorter/images/blue.zip +0 -0
  618. data/merb/public/plugins/tablesorter/images/desc.gif +0 -0
  619. data/merb/public/plugins/tablesorter/javascripts/jquery.tablesorter.js +2 -0
  620. data/merb/public/plugins/tablesorter/stylesheets/jquery.tablesorter.css +39 -0
  621. data/merb/public/robots.txt +5 -0
  622. data/merb/public/stylesheets/thickbox.css +163 -0
  623. data/merb/spec/requests/main_spec.rb +7 -0
  624. data/merb/spec/requests/results_spec.rb +7 -0
  625. data/merb/spec/spec.opts +0 -0
  626. data/merb/spec/spec_helper.rb +20 -0
  627. data/merb/tasks/merb.thor/app_script.rb +31 -0
  628. data/merb/tasks/merb.thor/common.rb +68 -0
  629. data/merb/tasks/merb.thor/gem_ext.rb +125 -0
  630. data/merb/tasks/merb.thor/main.thor +150 -0
  631. data/merb/tasks/merb.thor/ops.rb +93 -0
  632. data/merb/tasks/merb.thor/utils.rb +40 -0
  633. data/tasks/install.rake +21 -0
  634. data/webservice/MARQWS.rb +167 -0
  635. metadata +798 -0
@@ -0,0 +1,320 @@
1
+ /*
2
+ * Thickbox 3.1 - One Box To Rule Them All.
3
+ * By Cody Lindley (http://www.codylindley.com)
4
+ * Copyright (c) 2007 cody lindley
5
+ * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
6
+ */
7
+
8
+ var tb_pathToImage = "../images/loadingAnimation.gif";
9
+
10
+ /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
11
+
12
+ //on page load call tb_init
13
+ $(document).ready(function(){
14
+ tb_init('a.thickbox, area.thickbox, input.thickbox, option.thickbox');//pass where to apply thickbox
15
+ imgLoader = new Image();// preload image
16
+ imgLoader.src = tb_pathToImage;
17
+ });
18
+
19
+ //add thickbox to href & area elements that have a class of .thickbox
20
+ function tb_init(domChunk){
21
+ $(domChunk).click(function(){
22
+ var t = this.title || this.name || null;
23
+ var a = this.href || this.alt;
24
+ var g = this.rel || false;
25
+ tb_show(t,a,g);
26
+ this.blur();
27
+ return false;
28
+ });
29
+ }
30
+
31
+
32
+ function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
33
+
34
+ try {
35
+ if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
36
+ $("body","html").css({height: "100%", width: "100%"});
37
+ $("html").css("overflow","hidden");
38
+ if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
39
+ $("body").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");
40
+ $("#TB_overlay").click(tb_remove);
41
+ }
42
+ }else{//all others
43
+ if(document.getElementById("TB_overlay") === null){
44
+ $("body").append("<div id='TB_overlay'></div><div id='TB_window'></div>");
45
+ $("#TB_overlay").click(tb_remove);
46
+ }
47
+ }
48
+
49
+ if(tb_detectMacXFF()){
50
+ $("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash
51
+ }else{
52
+ $("#TB_overlay").addClass("TB_overlayBG");//use background and opacity
53
+ }
54
+
55
+ if(caption===null){caption="";}
56
+ $("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page
57
+ $('#TB_load').show();//show loader
58
+
59
+ var baseURL;
60
+ if(url.indexOf("?")!==-1){ //ff there is a query string involved
61
+ baseURL = url.substr(0, url.indexOf("?"));
62
+ }else{
63
+ baseURL = url;
64
+ }
65
+
66
+ var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;
67
+ var urlType = baseURL.toLowerCase().match(urlString);
68
+
69
+ if(urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images
70
+
71
+ TB_PrevCaption = "";
72
+ TB_PrevURL = "";
73
+ TB_PrevHTML = "";
74
+ TB_NextCaption = "";
75
+ TB_NextURL = "";
76
+ TB_NextHTML = "";
77
+ TB_imageCount = "";
78
+ TB_FoundURL = false;
79
+ if(imageGroup){
80
+ TB_TempArray = $("a[@rel="+imageGroup+"]").get();
81
+ for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) {
82
+ var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString);
83
+ if (!(TB_TempArray[TB_Counter].href == url)) {
84
+ if (TB_FoundURL) {
85
+ TB_NextCaption = TB_TempArray[TB_Counter].title;
86
+ TB_NextURL = TB_TempArray[TB_Counter].href;
87
+ TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>Next &gt;</a></span>";
88
+ } else {
89
+ TB_PrevCaption = TB_TempArray[TB_Counter].title;
90
+ TB_PrevURL = TB_TempArray[TB_Counter].href;
91
+ TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>&lt; Prev</a></span>";
92
+ }
93
+ } else {
94
+ TB_FoundURL = true;
95
+ TB_imageCount = "Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length);
96
+ }
97
+ }
98
+ }
99
+
100
+ imgPreloader = new Image();
101
+ imgPreloader.onload = function(){
102
+ imgPreloader.onload = null;
103
+
104
+ // Resizing large images - orginal by Christian Montoya edited by me.
105
+ var pagesize = tb_getPageSize();
106
+ var x = pagesize[0] - 150;
107
+ var y = pagesize[1] - 150;
108
+ var imageWidth = imgPreloader.width;
109
+ var imageHeight = imgPreloader.height;
110
+ if (imageWidth > x) {
111
+ imageHeight = imageHeight * (x / imageWidth);
112
+ imageWidth = x;
113
+ if (imageHeight > y) {
114
+ imageWidth = imageWidth * (y / imageHeight);
115
+ imageHeight = y;
116
+ }
117
+ } else if (imageHeight > y) {
118
+ imageWidth = imageWidth * (y / imageHeight);
119
+ imageHeight = y;
120
+ if (imageWidth > x) {
121
+ imageHeight = imageHeight * (x / imageWidth);
122
+ imageWidth = x;
123
+ }
124
+ }
125
+ // End Resizing
126
+
127
+ TB_WIDTH = imageWidth + 30;
128
+ TB_HEIGHT = imageHeight + 60;
129
+ $("#TB_window").append("<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div>");
130
+
131
+ $("#TB_closeWindowButton").click(tb_remove);
132
+
133
+ if (!(TB_PrevHTML === "")) {
134
+ function goPrev(){
135
+ if($(document).unbind("click",goPrev)){$(document).unbind("click",goPrev);}
136
+ $("#TB_window").remove();
137
+ $("body").append("<div id='TB_window'></div>");
138
+ tb_show(TB_PrevCaption, TB_PrevURL, imageGroup);
139
+ return false;
140
+ }
141
+ $("#TB_prev").click(goPrev);
142
+ }
143
+
144
+ if (!(TB_NextHTML === "")) {
145
+ function goNext(){
146
+ $("#TB_window").remove();
147
+ $("body").append("<div id='TB_window'></div>");
148
+ tb_show(TB_NextCaption, TB_NextURL, imageGroup);
149
+ return false;
150
+ }
151
+ $("#TB_next").click(goNext);
152
+
153
+ }
154
+
155
+ document.onkeydown = function(e){
156
+ if (e == null) { // ie
157
+ keycode = event.keyCode;
158
+ } else { // mozilla
159
+ keycode = e.which;
160
+ }
161
+ if(keycode == 27){ // close
162
+ tb_remove();
163
+ } else if(keycode == 190){ // display previous image
164
+ if(!(TB_NextHTML == "")){
165
+ document.onkeydown = "";
166
+ goNext();
167
+ }
168
+ } else if(keycode == 188){ // display next image
169
+ if(!(TB_PrevHTML == "")){
170
+ document.onkeydown = "";
171
+ goPrev();
172
+ }
173
+ }
174
+ };
175
+
176
+ tb_position();
177
+ $("#TB_load").remove();
178
+ $("#TB_ImageOff").click(tb_remove);
179
+ $("#TB_window").css({display:"block"}); //for safari using css instead of show
180
+ };
181
+
182
+ imgPreloader.src = url;
183
+ }else{//code to show html
184
+
185
+ var queryString = url.replace(/^[^\?]+\??/,'');
186
+ var params = tb_parseQuery( queryString );
187
+
188
+ TB_WIDTH = (params['width']*1) + 30 || 630; //defaults to 630 if no paramaters were added to URL
189
+ TB_HEIGHT = (params['height']*1) + 40 || 440; //defaults to 440 if no paramaters were added to URL
190
+ ajaxContentW = TB_WIDTH - 30;
191
+ ajaxContentH = TB_HEIGHT - 45;
192
+
193
+ if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window
194
+ urlNoQuery = url.split('TB_');
195
+ $("#TB_iframeContent").remove();
196
+ if(params['modal'] != "true"){//iframe no modal
197
+ $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a> or Esc Key</div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' > </iframe>");
198
+ }else{//iframe modal
199
+ $("#TB_overlay").unbind();
200
+ $("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'> </iframe>");
201
+ }
202
+ }else{// not an iframe, ajax
203
+ if($("#TB_window").css("display") != "block"){
204
+ if(params['modal'] != "true"){//ajax no modal
205
+ $("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'>close</a> or Esc Key</div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
206
+ }else{//ajax modal
207
+ $("#TB_overlay").unbind();
208
+ $("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
209
+ }
210
+ }else{//this means the window is already up, we are just loading new content via ajax
211
+ $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
212
+ $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
213
+ $("#TB_ajaxContent")[0].scrollTop = 0;
214
+ $("#TB_ajaxWindowTitle").html(caption);
215
+ }
216
+ }
217
+
218
+ $("#TB_closeWindowButton").click(tb_remove);
219
+
220
+ if(url.indexOf('TB_inline') != -1){
221
+ $("#TB_ajaxContent").append($('#' + params['inlineId']).children());
222
+ $("#TB_window").unload(function () {
223
+ $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
224
+ });
225
+ tb_position();
226
+ $("#TB_load").remove();
227
+ $("#TB_window").css({display:"block"});
228
+ }else if(url.indexOf('TB_iframe') != -1){
229
+ tb_position();
230
+ if($.browser.safari){//safari needs help because it will not fire iframe onload
231
+ $("#TB_load").remove();
232
+ $("#TB_window").css({display:"block"});
233
+ }
234
+ }else{
235
+ $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
236
+ tb_position();
237
+ $("#TB_load").remove();
238
+ tb_init("#TB_ajaxContent a.thickbox");
239
+ $("#TB_window").css({display:"block"});
240
+ });
241
+ }
242
+
243
+ }
244
+
245
+ if(!params['modal']){
246
+ document.onkeyup = function(e){
247
+ if (e == null) { // ie
248
+ keycode = event.keyCode;
249
+ } else { // mozilla
250
+ keycode = e.which;
251
+ }
252
+ if(keycode == 27){ // close
253
+ tb_remove();
254
+ }
255
+ };
256
+ }
257
+
258
+ } catch(e) {
259
+ //nothing here
260
+ }
261
+ }
262
+
263
+ //helper functions below
264
+ function tb_showIframe(){
265
+ $("#TB_load").remove();
266
+ $("#TB_window").css({display:"block"});
267
+ }
268
+
269
+ function tb_remove() {
270
+ $("#TB_imageOff").unbind("click");
271
+ $("#TB_closeWindowButton").unbind("click");
272
+ $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
273
+ $("#TB_load").remove();
274
+ if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
275
+ $("body","html").css({height: "auto", width: "auto"});
276
+ $("html").css("overflow","");
277
+ }
278
+ document.onkeydown = "";
279
+ document.onkeyup = "";
280
+ return false;
281
+ }
282
+
283
+ function tb_position() {
284
+ $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
285
+ if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
286
+ $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
287
+ }
288
+ }
289
+
290
+ function tb_parseQuery ( query ) {
291
+ var Params = {};
292
+ if ( ! query ) {return Params;}// return empty object
293
+ var Pairs = query.split(/[;&]/);
294
+ for ( var i = 0; i < Pairs.length; i++ ) {
295
+ var KeyVal = Pairs[i].split('=');
296
+ if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
297
+ var key = unescape( KeyVal[0] );
298
+ var val = unescape( KeyVal[1] );
299
+ val = val.replace(/\+/g, ' ');
300
+ Params[key] = val;
301
+ }
302
+ return Params;
303
+ }
304
+
305
+ function tb_getPageSize(){
306
+ var de = document.documentElement;
307
+ var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
308
+ var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
309
+ arrayPageSize = [w,h];
310
+ return arrayPageSize;
311
+ }
312
+
313
+ function tb_detectMacXFF() {
314
+ var userAgent = navigator.userAgent.toLowerCase();
315
+ if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
316
+ return true;
317
+ }
318
+ }
319
+
320
+
@@ -0,0 +1,1108 @@
1
+ /* This notice must be untouched at all times.
2
+
3
+ wz_jsgraphics.js v. 3.05
4
+ The latest version is available at
5
+ http://www.walterzorn.com
6
+ or http://www.devira.com
7
+ or http://www.walterzorn.de
8
+
9
+ Copyright (c) 2002-2009 Walter Zorn. All rights reserved.
10
+ Created 3. 11. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
11
+ Last modified: 2. 2. 2009
12
+
13
+ Performance optimizations for Internet Explorer
14
+ by Thomas Frank and John Holdsworth.
15
+ fillPolygon method implemented by Matthieu Haller.
16
+
17
+ High Performance JavaScript Graphics Library.
18
+ Provides methods
19
+ - to draw lines, rectangles, ellipses, polygons
20
+ with specifiable line thickness,
21
+ - to fill rectangles, polygons, ellipses and arcs
22
+ - to draw text.
23
+ NOTE: Operations, functions and branching have rather been optimized
24
+ to efficiency and speed than to shortness of source code.
25
+
26
+ LICENSE: LGPL
27
+
28
+ This library is free software; you can redistribute it and/or
29
+ modify it under the terms of the GNU Lesser General Public
30
+ License (LGPL) as published by the Free Software Foundation; either
31
+ version 2.1 of the License, or (at your option) any later version.
32
+
33
+ This library is distributed in the hope that it will be useful,
34
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
35
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36
+ Lesser General Public License for more details.
37
+
38
+ You should have received a copy of the GNU Lesser General Public
39
+ License along with this library; if not, write to the Free Software
40
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
41
+ or see http://www.gnu.org/copyleft/lesser.html
42
+ */
43
+
44
+
45
+ var jg_ok, jg_ie, jg_fast, jg_dom, jg_moz;
46
+
47
+
48
+ function _chkDHTM(wnd, x, i)
49
+ // Under XUL, owner of 'document' must be specified explicitly
50
+ {
51
+ x = wnd.document.body || null;
52
+ jg_ie = x && typeof x.insertAdjacentHTML != "undefined" && wnd.document.createElement;
53
+ jg_dom = (x && !jg_ie &&
54
+ typeof x.appendChild != "undefined" &&
55
+ typeof wnd.document.createRange != "undefined" &&
56
+ typeof (i = wnd.document.createRange()).setStartBefore != "undefined" &&
57
+ typeof i.createContextualFragment != "undefined");
58
+ jg_fast = jg_ie && wnd.document.all && !wnd.opera;
59
+ jg_moz = jg_dom && typeof x.style.MozOpacity != "undefined";
60
+ jg_ok = !!(jg_ie || jg_dom);
61
+ }
62
+
63
+ function _pntCnvDom()
64
+ {
65
+ var x = this.wnd.document.createRange();
66
+ x.setStartBefore(this.cnv);
67
+ x = x.createContextualFragment(jg_fast? this._htmRpc() : this.htm);
68
+ if(this.cnv) this.cnv.appendChild(x);
69
+ this.htm = "";
70
+ }
71
+
72
+ function _pntCnvIe()
73
+ {
74
+ if(this.cnv) this.cnv.insertAdjacentHTML("BeforeEnd", jg_fast? this._htmRpc() : this.htm);
75
+ this.htm = "";
76
+ }
77
+
78
+ function _pntDoc()
79
+ {
80
+ this.wnd.document.write(jg_fast? this._htmRpc() : this.htm);
81
+ this.htm = '';
82
+ }
83
+
84
+ function _pntN()
85
+ {
86
+ ;
87
+ }
88
+
89
+ function _mkDiv(x, y, w, h)
90
+ {
91
+ this.htm += '<div style="position:absolute;'+
92
+ 'left:' + x + 'px;'+
93
+ 'top:' + y + 'px;'+
94
+ 'width:' + w + 'px;'+
95
+ 'height:' + h + 'px;'+
96
+ 'clip:rect(0,'+w+'px,'+h+'px,0);'+
97
+ 'background-color:' + this.color +
98
+ (!jg_moz? ';overflow:hidden' : '')+
99
+ ';"><\/div>';
100
+ }
101
+
102
+ function _mkDivIe(x, y, w, h)
103
+ {
104
+ this.htm += '%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';
105
+ }
106
+
107
+ function _mkDivPrt(x, y, w, h)
108
+ {
109
+ this.htm += '<div style="position:absolute;'+
110
+ 'border-left:' + w + 'px solid ' + this.color + ';'+
111
+ 'left:' + x + 'px;'+
112
+ 'top:' + y + 'px;'+
113
+ 'width:0px;'+
114
+ 'height:' + h + 'px;'+
115
+ 'clip:rect(0,'+w+'px,'+h+'px,0);'+
116
+ 'background-color:' + this.color +
117
+ (!jg_moz? ';overflow:hidden' : '')+
118
+ ';"><\/div>';
119
+ }
120
+
121
+ var _regex = /%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;
122
+ function _htmRpc()
123
+ {
124
+ return this.htm.replace(
125
+ _regex,
126
+ '<div style="overflow:hidden;position:absolute;background-color:'+
127
+ '$1;left:$2px;top:$3px;width:$4px;height:$5px"></div>\n');
128
+ }
129
+
130
+ function _htmPrtRpc()
131
+ {
132
+ return this.htm.replace(
133
+ _regex,
134
+ '<div style="overflow:hidden;position:absolute;background-color:'+
135
+ '$1;left:$2px;top:$3px;width:$4px;height:$5px;border-left:$4px solid $1"></div>\n');
136
+ }
137
+
138
+ function _mkLin(x1, y1, x2, y2)
139
+ {
140
+ if(x1 > x2)
141
+ {
142
+ var _x2 = x2;
143
+ var _y2 = y2;
144
+ x2 = x1;
145
+ y2 = y1;
146
+ x1 = _x2;
147
+ y1 = _y2;
148
+ }
149
+ var dx = x2-x1, dy = Math.abs(y2-y1),
150
+ x = x1, y = y1,
151
+ yIncr = (y1 > y2)? -1 : 1;
152
+
153
+ if(dx >= dy)
154
+ {
155
+ var pr = dy<<1,
156
+ pru = pr - (dx<<1),
157
+ p = pr-dx,
158
+ ox = x;
159
+ while(dx > 0)
160
+ {--dx;
161
+ ++x;
162
+ if(p > 0)
163
+ {
164
+ this._mkDiv(ox, y, x-ox, 1);
165
+ y += yIncr;
166
+ p += pru;
167
+ ox = x;
168
+ }
169
+ else p += pr;
170
+ }
171
+ this._mkDiv(ox, y, x2-ox+1, 1);
172
+ }
173
+
174
+ else
175
+ {
176
+ var pr = dx<<1,
177
+ pru = pr - (dy<<1),
178
+ p = pr-dy,
179
+ oy = y;
180
+ if(y2 <= y1)
181
+ {
182
+ while(dy > 0)
183
+ {--dy;
184
+ if(p > 0)
185
+ {
186
+ this._mkDiv(x++, y, 1, oy-y+1);
187
+ y += yIncr;
188
+ p += pru;
189
+ oy = y;
190
+ }
191
+ else
192
+ {
193
+ y += yIncr;
194
+ p += pr;
195
+ }
196
+ }
197
+ this._mkDiv(x2, y2, 1, oy-y2+1);
198
+ }
199
+ else
200
+ {
201
+ while(dy > 0)
202
+ {--dy;
203
+ y += yIncr;
204
+ if(p > 0)
205
+ {
206
+ this._mkDiv(x++, oy, 1, y-oy);
207
+ p += pru;
208
+ oy = y;
209
+ }
210
+ else p += pr;
211
+ }
212
+ this._mkDiv(x2, oy, 1, y2-oy+1);
213
+ }
214
+ }
215
+ }
216
+
217
+ function _mkLin2D(x1, y1, x2, y2)
218
+ {
219
+ if(x1 > x2)
220
+ {
221
+ var _x2 = x2;
222
+ var _y2 = y2;
223
+ x2 = x1;
224
+ y2 = y1;
225
+ x1 = _x2;
226
+ y1 = _y2;
227
+ }
228
+ var dx = x2-x1, dy = Math.abs(y2-y1),
229
+ x = x1, y = y1,
230
+ yIncr = (y1 > y2)? -1 : 1;
231
+
232
+ var s = this.stroke;
233
+ if(dx >= dy)
234
+ {
235
+ if(dx > 0 && s-3 > 0)
236
+ {
237
+ var _s = (s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy) / dx;
238
+ _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
239
+ }
240
+ else var _s = s;
241
+ var ad = Math.ceil(s/2);
242
+
243
+ var pr = dy<<1,
244
+ pru = pr - (dx<<1),
245
+ p = pr-dx,
246
+ ox = x;
247
+ while(dx > 0)
248
+ {--dx;
249
+ ++x;
250
+ if(p > 0)
251
+ {
252
+ this._mkDiv(ox, y, x-ox+ad, _s);
253
+ y += yIncr;
254
+ p += pru;
255
+ ox = x;
256
+ }
257
+ else p += pr;
258
+ }
259
+ this._mkDiv(ox, y, x2-ox+ad+1, _s);
260
+ }
261
+
262
+ else
263
+ {
264
+ if(s-3 > 0)
265
+ {
266
+ var _s = (s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy) / dy;
267
+ _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
268
+ }
269
+ else var _s = s;
270
+ var ad = Math.round(s/2);
271
+
272
+ var pr = dx<<1,
273
+ pru = pr - (dy<<1),
274
+ p = pr-dy,
275
+ oy = y;
276
+ if(y2 <= y1)
277
+ {
278
+ ++ad;
279
+ while(dy > 0)
280
+ {--dy;
281
+ if(p > 0)
282
+ {
283
+ this._mkDiv(x++, y, _s, oy-y+ad);
284
+ y += yIncr;
285
+ p += pru;
286
+ oy = y;
287
+ }
288
+ else
289
+ {
290
+ y += yIncr;
291
+ p += pr;
292
+ }
293
+ }
294
+ this._mkDiv(x2, y2, _s, oy-y2+ad);
295
+ }
296
+ else
297
+ {
298
+ while(dy > 0)
299
+ {--dy;
300
+ y += yIncr;
301
+ if(p > 0)
302
+ {
303
+ this._mkDiv(x++, oy, _s, y-oy+ad);
304
+ p += pru;
305
+ oy = y;
306
+ }
307
+ else p += pr;
308
+ }
309
+ this._mkDiv(x2, oy, _s, y2-oy+ad+1);
310
+ }
311
+ }
312
+ }
313
+
314
+ function _mkLinDott(x1, y1, x2, y2)
315
+ {
316
+ if(x1 > x2)
317
+ {
318
+ var _x2 = x2;
319
+ var _y2 = y2;
320
+ x2 = x1;
321
+ y2 = y1;
322
+ x1 = _x2;
323
+ y1 = _y2;
324
+ }
325
+ var dx = x2-x1, dy = Math.abs(y2-y1),
326
+ x = x1, y = y1,
327
+ yIncr = (y1 > y2)? -1 : 1,
328
+ drw = true;
329
+ if(dx >= dy)
330
+ {
331
+ var pr = dy<<1,
332
+ pru = pr - (dx<<1),
333
+ p = pr-dx;
334
+ while(dx > 0)
335
+ {--dx;
336
+ if(drw) this._mkDiv(x, y, 1, 1);
337
+ drw = !drw;
338
+ if(p > 0)
339
+ {
340
+ y += yIncr;
341
+ p += pru;
342
+ }
343
+ else p += pr;
344
+ ++x;
345
+ }
346
+ }
347
+ else
348
+ {
349
+ var pr = dx<<1,
350
+ pru = pr - (dy<<1),
351
+ p = pr-dy;
352
+ while(dy > 0)
353
+ {--dy;
354
+ if(drw) this._mkDiv(x, y, 1, 1);
355
+ drw = !drw;
356
+ y += yIncr;
357
+ if(p > 0)
358
+ {
359
+ ++x;
360
+ p += pru;
361
+ }
362
+ else p += pr;
363
+ }
364
+ }
365
+ if(drw) this._mkDiv(x, y, 1, 1);
366
+ }
367
+
368
+ function _mkOv(left, top, width, height)
369
+ {
370
+ var a = (++width)>>1, b = (++height)>>1,
371
+ wod = width&1, hod = height&1,
372
+ cx = left+a, cy = top+b,
373
+ x = 0, y = b,
374
+ ox = 0, oy = b,
375
+ aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
376
+ st = (aa2>>1)*(1-(b<<1)) + bb2,
377
+ tt = (bb2>>1) - aa2*((b<<1)-1),
378
+ w, h;
379
+ while(y > 0)
380
+ {
381
+ if(st < 0)
382
+ {
383
+ st += bb2*((x<<1)+3);
384
+ tt += bb4*(++x);
385
+ }
386
+ else if(tt < 0)
387
+ {
388
+ st += bb2*((x<<1)+3) - aa4*(y-1);
389
+ tt += bb4*(++x) - aa2*(((y--)<<1)-3);
390
+ w = x-ox;
391
+ h = oy-y;
392
+ if((w&2) && (h&2))
393
+ {
394
+ this._mkOvQds(cx, cy, x-2, y+2, 1, 1, wod, hod);
395
+ this._mkOvQds(cx, cy, x-1, y+1, 1, 1, wod, hod);
396
+ }
397
+ else this._mkOvQds(cx, cy, x-1, oy, w, h, wod, hod);
398
+ ox = x;
399
+ oy = y;
400
+ }
401
+ else
402
+ {
403
+ tt -= aa2*((y<<1)-3);
404
+ st -= aa4*(--y);
405
+ }
406
+ }
407
+ w = a-ox+1;
408
+ h = (oy<<1)+hod;
409
+ y = cy-oy;
410
+ this._mkDiv(cx-a, y, w, h);
411
+ this._mkDiv(cx+ox+wod-1, y, w, h);
412
+ }
413
+
414
+ function _mkOv2D(left, top, width, height)
415
+ {
416
+ var s = this.stroke;
417
+ width += s+1;
418
+ height += s+1;
419
+ var a = width>>1, b = height>>1,
420
+ wod = width&1, hod = height&1,
421
+ cx = left+a, cy = top+b,
422
+ x = 0, y = b,
423
+ aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
424
+ st = (aa2>>1)*(1-(b<<1)) + bb2,
425
+ tt = (bb2>>1) - aa2*((b<<1)-1);
426
+
427
+ if(s-4 < 0 && (!(s-2) || width-51 > 0 && height-51 > 0))
428
+ {
429
+ var ox = 0, oy = b,
430
+ w, h,
431
+ pxw;
432
+ while(y > 0)
433
+ {
434
+ if(st < 0)
435
+ {
436
+ st += bb2*((x<<1)+3);
437
+ tt += bb4*(++x);
438
+ }
439
+ else if(tt < 0)
440
+ {
441
+ st += bb2*((x<<1)+3) - aa4*(y-1);
442
+ tt += bb4*(++x) - aa2*(((y--)<<1)-3);
443
+ w = x-ox;
444
+ h = oy-y;
445
+
446
+ if(w-1)
447
+ {
448
+ pxw = w+1+(s&1);
449
+ h = s;
450
+ }
451
+ else if(h-1)
452
+ {
453
+ pxw = s;
454
+ h += 1+(s&1);
455
+ }
456
+ else pxw = h = s;
457
+ this._mkOvQds(cx, cy, x-1, oy, pxw, h, wod, hod);
458
+ ox = x;
459
+ oy = y;
460
+ }
461
+ else
462
+ {
463
+ tt -= aa2*((y<<1)-3);
464
+ st -= aa4*(--y);
465
+ }
466
+ }
467
+ this._mkDiv(cx-a, cy-oy, s, (oy<<1)+hod);
468
+ this._mkDiv(cx+a+wod-s, cy-oy, s, (oy<<1)+hod);
469
+ }
470
+
471
+ else
472
+ {
473
+ var _a = (width-(s<<1))>>1,
474
+ _b = (height-(s<<1))>>1,
475
+ _x = 0, _y = _b,
476
+ _aa2 = (_a*_a)<<1, _aa4 = _aa2<<1, _bb2 = (_b*_b)<<1, _bb4 = _bb2<<1,
477
+ _st = (_aa2>>1)*(1-(_b<<1)) + _bb2,
478
+ _tt = (_bb2>>1) - _aa2*((_b<<1)-1),
479
+
480
+ pxl = new Array(),
481
+ pxt = new Array(),
482
+ _pxb = new Array();
483
+ pxl[0] = 0;
484
+ pxt[0] = b;
485
+ _pxb[0] = _b-1;
486
+ while(y > 0)
487
+ {
488
+ if(st < 0)
489
+ {
490
+ pxl[pxl.length] = x;
491
+ pxt[pxt.length] = y;
492
+ st += bb2*((x<<1)+3);
493
+ tt += bb4*(++x);
494
+ }
495
+ else if(tt < 0)
496
+ {
497
+ pxl[pxl.length] = x;
498
+ st += bb2*((x<<1)+3) - aa4*(y-1);
499
+ tt += bb4*(++x) - aa2*(((y--)<<1)-3);
500
+ pxt[pxt.length] = y;
501
+ }
502
+ else
503
+ {
504
+ tt -= aa2*((y<<1)-3);
505
+ st -= aa4*(--y);
506
+ }
507
+
508
+ if(_y > 0)
509
+ {
510
+ if(_st < 0)
511
+ {
512
+ _st += _bb2*((_x<<1)+3);
513
+ _tt += _bb4*(++_x);
514
+ _pxb[_pxb.length] = _y-1;
515
+ }
516
+ else if(_tt < 0)
517
+ {
518
+ _st += _bb2*((_x<<1)+3) - _aa4*(_y-1);
519
+ _tt += _bb4*(++_x) - _aa2*(((_y--)<<1)-3);
520
+ _pxb[_pxb.length] = _y-1;
521
+ }
522
+ else
523
+ {
524
+ _tt -= _aa2*((_y<<1)-3);
525
+ _st -= _aa4*(--_y);
526
+ _pxb[_pxb.length-1]--;
527
+ }
528
+ }
529
+ }
530
+
531
+ var ox = -wod, oy = b,
532
+ _oy = _pxb[0],
533
+ l = pxl.length,
534
+ w, h;
535
+ for(var i = 0; i < l; i++)
536
+ {
537
+ if(typeof _pxb[i] != "undefined")
538
+ {
539
+ if(_pxb[i] < _oy || pxt[i] < oy)
540
+ {
541
+ x = pxl[i];
542
+ this._mkOvQds(cx, cy, x, oy, x-ox, oy-_oy, wod, hod);
543
+ ox = x;
544
+ oy = pxt[i];
545
+ _oy = _pxb[i];
546
+ }
547
+ }
548
+ else
549
+ {
550
+ x = pxl[i];
551
+ this._mkDiv(cx-x, cy-oy, 1, (oy<<1)+hod);
552
+ this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
553
+ ox = x;
554
+ oy = pxt[i];
555
+ }
556
+ }
557
+ this._mkDiv(cx-a, cy-oy, 1, (oy<<1)+hod);
558
+ this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
559
+ }
560
+ }
561
+
562
+ function _mkOvDott(left, top, width, height)
563
+ {
564
+ var a = (++width)>>1, b = (++height)>>1,
565
+ wod = width&1, hod = height&1, hodu = hod^1,
566
+ cx = left+a, cy = top+b,
567
+ x = 0, y = b,
568
+ aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
569
+ st = (aa2>>1)*(1-(b<<1)) + bb2,
570
+ tt = (bb2>>1) - aa2*((b<<1)-1),
571
+ drw = true;
572
+ while(y > 0)
573
+ {
574
+ if(st < 0)
575
+ {
576
+ st += bb2*((x<<1)+3);
577
+ tt += bb4*(++x);
578
+ }
579
+ else if(tt < 0)
580
+ {
581
+ st += bb2*((x<<1)+3) - aa4*(y-1);
582
+ tt += bb4*(++x) - aa2*(((y--)<<1)-3);
583
+ }
584
+ else
585
+ {
586
+ tt -= aa2*((y<<1)-3);
587
+ st -= aa4*(--y);
588
+ }
589
+ if(drw && y >= hodu) this._mkOvQds(cx, cy, x, y, 1, 1, wod, hod);
590
+ drw = !drw;
591
+ }
592
+ }
593
+
594
+ function _mkRect(x, y, w, h)
595
+ {
596
+ var s = this.stroke;
597
+ this._mkDiv(x, y, w, s);
598
+ this._mkDiv(x+w, y, s, h);
599
+ this._mkDiv(x, y+h, w+s, s);
600
+ this._mkDiv(x, y+s, s, h-s);
601
+ }
602
+
603
+ function _mkRectDott(x, y, w, h)
604
+ {
605
+ this.drawLine(x, y, x+w, y);
606
+ this.drawLine(x+w, y, x+w, y+h);
607
+ this.drawLine(x, y+h, x+w, y+h);
608
+ this.drawLine(x, y, x, y+h);
609
+ }
610
+
611
+ function jsgFont()
612
+ {
613
+ this.PLAIN = 'font-weight:normal;';
614
+ this.BOLD = 'font-weight:bold;';
615
+ this.ITALIC = 'font-style:italic;';
616
+ this.ITALIC_BOLD = this.ITALIC + this.BOLD;
617
+ this.BOLD_ITALIC = this.ITALIC_BOLD;
618
+ }
619
+ var Font = new jsgFont();
620
+
621
+ function jsgStroke()
622
+ {
623
+ this.DOTTED = -1;
624
+ }
625
+ var Stroke = new jsgStroke();
626
+
627
+ function jsGraphics(cnv, wnd)
628
+ {
629
+ this.setColor = function(x)
630
+ {
631
+ this.color = x.toLowerCase();
632
+ };
633
+
634
+ this.setStroke = function(x)
635
+ {
636
+ this.stroke = x;
637
+ if(!(x+1))
638
+ {
639
+ this.drawLine = _mkLinDott;
640
+ this._mkOv = _mkOvDott;
641
+ this.drawRect = _mkRectDott;
642
+ }
643
+ else if(x-1 > 0)
644
+ {
645
+ this.drawLine = _mkLin2D;
646
+ this._mkOv = _mkOv2D;
647
+ this.drawRect = _mkRect;
648
+ }
649
+ else
650
+ {
651
+ this.drawLine = _mkLin;
652
+ this._mkOv = _mkOv;
653
+ this.drawRect = _mkRect;
654
+ }
655
+ };
656
+
657
+ this.setPrintable = function(arg)
658
+ {
659
+ this.printable = arg;
660
+ if(jg_fast)
661
+ {
662
+ this._mkDiv = _mkDivIe;
663
+ this._htmRpc = arg? _htmPrtRpc : _htmRpc;
664
+ }
665
+ else this._mkDiv = arg? _mkDivPrt : _mkDiv;
666
+ };
667
+
668
+ this.setFont = function(fam, sz, sty)
669
+ {
670
+ this.ftFam = fam;
671
+ this.ftSz = sz;
672
+ this.ftSty = sty || Font.PLAIN;
673
+ };
674
+
675
+ this.drawPolyline = this.drawPolyLine = function(x, y)
676
+ {
677
+ for (var i=x.length - 1; i;)
678
+ {--i;
679
+ this.drawLine(x[i], y[i], x[i+1], y[i+1]);
680
+ }
681
+ };
682
+
683
+ this.fillRect = function(x, y, w, h)
684
+ {
685
+ this._mkDiv(x, y, w, h);
686
+ };
687
+
688
+ this.drawPolygon = function(x, y)
689
+ {
690
+ this.drawPolyline(x, y);
691
+ this.drawLine(x[x.length-1], y[x.length-1], x[0], y[0]);
692
+ };
693
+
694
+ this.drawEllipse = this.drawOval = function(x, y, w, h)
695
+ {
696
+ this._mkOv(x, y, w, h);
697
+ };
698
+
699
+ this.fillEllipse = this.fillOval = function(left, top, w, h)
700
+ {
701
+ var a = w>>1, b = h>>1,
702
+ wod = w&1, hod = h&1,
703
+ cx = left+a, cy = top+b,
704
+ x = 0, y = b, oy = b,
705
+ aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
706
+ st = (aa2>>1)*(1-(b<<1)) + bb2,
707
+ tt = (bb2>>1) - aa2*((b<<1)-1),
708
+ xl, dw, dh;
709
+ if(w) while(y > 0)
710
+ {
711
+ if(st < 0)
712
+ {
713
+ st += bb2*((x<<1)+3);
714
+ tt += bb4*(++x);
715
+ }
716
+ else if(tt < 0)
717
+ {
718
+ st += bb2*((x<<1)+3) - aa4*(y-1);
719
+ xl = cx-x;
720
+ dw = (x<<1)+wod;
721
+ tt += bb4*(++x) - aa2*(((y--)<<1)-3);
722
+ dh = oy-y;
723
+ this._mkDiv(xl, cy-oy, dw, dh);
724
+ this._mkDiv(xl, cy+y+hod, dw, dh);
725
+ oy = y;
726
+ }
727
+ else
728
+ {
729
+ tt -= aa2*((y<<1)-3);
730
+ st -= aa4*(--y);
731
+ }
732
+ }
733
+ this._mkDiv(cx-a, cy-oy, w, (oy<<1)+hod);
734
+ };
735
+
736
+ this.fillArc = function(iL, iT, iW, iH, fAngA, fAngZ)
737
+ {
738
+ var a = iW>>1, b = iH>>1,
739
+ iOdds = (iW&1) | ((iH&1) << 16),
740
+ cx = iL+a, cy = iT+b,
741
+ x = 0, y = b, ox = x, oy = y,
742
+ aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
743
+ st = (aa2>>1)*(1-(b<<1)) + bb2,
744
+ tt = (bb2>>1) - aa2*((b<<1)-1),
745
+ // Vars for radial boundary lines
746
+ xEndA, yEndA, xEndZ, yEndZ,
747
+ iSects = (1 << (Math.floor((fAngA %= 360.0)/180.0) << 3))
748
+ | (2 << (Math.floor((fAngZ %= 360.0)/180.0) << 3))
749
+ | ((fAngA >= fAngZ) << 16),
750
+ aBndA = new Array(b+1), aBndZ = new Array(b+1);
751
+
752
+ // Set up radial boundary lines
753
+ fAngA *= Math.PI/180.0;
754
+ fAngZ *= Math.PI/180.0;
755
+ xEndA = cx+Math.round(a*Math.cos(fAngA));
756
+ yEndA = cy+Math.round(-b*Math.sin(fAngA));
757
+ _mkLinVirt(aBndA, cx, cy, xEndA, yEndA);
758
+ xEndZ = cx+Math.round(a*Math.cos(fAngZ));
759
+ yEndZ = cy+Math.round(-b*Math.sin(fAngZ));
760
+ _mkLinVirt(aBndZ, cx, cy, xEndZ, yEndZ);
761
+
762
+ while(y > 0)
763
+ {
764
+ if(st < 0) // Advance x
765
+ {
766
+ st += bb2*((x<<1)+3);
767
+ tt += bb4*(++x);
768
+ }
769
+ else if(tt < 0) // Advance x and y
770
+ {
771
+ st += bb2*((x<<1)+3) - aa4*(y-1);
772
+ ox = x;
773
+ tt += bb4*(++x) - aa2*(((y--)<<1)-3);
774
+ this._mkArcDiv(ox, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
775
+ oy = y;
776
+ }
777
+ else // Advance y
778
+ {
779
+ tt -= aa2*((y<<1)-3);
780
+ st -= aa4*(--y);
781
+ if(y && (aBndA[y] != aBndA[y-1] || aBndZ[y] != aBndZ[y-1]))
782
+ {
783
+ this._mkArcDiv(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
784
+ ox = x;
785
+ oy = y;
786
+ }
787
+ }
788
+ }
789
+ this._mkArcDiv(x, 0, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
790
+ if(iOdds >> 16) // Odd height
791
+ {
792
+ if(iSects >> 16) // Start-angle > end-angle
793
+ {
794
+ var xl = (yEndA <= cy || yEndZ > cy)? (cx - x) : cx;
795
+ this._mkDiv(xl, cy, x + cx - xl + (iOdds & 0xffff), 1);
796
+ }
797
+ else if((iSects & 0x01) && yEndZ > cy)
798
+ this._mkDiv(cx - x, cy, x, 1);
799
+ }
800
+ };
801
+
802
+ /* fillPolygon method, implemented by Matthieu Haller.
803
+ This javascript function is an adaptation of the gdImageFilledPolygon for Walter Zorn lib.
804
+ C source of GD 1.8.4 found at http://www.boutell.com/gd/
805
+
806
+ THANKS to Kirsten Schulz for the polygon fixes!
807
+
808
+ The intersection finding technique of this code could be improved
809
+ by remembering the previous intertersection, and by using the slope.
810
+ That could help to adjust intersections to produce a nice
811
+ interior_extrema. */
812
+ this.fillPolygon = function(array_x, array_y)
813
+ {
814
+ var i;
815
+ var y;
816
+ var miny, maxy;
817
+ var x1, y1;
818
+ var x2, y2;
819
+ var ind1, ind2;
820
+ var ints;
821
+
822
+ var n = array_x.length;
823
+ if(!n) return;
824
+
825
+ miny = array_y[0];
826
+ maxy = array_y[0];
827
+ for(i = 1; i < n; i++)
828
+ {
829
+ if(array_y[i] < miny)
830
+ miny = array_y[i];
831
+
832
+ if(array_y[i] > maxy)
833
+ maxy = array_y[i];
834
+ }
835
+ for(y = miny; y <= maxy; y++)
836
+ {
837
+ var polyInts = new Array();
838
+ ints = 0;
839
+ for(i = 0; i < n; i++)
840
+ {
841
+ if(!i)
842
+ {
843
+ ind1 = n-1;
844
+ ind2 = 0;
845
+ }
846
+ else
847
+ {
848
+ ind1 = i-1;
849
+ ind2 = i;
850
+ }
851
+ y1 = array_y[ind1];
852
+ y2 = array_y[ind2];
853
+ if(y1 < y2)
854
+ {
855
+ x1 = array_x[ind1];
856
+ x2 = array_x[ind2];
857
+ }
858
+ else if(y1 > y2)
859
+ {
860
+ y2 = array_y[ind1];
861
+ y1 = array_y[ind2];
862
+ x2 = array_x[ind1];
863
+ x1 = array_x[ind2];
864
+ }
865
+ else continue;
866
+
867
+ // Modified 11. 2. 2004 Walter Zorn
868
+ if((y >= y1) && (y < y2))
869
+ polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
870
+
871
+ else if((y == maxy) && (y > y1) && (y <= y2))
872
+ polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
873
+ }
874
+ polyInts.sort(_CompInt);
875
+ for(i = 0; i < ints; i+=2)
876
+ this._mkDiv(polyInts[i], y, polyInts[i+1]-polyInts[i]+1, 1);
877
+ }
878
+ };
879
+
880
+ this.drawString = function(txt, x, y)
881
+ {
882
+ this.htm += '<div style="position:absolute;white-space:nowrap;'+
883
+ 'left:' + x + 'px;'+
884
+ 'top:' + y + 'px;'+
885
+ 'font-family:' + this.ftFam + ';'+
886
+ 'font-size:' + this.ftSz + ';'+
887
+ 'color:' + this.color + ';' + this.ftSty + '">'+
888
+ txt +
889
+ '<\/div>';
890
+ };
891
+
892
+ /* drawStringRect() added by Rick Blommers.
893
+ Allows to specify the size of the text rectangle and to align the
894
+ text both horizontally (e.g. right) and vertically within that rectangle */
895
+ this.drawStringRect = function(txt, x, y, width, halign)
896
+ {
897
+ this.htm += '<div style="position:absolute;overflow:hidden;'+
898
+ 'left:' + x + 'px;'+
899
+ 'top:' + y + 'px;'+
900
+ 'width:'+width +'px;'+
901
+ 'text-align:'+halign+';'+
902
+ 'font-family:' + this.ftFam + ';'+
903
+ 'font-size:' + this.ftSz + ';'+
904
+ 'color:' + this.color + ';' + this.ftSty + '">'+
905
+ txt +
906
+ '<\/div>';
907
+ };
908
+
909
+ this.drawImage = function(imgSrc, x, y, w, h, a)
910
+ {
911
+ this.htm += '<div style="position:absolute;'+
912
+ 'left:' + x + 'px;'+
913
+ 'top:' + y + 'px;'+
914
+ // w (width) and h (height) arguments are now optional.
915
+ // Added by Mahmut Keygubatli, 14.1.2008
916
+ (w? ('width:' + w + 'px;') : '') +
917
+ (h? ('height:' + h + 'px;'):'')+'">'+
918
+ '<img src="' + imgSrc +'"'+ (w ? (' width="' + w + '"'):'')+ (h ? (' height="' + h + '"'):'') + (a? (' '+a) : '') + '>'+
919
+ '<\/div>';
920
+ };
921
+
922
+ this.clear = function()
923
+ {
924
+ this.htm = "";
925
+ if(this.cnv) this.cnv.innerHTML = "";
926
+ };
927
+
928
+ this._mkOvQds = function(cx, cy, x, y, w, h, wod, hod)
929
+ {
930
+ var xl = cx - x, xr = cx + x + wod - w, yt = cy - y, yb = cy + y + hod - h;
931
+ if(xr > xl+w)
932
+ {
933
+ this._mkDiv(xr, yt, w, h);
934
+ this._mkDiv(xr, yb, w, h);
935
+ }
936
+ else
937
+ w = xr - xl + w;
938
+ this._mkDiv(xl, yt, w, h);
939
+ this._mkDiv(xl, yb, w, h);
940
+ };
941
+
942
+ this._mkArcDiv = function(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects)
943
+ {
944
+ var xrDef = cx + x + (iOdds & 0xffff), y2, h = oy - y, xl, xr, w;
945
+
946
+ if(!h) h = 1;
947
+ x = cx - x;
948
+
949
+ if(iSects & 0xff0000) // Start-angle > end-angle
950
+ {
951
+ y2 = cy - y - h;
952
+ if(iSects & 0x00ff)
953
+ {
954
+ if(iSects & 0x02)
955
+ {
956
+ xl = Math.max(x, aBndZ[y]);
957
+ w = xrDef - xl;
958
+ if(w > 0) this._mkDiv(xl, y2, w, h);
959
+ }
960
+ if(iSects & 0x01)
961
+ {
962
+ xr = Math.min(xrDef, aBndA[y]);
963
+ w = xr - x;
964
+ if(w > 0) this._mkDiv(x, y2, w, h);
965
+ }
966
+ }
967
+ else
968
+ this._mkDiv(x, y2, xrDef - x, h);
969
+ y2 = cy + y + (iOdds >> 16);
970
+ if(iSects & 0xff00)
971
+ {
972
+ if(iSects & 0x0100)
973
+ {
974
+ xl = Math.max(x, aBndA[y]);
975
+ w = xrDef - xl;
976
+ if(w > 0) this._mkDiv(xl, y2, w, h);
977
+ }
978
+ if(iSects & 0x0200)
979
+ {
980
+ xr = Math.min(xrDef, aBndZ[y]);
981
+ w = xr - x;
982
+ if(w > 0) this._mkDiv(x, y2, w, h);
983
+ }
984
+ }
985
+ else
986
+ this._mkDiv(x, y2, xrDef - x, h);
987
+ }
988
+ else
989
+ {
990
+ if(iSects & 0x00ff)
991
+ {
992
+ if(iSects & 0x02)
993
+ xl = Math.max(x, aBndZ[y]);
994
+ else
995
+ xl = x;
996
+ if(iSects & 0x01)
997
+ xr = Math.min(xrDef, aBndA[y]);
998
+ else
999
+ xr = xrDef;
1000
+ y2 = cy - y - h;
1001
+ w = xr - xl;
1002
+ if(w > 0) this._mkDiv(xl, y2, w, h);
1003
+ }
1004
+ if(iSects & 0xff00)
1005
+ {
1006
+ if(iSects & 0x0100)
1007
+ xl = Math.max(x, aBndA[y]);
1008
+ else
1009
+ xl = x;
1010
+ if(iSects & 0x0200)
1011
+ xr = Math.min(xrDef, aBndZ[y]);
1012
+ else
1013
+ xr = xrDef;
1014
+ y2 = cy + y + (iOdds >> 16);
1015
+ w = xr - xl;
1016
+ if(w > 0) this._mkDiv(xl, y2, w, h);
1017
+ }
1018
+ }
1019
+ };
1020
+
1021
+ this.setStroke(1);
1022
+ this.setFont("verdana,geneva,helvetica,sans-serif", "12px", Font.PLAIN);
1023
+ this.color = "#000000";
1024
+ this.htm = "";
1025
+ this.wnd = wnd || window;
1026
+
1027
+ if(!jg_ok) _chkDHTM(this.wnd);
1028
+ if(jg_ok)
1029
+ {
1030
+ if(cnv)
1031
+ {
1032
+ if(typeof(cnv) == "string")
1033
+ this.cont = document.all? (this.wnd.document.all[cnv] || null)
1034
+ : document.getElementById? (this.wnd.document.getElementById(cnv) || null)
1035
+ : null;
1036
+ else if(cnv == window.document)
1037
+ this.cont = document.getElementsByTagName("body")[0];
1038
+ // If cnv is a direct reference to a canvas DOM node
1039
+ // (option suggested by Andreas Luleich)
1040
+ else this.cont = cnv;
1041
+ // Create new canvas inside container DIV. Thus the drawing and clearing
1042
+ // methods won't interfere with the container's inner html.
1043
+ // Solution suggested by Vladimir.
1044
+ this.cnv = this.wnd.document.createElement("div");
1045
+ this.cnv.style.fontSize=0;
1046
+ this.cont.appendChild(this.cnv);
1047
+ this.paint = jg_dom? _pntCnvDom : _pntCnvIe;
1048
+ }
1049
+ else
1050
+ this.paint = _pntDoc;
1051
+ }
1052
+ else
1053
+ this.paint = _pntN;
1054
+
1055
+ this.setPrintable(false);
1056
+ }
1057
+
1058
+ function _mkLinVirt(aLin, x1, y1, x2, y2)
1059
+ {
1060
+ var dx = Math.abs(x2-x1), dy = Math.abs(y2-y1),
1061
+ x = x1, y = y1,
1062
+ xIncr = (x1 > x2)? -1 : 1,
1063
+ yIncr = (y1 > y2)? -1 : 1,
1064
+ p,
1065
+ i = 0;
1066
+ if(dx >= dy)
1067
+ {
1068
+ var pr = dy<<1,
1069
+ pru = pr - (dx<<1);
1070
+ p = pr-dx;
1071
+ while(dx > 0)
1072
+ {--dx;
1073
+ if(p > 0) // Increment y
1074
+ {
1075
+ aLin[i++] = x;
1076
+ y += yIncr;
1077
+ p += pru;
1078
+ }
1079
+ else p += pr;
1080
+ x += xIncr;
1081
+ }
1082
+ }
1083
+ else
1084
+ {
1085
+ var pr = dx<<1,
1086
+ pru = pr - (dy<<1);
1087
+ p = pr-dy;
1088
+ while(dy > 0)
1089
+ {--dy;
1090
+ y += yIncr;
1091
+ aLin[i++] = x;
1092
+ if(p > 0) // Increment x
1093
+ {
1094
+ x += xIncr;
1095
+ p += pru;
1096
+ }
1097
+ else p += pr;
1098
+ }
1099
+ }
1100
+ for(var len = aLin.length, i = len-i; i;)
1101
+ aLin[len-(i--)] = x;
1102
+ };
1103
+
1104
+ function _CompInt(x, y)
1105
+ {
1106
+ return(x - y);
1107
+ }
1108
+