// サムネイルをその場でズーム

var clicked = new Array();
var oldpath = new Array();

function zoom(path, thumb, id) {

	if (typeof(clicked[id]) == 'undefined') {
		document.getElementById(id).src = path;
		oldpath[id] = thumb;
		clicked[id] = true;
	} else {
		document.getElementById(id).src = oldpath[id];
		delete clicked[id];
	}

}

/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function openWindow(url,title,wwidth,wheight) {
 var newWin;
 if (!!window && url) {
  if (!title) title = "_blank";
  var sizeAndOption = "width="+wwidth+",height="+wheight+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,favorites=no";
  newWin = window.open(url,title,sizeAndOption);
  newWin.focus();
 }
}