function setupButtons(){
	
	var buttons = new Array();
	var origSrc;
	
	buttons = document.getElementsByClassName( 'button' );
	
	var b; // current button
	
	for( var i in buttons ){
		
		b = buttons[i];
		
		if( b.nodeName && b.nodeName.toLowerCase() == 'img'){
			
			origSrc = b.src;
			var ext = origSrc.match(/.\w*$/);
			b.prevSrc = origSrc.replace( ext, '' )+'_over'+ext;
			
			Event.observe( b, 'mouseover', buttonOverOut, false);
			Event.observe( b, 'mouseout', buttonOverOut, false);
			
		}
		
	}
	
}

function buttonOverOut( event ){
			
	var element = Event.element( event );
	
	element.tmp = element.src;
	element.src = element.prevSrc;
	element.prevSrc = element.tmp;
	
}

function popupFixed( url, widthPX, heightPX ){
	
	day = new Date();
	id = day.getTime();
	
	if( !widthPX ) widthPX=800;
	if( !heightPX ) heightPX=600;
	
	window.open(url, id , 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=0,width='+widthPX+',height='+heightPX);
	
}

function popupBasic( url, widthPX, heightPX ){
	
	day = new Date();
	id = day.getTime();
	
	if( !widthPX ) widthPX=800;
	if( !heightPX ) heightPX=600;
	
	//eval("page" + id + " = window.open("+url+", '" + id + "', 'toolbar=1,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+widthPX+",height="+heightPX+"');");
	window.open(url, id , 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+widthPX+',height='+heightPX);
}
