// Empties field elements on focus

function form_fields(FieldId,Status,FieldType)
{
	var FieldElement = document.getElementById(FieldId);
	
	switch(FieldType)
	{
		case 'inline':
		if(FieldElement.value == '&nbsp;' || 
		   FieldElement.value == ' ' || 
		   FieldElement.value == 'Enter keywords')
		{
			FieldElement.value = "";
		}
		break;
		case 'block':
		if(FieldElement.innerHTML == '&nbsp;' || 
		   FieldElement.innerHTML == ' ' || 
		   FieldElement.innerHTML == 'Enter comments' || 
		   FieldElement.innerHTML == 'Enter message')
		{
			FieldElement.innerHTML = "";
		}
		break;
	}
	switch(Status)
	{
		case 1:
		FieldElement.style.backgroundColor = '#FFD2D2';
		break;
		case 0:
		FieldElement.style.backgroundColor = 'white';
		break;
	}
}


// Controls the rollover states for input buttons and submits

function button_rollover(ButtonState,ButtonId)
{
	if(1 == ButtonState)
	{
		document.getElementById(ButtonId).style.backgroundPosition='left bottom';	
		document.getElementById(ButtonId).style.backgroundColor='#4B0001';	
	}
	else
	{
		document.getElementById(ButtonId).style.backgroundPosition='left top';	
		document.getElementById(ButtonId).style.backgroundColor='#6F1819';	
	}
}


function photo_changer(PhotoId,PhotoCount)
{
	var i;
	for(i=0;i<PhotoCount;i++)
	{
		i1=i+1;
		document.getElementById('photo_main' + i1).style.display='none';
	}
	document.getElementById('photo_main' + PhotoId).style.display='block';
}
