/* -------------------------------------------------------------------
write email address
---------------------------------------------------------------------- */
function writeAddr() {
	// Build the address
	var i,a=writeAddr.arguments,addr="";
	addr += a[0]+"@";
	for( i=1; i<a.length; i++ ) {
		if( i>1 ) addr += ".";
		addr += a[i];
	}
	// Write html to the browser with the email address
	document.write("<a accesskey='M' href=\"mailto:" 
		+ addr + "\">" + addr + "</a>");
}

/* hide the help box */
function hideHelp() {
  $help = document.getElementById('textile_help');
	$help.style.display='none';
}
/* ExpandCollapse Help Box */
function expandCollapse() {
for (var i=0; i<expandCollapse.arguments.length; i++) {
var element = document.getElementById(expandCollapse.arguments[i]);
element.style.display = (element.style.display == "none") ? "block" : "none";
	}
}

/* hightlight borders on submit buttons */
function highInfo() {
  $button = document.getElementById('preview');
	$button.onmouseover=function() { return (color($button));};
	$button.onmouseout=function() { return (uncolor($button));};
	$button.onclick=function() { return (value($button));};
}
function color($what) {
	$what.style.borderLeftColor='#999';
	$what.style.borderTopColor='#999';
	$what.style.borderRightColor='#ccc';
	$what.style.borderBottomColor='#ccc';
}
function uncolor($what) {
	$what.style.borderLeftColor='#ccc';
	$what.style.borderTopColor='#ccc';
	$what.style.borderRightColor='#999';
	$what.style.borderBottomColor='#999';
}
function value($what) {
	$what.value='Please Wait';
}
	
// if the browser can deal with DOM, call the function onload		
if(document.getElementById && document.createTextNode) {
	window.onload=function() {
    highInfo();
    hideHelp();
  }
}