function expanditem(itemname){
	document.getElementById(itemname+'_O').style.display='block';
	document.getElementById(itemname+'_C').style.display='none';
}
function closeitem(itemname){
	document.getElementById(itemname+'_O').style.display='none';
	document.getElementById(itemname+'_C').style.display='block';
}

function MakeEmailLink(email,host,title)
{
	document.write("<a href=" + "mail" + "to:" + email + "@" + host+ ">" + title + "</a>")
}

function popupwindow(url, w, h)
{
	var winw, winh, winattr;

	winattr = ',scrollbars=yes,status=no,toolbar=no,resizable=no,location=no,dependent=yes,menu=no';
	winw = w;
	winh = h;

	if (typeof imagewin=="undefined" || imagewin.closed) {
		imagewin = window.open("", "", 'width=' + winw + ',height=' + winh + winattr);
		imagewin.moveTo((screen.width - winw) / 2, (screen.height - winh) / 2);
	}
	imagewin.resizeTo(winw, winh);
	imagewin.document.open();
	imagewin.document.write('<html><head></head><body><script language=javascript>' +
		'window.location ="' + url + '"</script></body></html>');
	imagewin.document.close();
	imagewin.focus();
}

function popupvideoviewer(clip,title)
{
	var winw, winh, winattr;

	winattr = ',scrollbars=yes,status=no,toolbar=no,resizable=no,location=no,dependent=yes,menu=no';
	winw = 380;
	winh = 500;

	if (typeof imagewin=="undefined" || imagewin.closed) {
		imagewin = window.open("", "", 'width=' + winw + ',height=' + winh + winattr);
		imagewin.moveTo((screen.width - winw) / 2, (screen.height - winh) / 2);
	}
	imagewin.resizeTo(winw, winh);
	imagewin.document.open();
	imagewin.document.write('<html><head></head><body><script language=javascript>' +
		'window.location="includes/lwcms-videoplayer.asp?mid=1&c=' + clip + '&t=' + title + '"</script></body></html>');
	imagewin.document.close();
	imagewin.focus();
}

function popupimageviewer(img,title)
{
	var winw, winh, winattr;

	winattr = ',scrollbars=yes,status=no,toolbar=no,resizable=no,location=no,dependent=yes,menu=no';
	winw = 380;
	winh = 500;

	if (typeof imagewin=="undefined" || imagewin.closed) {
		imagewin = window.open("", "", 'width=' + winw + ',height=' + winh + winattr);
		imagewin.moveTo((screen.width - winw) / 2, (screen.height - winh) / 2);
	}
	imagewin.resizeTo(winw, winh);
	imagewin.document.open();
	imagewin.document.write('<html><head></head><body><script language=javascript>' +
		'window.location="includes/lwcms-imageviewer.asp?mid=1&i=' + img + '&t=' + title + '"</script></body></html>');
	imagewin.document.close();
	imagewin.focus();
}