// JavaScript Document

{
        btn1On = new Image()
        btn1On.src ="images/m1off.gif"
        btn1Off = new Image()
        btn1Off.src ="images/m1.gif"   
		
		btn2On = new Image()
        btn2On.src ="images/m2off.gif"
        btn2Off = new Image()
        btn2Off.src ="images/m2.gif" 
		
		btn3On = new Image()
        btn3On.src ="images/m3off.gif"
        btn3Off = new Image()
        btn3Off.src ="images/m3.gif"
		
		btn4On = new Image()
        btn4On.src ="images/m4off.gif"
        btn4Off = new Image()
        btn4Off.src ="images/m4.gif"  
		
		btn5On = new Image()
        btn5On.src ="images/m5off.gif"
        btn5Off = new Image()
        btn5Off.src ="images/m5.gif" 
}

function switchOn(imageName) {
  if (document.images)
     document.images[imageName].src = eval(imageName + 'On.src');
}
                 
function switchOff(imageName) {
  if (document.images)
     document.images[imageName].src = eval(imageName + 'Off.src');
}

function livre() {
	var popurl="page.html";
	winpops=window.open(popurl,"","width=750,height=510,resizable=yes");
}

var popupWin = null;
	
function openWindow(url,WIDTH,HEIGHT) {

	TOP = (screen.height/2) - ( HEIGHT/2);
	LEFT = (screen.width/2) - ( WIDTH/2);
		
	url;
		
	if(!popupWin || popupWin.closed){
		popupWin = window.open( url , 'cplt', 'scrollbars=yes,top = ' + TOP + ',left = ' + LEFT + ',resizable=0,width=' + WIDTH + ',height=' + HEIGHT)
		popupWin.focus();
	} else {
		popupWin.close();
		openWindow(url ,WIDTH,HEIGHT);
	}
}
