this.Obj;
function getObj (name)
{
if (document.getElementById) {
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
}
else if (document.all) {
this.obj = document.all[name];
this.style = document.all[name].style;
}
else if (document.layers) {
this.obj = document.layers[name];
this.style = document.layers[name];
}
}
function init1 () {
_msg1 = new getObj ('ubb');
_msg1.obj.onclick = function () { return flip_text ('i_ubb'); };
}
function init2 () {
_msg2 = new getObj ('smiley');
_msg2.obj.onclick = function () { return flip_text ('i_smiley'); };
}
function flip_text (msg) {
var id = new getObj (msg);
var status = (id.style.display == 'none') ? 'block' : 'none'; // deze constructie is van Peter Paul Koch: www.quirksmode.org
id.style.display = status;
return false;
}
var eerste_formveld;
function init3 () {
eerste_formveld = new getObj ('onderwerp');
eerste_formveld.obj.focus ();
}
var pic1 = 'http://www.jb-web.net/scripts/php/UBB2/images/tick.png';
var pic2 = 'http://www.jb-web.net/scripts/php/UBB2/images/cross.png';
function changePic(name)
{
if( document.images[ name ].src == pic1) {
document.images[ name ].src = pic2;
} else {
document.images[ name ].src = pic1;
}
}
/*************************************************************
* Window Onload Manager (WOM) v1.0
* Author: Justin Barlow - www.netlobo.com
*
* Description:
* The WOM library of functions allows you to easily call
* multiple javascript functions when your page loads.
*
* Usage:
* Add functions to WOM using the womAdd() function. Pass the
* name of your functions (with or without parameters) into
* womAdd(). Then call womOn() like this:
* womAdd('hideDiv()');
* womAdd('changeBg("menuopts","#CCCCCC")');
* womOn();
* WOM will now run when your page loads and run all of the
* functions you have added using womAdd()
*************************************************************/
/*************************************************************
* The womOn() function will set the window.onload function to
* be womGo() which will run all of your window.onload
* functions.
*************************************************************/
function womOn(){
window.onload = womGo;
}
/*************************************************************
* The womGo() function loops through the woms array and
* runs each function in the array.
*************************************************************/
function womGo(){
for(var i = 0;i < woms.length;i++)
eval(woms[i]);
}
/*************************************************************
* The womAdd() function will add another function to the woms
* array to be run when the page loads.
*************************************************************/
function womAdd(func){
woms[woms.length] = func;
}
/*************************************************************
* The woms array holds all of the functions you wish to run
* when the page loads.
*************************************************************/
var woms = new Array();
womAdd('init1()');
womAdd('init2()');
womAdd('init3()');
womOn();