Hchange=function(f){
	var a='/'+f.ref.value
	a+='/'+f.resort.value
	if(f.type.value!='')a+='/'+f.type.value;
	var lvl='',found=false
	for(var i=1;i<6;i++){
		if(f['level'+i].checked)found=true
		lvl+=''+(f['level'+i].checked?1:0)
	}
	a+='/'
	var b=[];
	if(found){
		b[b.length]='levels='+lvl
	}
	if(b.length>0){
		a+='?'+b.join('&');
	}
	document.location.href=a
}
function showWin(url,x,y,name,isscrollbars) {
cx=screen.width / 2 - (x / 2);
cy=(screen.height/2-(y/2));
isscrollbars=(isscrollbars=="no")?"no":"yes";
window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+isscrollbars+",top="+cy+",left="+cx);
}
function showGallery(url,name,isscrollbars) {
var x,y
y=screen.availHeight
if(!y) y=screen.height
x=screen.availWidth
if(!x) x=screen.width
x *= 0.9
y *= 0.9
if(x > 900) x = 900
if(y > 800) y = 800
cx=screen.width / 2 - (x / 2);
cy=(screen.height/2-(y/2));
isscrollbars=(isscrollbars=="no")?"no":"yes";
window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+isscrollbars+",top="+cy+",left="+cx);
}
displayImage=function(name){
var main=document.getElementById('mainimage')
//main.style.backgroundImage='url('+name+')'
main.src=cache[name].src
}
