function newWin(url, target, wW, wH, attr) {
	var toolbar = attr.charAt(0);
	var location = attr.charAt(1);
	var directories = attr.charAt(2);
	var status = attr.charAt(3);
	var menubar = attr.charAt(4);
	var resizable = attr.charAt(5);
	var scrollbars = (attr.charAt(6) == '1') ? 'yes':'0';
	var win_attr = 'toolbar='+toolbar+',location='+location+',directories='+directories+',status='+status+',menubar='+menubar+',resizable='+resizable+',scrollbars='+scrollbars+',width='+wW+',height='+wH;
	newWindow=open(url, target, win_attr);
}

function selectProduct(selectObj) {
	if(selectObj.options[selectObj.selectedIndex].value){
		top.location.href = selectObj.options[selectObj.selectedIndex].value;
	}
}

var gAlt;
function viewPhoto(path, alt) {
	gAlt = alt;
	new Ajax.Request(path+'photo.xml', {method: "get", onComplete: setPhoto });
}
function setPhoto(httpObj) {
	var setPhotoObj = document.getElementsByTagName("h1")[0];
	photoXml = httpObj.responseXML;
	photoFiles = httpObj.responseXML.getElementsByTagName("filename");
	photoNo = Math.round(Math.random() * (photoFiles.length - 1));
//	alert(photoNo);
	setPhotoObj.innerHTML = '<img src="images/' + photoFiles[photoNo].firstChild.nodeValue + '" width="570" height="180" alt="' +gAlt+ '" />';
}


function TableChng(hishakai){
			$('hishakai_1').style.display='none';
			$('hishakai_2').style.display='none';
			$('hishakai_3').style.display='none';
			$(hishakai).style.display='block';
}
