暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pictogram.js 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. /* 各ピクトグラム動作関数 */
  2. var tkekkon;
  3. function kekkon(){
  4. var ckekkon = 1;
  5. kekkonimg = new Array(4);
  6. kekkonimg[1] = "./css/img/life_kekkon_01.png";
  7. kekkonimg[2] = "./css/img/life_kekkon_02.png";
  8. kekkonimg[3] = "./css/img/life_kekkon_01.png";
  9. kekkonimg[4] = "./css/img/life_kekkon_02.png";
  10. kekkonUP();
  11. function kekkonUP(){
  12. tkekkon = setTimeout(kekkonUP,500);
  13. document.kekkon.src = kekkonimg[ckekkon];
  14. ckekkon = ckekkon + 1;
  15. if( ckekkon > 4 ){
  16. ckekkon = 1;
  17. }
  18. }
  19. }
  20. var tkenko;
  21. function kenko(){
  22. var ckenko = 1;
  23. kenkoimg = new Array(4);
  24. kenkoimg[1] = "./css/img/life_kenko_01.png";
  25. kenkoimg[2] = "./css/img/life_kenko_02.png";
  26. kenkoimg[3] = "./css/img/life_kenko_01.png";
  27. kenkoimg[4] = "./css/img/life_kenko_02.png";
  28. kenkoUP();
  29. function kenkoUP(){
  30. tkenko = setTimeout(kenkoUP,500);
  31. document.kenko.src = kenkoimg[ckenko];
  32. ckenko = ckenko + 1;
  33. if( ckenko > 4 ){
  34. ckenko = 1;
  35. }
  36. }
  37. }
  38. var tfukushi;
  39. function fukushi(){
  40. var cfukushi = 1;
  41. fukushiimg = new Array(4);
  42. fukushiimg[1] = "./css/img/life_kaigo_01.png";
  43. fukushiimg[2] = "./css/img/life_kaigo_02.png";
  44. fukushiimg[3] = "./css/img/life_kaigo_03.png";
  45. fukushiimg[4] = "./css/img/life_kaigo_04.png";
  46. fukushiUP();
  47. function fukushiUP(){
  48. tfukushi = setTimeout(fukushiUP,500);
  49. document.fukushi.src = fukushiimg[cfukushi];
  50. cfukushi = cfukushi + 1;
  51. if( cfukushi > 4 ){
  52. cfukushi = 1;
  53. }
  54. }
  55. }
  56. var tokuyami;
  57. function okuyami(){
  58. var cokuyami = 1;
  59. okuyamiimg = new Array(10);
  60. okuyamiimg[1] = "./css/img/life_okuyami_01.png";
  61. okuyamiimg[2] = "./css/img/life_okuyami_02.png";
  62. okuyamiimg[3] = "./css/img/life_okuyami_03.png";
  63. okuyamiimg[4] = "./css/img/life_okuyami_04.png";
  64. okuyamiimg[5] = "./css/img/life_okuyami_05.png";
  65. okuyamiimg[6] = "./css/img/life_okuyami_06.png";
  66. okuyamiimg[7] = "./css/img/life_okuyami_07.png";
  67. okuyamiimg[8] = "./css/img/life_okuyami_08.png";
  68. okuyamiimg[9] = "./css/img/life_okuyami_09.png";
  69. okuyamiimg[10] = "./css/img/life_okuyami_10.png";
  70. okuyamiUP();
  71. function okuyamiUP(){
  72. tokuyami = setTimeout(okuyamiUP,500);
  73. document.okuyami.src = okuyamiimg[cokuyami];
  74. cokuyami = cokuyami + 1;
  75. if( cokuyami > 10 ){
  76. cokuyami = 1;
  77. }
  78. }
  79. }
  80. var tninshin;
  81. function ninshin(){
  82. var cninshin = 1;
  83. ninshinimg = new Array(4);
  84. ninshinimg[1] = "./css/img/life_ninshin_01.png";
  85. ninshinimg[2] = "./css/img/life_ninshin_02.png";
  86. ninshinimg[3] = "./css/img/life_ninshin_03.png";
  87. ninshinimg[4] = "./css/img/life_ninshin_04.png";
  88. ninshinUP();
  89. function ninshinUP(){
  90. tninshin = setTimeout(ninshinUP,500);
  91. document.ninshin.src = ninshinimg[cninshin];
  92. cninshin = cninshin + 1;
  93. if( cninshin > 4 ){
  94. cninshin = 1;
  95. }
  96. }
  97. }
  98. var tkosodate;
  99. function kosodate(){
  100. var ckosodate = 1;
  101. kosodateimg = new Array(4);
  102. kosodateimg[1] = "./css/img/life_kosodate_01.png";
  103. kosodateimg[2] = "./css/img/life_kosodate_02.png";
  104. kosodateimg[3] = "./css/img/life_kosodate_03.png";
  105. kosodateimg[4] = "./css/img/life_kosodate_04.png";
  106. kosodateUP();
  107. function kosodateUP(){
  108. tkosodate = setTimeout(kosodateUP,500);
  109. document.kosodate.src = kosodateimg[ckosodate];
  110. ckosodate = ckosodate + 1;
  111. if( ckosodate > 4 ){
  112. ckosodate = 1;
  113. }
  114. }
  115. }
  116. var tsumai;
  117. function sumai(){
  118. var csumai = 1;
  119. sumaiimg = new Array(7);
  120. sumaiimg[1] = "./css/img/life_kurashi_01.jpg";
  121. sumaiimg[2] = "./css/img/life_kurashi_02.jpg";
  122. sumaiimg[3] = "./css/img/life_kurashi_03.jpg";
  123. sumaiimg[4] = "./css/img/life_kurashi_04.jpg";
  124. sumaiimg[5] = "./css/img/life_kurashi_05.jpg";
  125. sumaiimg[6] = "./css/img/life_kurashi_06.jpg";
  126. sumaiimg[7] = "./css/img/life_kurashi_07.jpg";
  127. sumaiUP();
  128. function sumaiUP(){
  129. tsumai = setTimeout(sumaiUP,500);
  130. document.sumai.src = sumaiimg[csumai];
  131. csumai = csumai + 1;
  132. if( csumai > 7 ){
  133. csumai = 1;
  134. }
  135. }
  136. }
  137. var tshomei;
  138. function shomei(){
  139. var cshomei = 1;
  140. shomeiimg = new Array(4);
  141. shomeiimg[1] = "./css/img/life_shoumei_01.png";
  142. shomeiimg[2] = "./css/img/life_shoumei_02.png";
  143. shomeiimg[3] = "./css/img/life_shoumei_03.png";
  144. shomeiimg[4] = "./css/img/life_shoumei_04.png";
  145. shomeiUP();
  146. function shomeiUP(){
  147. tshomei = setTimeout(shomeiUP,500);
  148. document.shomei.src = shomeiimg[cshomei];
  149. cshomei = cshomei + 1;
  150. if( cshomei > 4 ){
  151. cshomei = 1;
  152. }
  153. }
  154. }
  155. /* マウスオーバー・アウト */
  156. function smartRollover() {
  157. document.getElementById("kekkon").onmouseover = function() {
  158. kekkon();
  159. }
  160. document.getElementById("kekkon").onmouseout = function() {
  161. clearTimeout(tkekkon);
  162. document.kekkon.src = kekkonimg[1];
  163. }
  164. document.getElementById("kenko").onmouseover = function() {
  165. kenko();
  166. }
  167. document.getElementById("kenko").onmouseout = function() {
  168. clearTimeout(tkenko);
  169. document.kenko.src = kenkoimg[1];
  170. }
  171. document.getElementById("fukushi").onmouseover = function() {
  172. fukushi();
  173. }
  174. document.getElementById("fukushi").onmouseout = function() {
  175. clearTimeout(tfukushi);
  176. document.fukushi.src = fukushiimg[1];
  177. }
  178. document.getElementById("okuyami").onmouseover = function() {
  179. okuyami();
  180. }
  181. document.getElementById("okuyami").onmouseout = function() {
  182. clearTimeout(tokuyami);
  183. document.okuyami.src = okuyamiimg[1];
  184. }
  185. document.getElementById("ninshin").onmouseover = function() {
  186. ninshin();
  187. }
  188. document.getElementById("ninshin").onmouseout = function() {
  189. clearTimeout(tninshin);
  190. document.ninshin.src = ninshinimg[1];
  191. }
  192. document.getElementById("kosodate").onmouseover = function() {
  193. kosodate();
  194. }
  195. document.getElementById("kosodate").onmouseout = function() {
  196. clearTimeout(tkosodate);
  197. document.kosodate.src = kosodateimg[1];
  198. }
  199. document.getElementById("sumai").onmouseover = function() {
  200. sumai();
  201. }
  202. document.getElementById("sumai").onmouseout = function() {
  203. clearTimeout(tsumai);
  204. document.sumai.src = sumaiimg[1];
  205. }
  206. document.getElementById("shomei").onmouseover = function() {
  207. shomei();
  208. }
  209. document.getElementById("shomei").onmouseout = function() {
  210. clearTimeout(tshomei);
  211. document.shomei.src = shomeiimg[1];
  212. }
  213. document.kekkon.onmouseover = function() {
  214. kekkon();
  215. }
  216. document.kekkon.onmouseout = function() {
  217. clearTimeout(tkekkon);
  218. document.kekkon.src = kekkonimg[1];
  219. }
  220. document.kenko.onmouseover = function() {
  221. kenko();
  222. }
  223. document.kenko.onmouseout = function() {
  224. clearTimeout(tkenko);
  225. document.kenko.src = kenkoimg[1];
  226. }
  227. document.fukushi.onmouseover = function() {
  228. fukushi();
  229. }
  230. document.fukushi.onmouseout = function() {
  231. clearTimeout(tfukushi);
  232. document.fukushi.src = fukushiimg[1];
  233. }
  234. document.okuyami.onmouseover = function() {
  235. okuyami();
  236. }
  237. document.okuyami.onmouseout = function() {
  238. clearTimeout(tokuyami);
  239. document.okuyami.src = okuyamiimg[1];
  240. }
  241. document.ninshin.onmouseover = function() {
  242. ninshin();
  243. }
  244. document.ninshin.onmouseout = function() {
  245. clearTimeout(tninshin);
  246. document.ninshin.src = ninshinimg[1];
  247. }
  248. document.kosodate.onmouseover = function() {
  249. kosodate();
  250. }
  251. document.kosodate.onmouseout = function() {
  252. clearTimeout(tkosodate);
  253. document.kosodate.src = kosodateimg[1];
  254. }
  255. document.sumai.onmouseover = function() {
  256. sumai();
  257. }
  258. document.sumai.onmouseout = function() {
  259. clearTimeout(tsumai);
  260. document.sumai.src = sumaiimg[1];
  261. }
  262. document.shomei.onmouseover = function() {
  263. shomei();
  264. }
  265. document.shomei.onmouseout = function() {
  266. clearTimeout(tshomei);
  267. document.shomei.src = shomeiimg[1];
  268. }
  269. }
  270. /* オンロード時に動作 */
  271. if(window.addEventListener) {
  272. window.addEventListener('load', smartRollover, false);
  273. } else {
  274. window.attachEvent("onload", smartRollover);
  275. }