
function dd(obj){
    if(document.getElementById){document.getElementById(obj).style.display=='none'?document.getElementById(obj).style.display='':document.getElementById(obj).style.display='none'}
    else if(document.all){document.all(obj).style.display=='none'?document.all(obj).style.display='':document.all(obj).style.display='none'}
    else if(document.layers){document.layers[obj].display=='none'?document.layers[obj].display='':document.layers[obj].display='none'}
}


function initRollovers() {
if (!document.getElementById) return

var aPreLoad = new Array();
var sTempSrc;
var aImages = document.getElementsByTagName('img');

for (var i = 0; i < aImages.length; i++) {	
if (aImages[i].className == 'o') {
var src = aImages[i].getAttribute('src');
var ftype = src.substring(src.lastIndexOf('.'), src.length);
var hsrc = src.replace(ftype, '_on'+ftype);

aImages[i].setAttribute('hsrc', hsrc);

aPreLoad[i] = new Image();
aPreLoad[i].src = hsrc;

aImages[i].onmouseover = function() {
sTempSrc = this.getAttribute('src');
this.setAttribute('src', this.getAttribute('hsrc'));
}	

aImages[i].onmouseout = function() {
if (!sTempSrc) sTempSrc = this.getAttribute('src').replace(''+ftype, ftype);
this.setAttribute('src', sTempSrc);
}
}
}
}


function input_area_focus(){
document.getElementById('keywords').focus();
}


/*window.onload = function() {
var node_a = document.getElementsByTagName('a');
for (var i in node_a) {
if (node_a[i].className == 'newwin') {
node_a[i].onclick = function() {
window.open(this.href, '', '');
return false;
};
}
}
};*/
function target_new_win() {
var node_a = document.getElementsByTagName('a');
for (var i in node_a) {
if (node_a[i].className == 'newwin') {
node_a[i].onclick = function() {
window.open(this.href, '', '');
return false;
};
}
}
};
/*aタグ内にはclass="newwin"でtarget_blank*/


window.onload=function(){target_new_win();input_area_focus();initRollovers();}


/*window.onload = input_area_focus;*/
/*window.onload = initRollovers;*/





//multiple_onload.js
/*var OnloadFunction = Class.create();
OnloadFunction.prototype = {
    initialize : function(func) {
        this.func = func;
    },
    getFunc : function() {
        return this.func;
    }
};
var OnloadFunctions = Class.create();
OnloadFunctions.prototype = {
    initialize : function() {
        this.last = 0;
        this.functions = new Array();
    },
    getFunctionAt : function(index) {
        return this.functions[index];
    },
    appendFunction : function(func) {
        this.functions[this.last] = func;
        this.last++;
    },
    getLength : function() {
        return this.last;
    },
    iterator : function() {
        return new OnloadFunctionIterator(this);
    }
}
var OnloadFunctionIterator = Class.create();
OnloadFunctionIterator.prototype = {
    initialize : function(functions) {
        this.functions = functions;
        this.index = 0;
    },
    hasNext : function () {
        return this.index < this.functions.getLength();
    },
    next : function() {
        return this.functions.getFunctionAt(this.index++);
    }
}
var onloadFunctions = new OnloadFunctions();
function multipleOnload () {
    var it = onloadFunctions.iterator();
    while (it.hasNext()){
        var func = it.next();
        func.func();
    }
}
window.onload = multipleOnload;
*/
