imgArr = new Array;
prevSelId = 1;

function ro(tdId){
	document.getElementById(tdId).className = 'mm_ro';
}

function rn(tdId){
	document.getElementById(tdId).className = 'none';
}

function setImage(imageId){
	document.getElementById('mpic').src= imgArr[imageId];
	prevSelId = imageId;
}

function nextImage(){
	nextImg = prevSelId + 1;
	if(nextImg > imgCount){
		nextImg = 1;
	}
	setImage(nextImg);
}

function prevImage(){
	nextImg = prevSelId - 1;
	if(nextImg<=0){
		nextImg = imgCount;
	}
	setImage(nextImg);
}

function popup(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
