OSDN Git Service

2d17f12ea8e7dfa250e36c47b88efb2f530463d1
[idb/iDB.git.git] / javascript.js
1 /*
2     This program is free software; you can redistribute it and/or modify
3     it under the terms of the Revised BSD License.
4
5     This program is distributed in the hope that it will be useful,
6     but WITHOUT ANY WARRANTY; without even the implied warranty of
7     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8     Revised BSD License for more details.
9
10     Copyright 2004-2017 iDB Support - http://idb.berlios.de/
11     Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
12
13     $FileInfo: javascript.js - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
14 */
15 function getid(id) {
16 var itm;
17 itm = document.getElementById(id);
18 return itm; }
19
20 function toggletag(id) {
21 var itm;
22 itm = document.getElementById(id);
23 if (itm.style.display == "none") {
24 itm.style.display = ""; }
25 else {
26 itm.style.display = "none"; } }
27
28 function bgchange(id,color) {
29 var itm;
30 itm = document.getElementById(id);
31 itm.style.backgroundColor = ''+color+''; }
32
33 function innerchange(tag,text1,text2) {
34 var usrname;
35 usrname = document.getElementsByTagName(tag);
36 for (var i = 0; i < usrname.length; i++) {
37 if(usrname[i].innerHTML==text1) {
38 usrname[i].innerHTML = text2; } } }
39
40 function addsmiley(id,code) {
41 var itm;
42 itm = document.getElementById(id);
43 var pretext = itm.value;
44 itm.value = pretext + code; }