/************************************************************
WRITE SUBNAV TO A DIV OR SPAN
************************************************************/
function writeDivSpan1(text,id) {

	//Level 1 DOM: Netscape 6, Explorer 5+
	//Note that 'innerText' is not supported by Netscape 6
	if (document.getElementById) {
        	x = document.getElementById(id);
        	if ( x.innerHTML == '' ) { x.innerHTML = text; }
        	else { x.innerHTML = ''; }
        	
	}

	//Explorer 4
	else if (document.all) {
		x = document.all[id];
        	if ( x.innerHTML == '' ) { x.innerHTML = text; }
        	else { x.innerHTML = ''; }
	}

	//Netscape 4
	//As soon as the new text/html is written, the target loses all style information. 
	//To circumvent this, add surrounding <P> tags with the correct class information when writing to the target element. 
	
	else if (document.layers) {
		x = document.layers[id];
		text2 = '<p class="error">' + text + '</p>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}


/************************************************************
WRITE SUBNAV TO A DIV OR SPAN
************************************************************/
function writeDivSpan2(text,id) {

	//Level 1 DOM: Netscape 6, Explorer 5+
	//Note that 'innerText' is not supported by Netscape 6
	if (document.getElementById) {
        	x = document.getElementById(id);
        	x.innerHTML = text;
	}

	//Explorer 4
	else if (document.all) {
		x = document.all[id];
        	x.innerHTML = text;
	}

	//Netscape 4
	//As soon as the new text/html is written, the target loses all style information. 
	//To circumvent this, add surrounding <P> tags with the correct class information when writing to the target element. 
	
	else if (document.layers) {
		x = document.layers[id];
		text2 = '<p class="error">' + text + '</p>';
		x.document.open();
		x.document.write(text2);
		x.document.close();
	}
}