// JavaScript Document

function goTo(page)
{
	document.location.href=page;
}
function confdel(url_path)
{
	if (confirm("Do you want to delete this record."))
	{
		window.location.href=url_path;
	}
}
function checkFields(field1, field2)
{
	if(field1.value!=field2.value)
	{
		alert('New password and Confirm password should be same.');
		field1.focus();
	}
}

var state = "none";
function toggleLayer(layerID,img_id,icon_url) {
			
				images = new Array();
				
				images[0] = new Image(24, 24);
				images[1] = new Image(24, 24);
				
				images[0].src = icon_url+'hide_preferred.gif';
				images[1].src = icon_url+'show_preferred.gif';
			
				if (state == 'block') {
					state = 'none';
					document.getElementById(img_id).src = images[0].src;
				} else {
					state = 'block';
					document.getElementById(img_id).src = images[1].src;
				}
				
				document.getElementById(layerID).style.display = state; 
}  


