var win = null;
function popup(mypage,myname,w,h,scrollable,resizable,statusbarable) {
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',statusbar='+statusbarable+', scrollbars='+scrollable+',resizable='+resizable+''
	win = window.open(mypage,myname,settings)
	if(win.window.focus){win.window.focus();}
}

function clearText(thefield) {
	if (thefield.defaultValue==thefield.value)
	thefield.value = ""
}

function toggleVisibility(id) {
	e = document.getElementById(id);
	if (e.style.visibility == "visible") {
		e.style.display = "none";
		e.style.visibility = "hidden";
	} else {
		e.style.display = "block";
		e.style.visibility = "visible";
	}
	
}

function dubuffet(id,state) {
			document.images[id].src = eval( id + state + '.src');
}
