// Empties field elements on focus

function form_fields(FieldId,Status,FieldType)
{
	var FieldElement = document.getElementById(FieldId);

	switch(FieldType)
	{
		case 'inline':
		if(FieldElement.value == 'Enter keywords')
		{
			FieldElement.value = "";
		}
		break;
		case 'block':
		if(FieldElement.innerHTML == 'Enter comments' ||
		   FieldElement.innerHTML == 'Enter setting' ||
		   FieldElement.innerHTML == 'Enter reason' ||
		   FieldElement.innerHTML == 'Enter text')
		{
			FieldElement.innerHTML = "";
		}
		break;
	}
	switch(Status)
	{
		case 1:
		FieldElement.style.backgroundColor = '#FAF3E5';
		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.color='#66658A';
	}
	else
	{
		document.getElementById(ButtonId).style.color='black';	
	}
}

// Controls all popup functions

function content_popup(popup_url)
{
	window.open(popup_url,'AW_Content','width=600,height=600,scrollbars=no,status=no,location=no,menubar=no,toolbar=no,resizable=no');
	return false;
}
	
function portfolio_view(PhotoId)
{
	var PhotoIdControl = document.getElementById('portfolio_image')
	
	PhotoIdControl.style.display='none';

	PhotoIdControl.style.display='block';
	PhotoIdControl.src='/static/images/portfolio/' + PhotoId + '.jpg';
}