function loadImages() {
	if (document.images) {
		cimg = new Array();
		cimg[0] = new Image();
		cimg[0].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-c-e-2.gif";
		cimg[1] = new Image();
		cimg[1].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-c-s-2.gif";
		cimg[2] = new Image();
		cimg[2].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-c-w-2.gif";
		cimg[3] = new Image();
		cimg[3].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-c-n-2.gif";
		cimg[4] = new Image();
		cimg[4].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-ho-2.gif";
		cimg[5] = new Image();
		cimg[5].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-as-2.gif";
		cimg[6] = new Image();
		cimg[6].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-he-2.gif";
		cimg[7] = new Image();
		cimg[7].src = "http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/structural/mh-pp-2.gif";
	}
}
function changeLink(state, imagename, filename, extension) {
	if (document.images) {
		document.images[imagename].src="http://collections.europarchive.org/tna/20070305194321/http://www.nhsemployers.org/images/"  + filename + "-" + state + "." + extension;
	}
}

function clearSearchText() {
	if (document.searchForm.frmSearchTerm.value == 'Search'){
		document.searchForm.frmSearchTerm.value = '';		
	}
}
	
function setSearchText() {
	if (document.searchForm.frmSearchTerm.value == ''){
		document.searchForm.frmSearchTerm.value = 'Search';		
	}
}

function clearLoginEmailText() {
	if (document.loginForm.frmLoginEmail.value == 'Enter your email'){
		document.loginForm.frmLoginEmail.value = '';		
	}
}
	
function setLoginEmailText() {
	if (document.loginForm.frmLoginEmail.value == ''){
		document.loginForm.frmLoginEmail.value = 'Enter your email';		
	}
}

function clearLoginPasswordText() {
	if (document.loginForm.frmLoginPassword.value == 'Enter your password'){
		document.loginForm.frmLoginPassword.value = '';		
	}
}
	
function setLoginPasswordText() {
	if (document.loginForm.frmLoginPassword.value == ''){
		document.loginForm.frmLoginPassword.value = 'Enter your password';		
	}
}

function formsethighlight(velement) {
	velement.style['backgroundColor']='#FFFFCC';
}

function formremovehighlight(velement) {
	velement.style['backgroundColor']='#FFFFFF';
}

function popUpWindow(vFullURL,vHeight,vWidth) {
	thePopUpPreview=window.open(vFullURL,'','resizable=yes,toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width='+vWidth+',height='+vHeight+',left=50,top=50');
	thePopUpPreview.focus();
}

function clearSearchText() {
	if (document.frmSearchForm.frmSearchBox.value == 'Search word'){
		document.frmSearchForm.frmSearchBox.value = '';
	}
}
function setSearchText() {
	if (document.frmSearchForm.frmSearchBox.value == ''){
		document.frmSearchForm.frmSearchBox.value = 'Search word';		
	}
}

function clearLoginName() {
	if (document.frmLoginForm.reg.value == 'Name'){
		document.frmLoginForm.reg.value = '';		
	}
}

function setLoginName() {
	if (document.frmLoginForm.reg.value == ''){
		document.frmLoginForm.reg.value = 'Name';		
	}
}

function clearLoginPass() {
	if (document.frmLoginForm.pass.value == 'Password'){
		document.frmLoginForm.pass.value = '';		
	}
}

function setLoginPass() {
	if (document.frmLoginForm.pass.value == ''){
		document.frmLoginForm.pass.value = 'Password';		
	}
}

function clearFormField(vObject,vValue) {
	if (vObject.value == vValue){
		vObject.value = '';		
	}
}

function setFormField(vObject,vValue) {
	if (vObject.value == ''){
		vObject.value = vValue;		
	}
}
