
	function cc(elname,countfld,limit) {
		uselen=elname.value.length;
		document.getElementById(countfld).firstChild.nodeValue=uselen;
		if (uselen > limit) {
			document.getElementById(countfld).style.color="red";
		} else {
			document.getElementById(countfld).style.color="black";
		}
	}

function checksecondary(){
	if (document.PForm.have_secondary.checked == true){
	document.PForm.action='newsecaddress.cfm';
	document.PForm.submit();
	}
}

function cksample() {
	if (document.PForm.vcSample.value.length < 200) {
		alert('Please note that this narrative must be at least 5 sentences long.  Please tell us more about your experience.');
		document.PForm.vcSample.focus();
		return false;
	}
	return true;
}

function popup(url,whichwin) { // will pop up information window
var infoWindow		//String
	if (!infoWindow || infoWindow.closed)
	{
		if (whichwin == 'secondary') {
		infoWindow = window.open(url,"closer","resizable,width=600,height=400,scrollbars");
		}
		else {
		infoWindow = window.open(url,"closer","resizable,width=400,height=200");
		}
		if (!infoWindow.opener)
		{
		infoWindow.opener = window;
		}
	}
	else
	{
	// window's already open, bring it to the front
		infoWindow.location = url;
		infoWindow.focus();
	}   
}



