
/*
	IsEmailAddress(Address)
	Address - The enail address to be tested for validity
*/
function IsEmailAddress(Address) {
	var Email=/^[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*@[A-Za-z0-9]+([_\.-][A-Za-z0-9]+)*\.([A-Za-z]){2,4}$/i;
	return(Email.test(Address));
}

function WebPartExpand(Table,Image) {
	if (Table.style.display =='') {
		Table.style.display = 'none';
		Image.src='/images/b-expand.gif';
		Image.alt='More Information';
		Image.title='More Information';
	} else {
		Table.style.display='';
		Image.src='/images/b-collapse.gif';
		Image.alt='Hide Information';
		Image.title='Hide Information';
	}
}

function WebPart(id,display,title,text) {
	var t;
	t = '<table class=\"wptitle\" style=\"cursor:pointer;cursor:hand;\" onclick=\"WebPartExpand(text'+ id +', arrow'+ id +')\">';
	t = t + '\n<tr>';
	t = t + '\n<td><img border=\"0\" src=\"/images/b-left.gif\" width=\"3\" height=\"20\"></td>';
    	t = t + '\n<td><img id=\"arrow'+ id +'\" alt=\"More Information\" src=\"/images/b-expand.gif\" border=\"0\" width=\"16\" height=\"20\">\n</td>';
    	t = t + '\n<td width=\"100%\"><table><tr><td>&nbsp;'+ title +'</td></tr></table>\n</td>';
	t = t + '\n<td valign=\"top\"><img border=\"0\" src=\"/images/b-right.gif\" width=\"3\" height=\"20\"></td>';
    	t = t + '\n</tr>\n</table>';
	t = t + '\n<table class=\"wpbody\" id="text'+ id +'" style=\"display:'+ display +'\" onclick=\"window.event.cancelBubble=true;\">';
  	t = t + '\n<td width=\"*\">'+ text +'</td>';
  	t = t + '\n</tr>\n</table><br>';
	return t;
}

function RowExpand(Row,Image) {
	if (Row.style.display =='') {
		Row.style.display = 'none';
		Image.src='/images/b-expand.gif';
		Image.alt='More Information';
		Image.title='More Information';
	} else {
		Row.style.display='';
		Image.src='/images/b-collapse.gif';
		Image.alt='Hide Information';
		Image.title='Hide Information';
	}
}
