function show_hide(id, show) {
	elem = document.getElementById(id);
	if (elem) {
		if (show===undefined) {
			elem.style.display = (elem.style.display=='none') ? 'block' : 'none';
		}
		else {
			if (show) {
				elem.style.display = 'block';
			}
			else {
				elem.style.display = 'none';
			}
		}
	}
}

function swap_img(img, param)
{
	_src = img.src;
	img.src = _src.substring(0,_src.length-5)+param.toString()+_src.substring(_src.length-4, _src.length);
}

function show_big_img(title, pic) {
	_date = new Date;
	wnd = window.open('','poppic'+_date.getTime(),'width=100 height=100');
	html = "<html><head>\n";
	html+= "<script language=\"javascript\">\n";
	html+= "var i=0;\n";
	html+= "function resize() {\n";
	html+= "	if (navigator.appName == 'Netscape') i=40;\n";
	html+= "	if (document.images[0]) window.resizeTo(document.images[0].width +10, document.images[0].height+30);\n";
	html+= "	self.focus();\n";
	html+= "}\n";
	html+= "<\/script><title>"+title+"<\/title>\n";
	html+= "<\/head>\n";
	html+= "<body leftmargin=\"0\" topmargin=\"0\" onload=\"resize();\">\n";
	html+= "<img src=\""+pic+"\" border=\"0\"><\/body>\n";
	html+= "<\/html>";
	wnd.document.open();
	wnd.document.write(html);
	wnd.document.close();
}

function show_big_centered_img(title, pic) {
	wnd = window.open('', 'poppic','width=100 height=100');
	html = "<html><head>\n";
	html+= "<script language=\"javascript\">\n";
	html+= "var i=0;\n";
	html+= "function resize() {\n";
	html+= "	if (navigator.appName == 'Netscape') i=40;\n";
	html+= "	if (document.images[0]) window.resizeTo(document.images[0].width +10, document.images[0].height+30);\n";
	html+= "	self.focus();\n";
	html+= "	window.moveTo((screen.width-(document.images[0].width +10))/2, (screen.height-(document.images[0].height+30))/2);\n";
	html+= "}\n";
	html+= "<\/script><title>"+title+"<\/title>\n";
	html+= "<\/head>\n";
	html+= "<body leftmargin=\"0\" topmargin=\"0\" onload=\"resize(); center();\">\n";
	html+= "<img src=\""+pic+"\" border=\"0\"><\/body>\n";
	html+= "<\/html>";
	wnd.document.open();
	wnd.document.write(html);
	wnd.document.close();
}

function window_open(url, width, height)
{
	_date = new Date;
	wnd = window.open('','win'+_date.getTime(),'top=40,left=40,width='+width+',height='+height+',scrollbars=yes,menu=no,status=yes,resizable=no');
	wnd.focus();
	wnd.location = url;
}
