///////////////////////////////////////////////////////////
// Script for the PDCenter

function _preloadImage(src)
{
	var img = new Image();
	img.src = src;
}

// preload the navigation images when page is loaded
function _preloadNavigationImages()
{
	_preloadImage('/PAWeb/PA/images/MenuInterface/pvpR.gif');
	_preloadImage('/PAWeb/PA/images/MenuInterface/ivpR.gif');
	_preloadImage('/PAWeb/PA/images/MenuInterface/resumeR.gif');
	_preloadImage('/PAWeb/PA/images/MenuInterface/seemeR.gif');
	_preloadImage('/PAWeb/PA/images/MenuInterface/feedbackR.gif');
}

function _validateContactForm()
{
	// Make sure we have a name
	if (_trim(document.frmContact.ContactName.value) == '')
	{
		alert('Please provide your name in the space provided.');
		return false;
	}

	if (_trim(document.frmContact.ContactInfo.value) == '')
	{
		alert('Please indicate how and when you can best be contacted in the space provided.');
		return false;
	}
	
	return true;
}

function _submitContactForm()
{
	if (!_validateContactForm())
		return;
	
	var responseWin = window.open('/PAWeb/PA/Misc/blank.htm', 'responseWin', 'width=460,height=200,resizable');
	window.setTimeout('document.frmContact.submit();', 1000, 'Javascript');
}

window.onload = _preloadNavigationImages;


