

function checkField(fid, rstring) {		
	var thisField = document.getElementById(fid);
	if (thisField.value == "")
	{
		thisField.value = rstring;
	}
	else if (thisField.value == rstring)
	{
		thisField.value = '';
	}
}

function swapHomeDiv(divID) {
	var thisField = document.getElementById(divID);
	document.getElementById('aboutusdiv').style.display="none";
	document.getElementById('newsdiv').style.display="none";
	document.getElementById('resourcesdiv').style.display="none";
	
	document.getElementById(divID).style.display="block";
}

function swapCampaign(divID) {
	var thisField = document.getElementById(divID);
	document.getElementById('getinvolved').style.display="none";
	document.getElementById('campaignmaterials').style.display="none";
	document.getElementById('getthefacts').style.display="none";
	document.getElementById('overview').style.display="none";
	
	alert(document.getElementById('getinvolved').style.display.value);
	
	document.getElementById(divID).style.display="";
}

function openwindow(url,h,w)
{
	var newwindow;
	var attributes = 'height=' + h + ',width=' + w;
	newwindow = window.open(url, 'thiswindow', attributes);
	if (window.focus) {newwindow.focus()}

	return false;
}


function showhidediv(divName) {
	var thisDiv = document.getElementById(divName);
	
	if (thisDiv.style.display == 'block')
	{
		thisDiv.style.display = 'none';
	}
	else
	{
		thisDiv.style.display = 'block';
	}
}


function writeConsole(title,content,w,h) {
 top.consoleRef=window.open('','myconsole',
  'width='+h+',height='+w
   +',menubar=0'
   +',toolbar=0'
   +',status=0'
   +',scrollbars=0'
   +',resizable=1')
/* top.consoleRef.document.open("text/html","replace"); */
 top.consoleRef.document.writeln(
  '<html><head><title>'+title+'</title></head>'
 +'<body bgcolor=white onLoad="self.focus()">'
 +content
 +'</body></html>'
 )
 top.consoleRef.document.close()
}



/* --> */

