/* rollover */
conf = {
       className : 'btn',
       postfix : '_over'
};
function setMouseOverImages() {
       $A(document.getElementsByClassName(conf.className)).each(function (node){
               node.onmouseout = changeSrcFunction(node.src);
               node.onmouseover =
			    changeSrcFunction(node.src.replace(/(\.gif|\.jpg|\.png)/, conf.postfix+"$1"));
       });
}
function changeSrcFunction(data){
       return function(){ this.src = data; }
}
Event.observe(window, 'load', setMouseOverImages, false);

/* Back to Top */
var Mac = navigator.appVersion.indexOf('Mac',0) != -1;
var Win = navigator.appVersion.indexOf('Win',0) != -1;
var IE  = navigator.appName.indexOf("Microsoft Internet Explorer",0) != -1;
var NN  = navigator.appName.indexOf("Netscape",0) != -1;
var GE  = navigator.userAgent.indexOf("Gecko") != -1;
function topposition(){
  if( IE ){
    position = document.body.scrollTop;
  } else {
    position = window.pageYOffset;
  } movePosition()
}
function movePosition(){
  position = Math.floor(position*0.8);
  if( position > 0.1 ){
    window.scrollTo(0,position)
    setTimeout("topposition()",20);
  } else { window.scrollTo(0,0) }
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/* table */
conf = {
	className : "stripedtable",
	oddlineClassName : "oddline",
	evenlineClassName : "evenline"
}

function setStripedTable(){
	var tables = $A(document.getElementsByClassName(conf.className));
	tables.each(function (table){
		var lines = $A(table.getElementsByTagName("tr"));
		var row=0;
		lines.each(function (tr){
			row++;
			if(row%2==1) {
				tr.className = conf.oddlineClassName;
			} else {
				tr.className = conf.evenlineClassName;
			}
		});
	});
}
Event.observe(window, 'load', setStripedTable, false);



