function showLayer(whichLayer)
	{
	if (document.getElementById)
		{
		var style3 = document.getElementById(whichLayer).style;
		style3.display =  "block";
		}  
	else if (document.all)
		{
		var style3 = document.all[whichLayer].style;
		style3.display =  "block";
		}
	else if (document.layers)
		{
		var style3 = document.layers[whichLayer].style;
		style3.display =  "block";
		}
	}




function hideLayer(whichLayer)
	{
	if (document.getElementById)
		{
		var style3 = document.getElementById(whichLayer).style;
		style3.display =  "none";
		}  
	else if (document.all)
		{
		var style3 = document.all[whichLayer].style;
		style3.display =  "none";
		}
	else if (document.layers)
		{
		var style3 = document.layers[whichLayer].style;
		style3.display =  "none";
		}
	}


function textCounter(field, countfield, maxlimit) 
	{
	if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
	else 
		countfield.value = maxlimit - field.value.length + " characters left";
	}

function _textCounter(field, countfield, maxlimit) 
	{
	if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
	else 
		{
		var chars_left = maxlimit - field.value.length;
		if (chars_left > 0)
			countfield.value = chars_left + "characters left";
		else
			countfield.value = "Max characters EXCEEDED";
		}
	}

function show_results(){
answer_array = document.pollanswer.answer;
for (Count = 0; Count < 5; Count++) {
if (answer_array[Count].checked)
break;
	}
theanswer = answer_array[Count].value;
resultwin = open('/poll_result.php?ans=' + theanswer, 'resultwin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,width=160,height=250');
resultwin.focus();

}
