	function displayTag(id)
	{
		//alert(divId);
		if ( id != '' && document.getElementById(id).style.display == 'none') {
			document.getElementById(id).style.display = 'block';
		}
	}

	function showPageName(pageName)
	{
		//alert(pageName);
		document.getElementById('pageName').innerHTML = pageName;
	}

	function blankMessage()
	{
		alert("blankMessage");
		alert(msg);
		alert(variables);

	}

	function viewMessage(msg)
	{
		window.open('editRegisteredUsers.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function readMsg() {

		//window.location = 'messages.php?act=readMsg';
		window.location = 'messages.php';
	}


	function displayRow(id){

		var row = document.getElementById(id);

		 row.style.display = '';
	}

	function hideRow(id){

		var row = document.getElementById(id);
		if (row.style.display == '') row.style.display = 'none';
		

	}

	function displayRows(id,id1,id3){

		displayRow(id);
		displayRow(id1);
		hideRow(id3);
	}

	function acceptProof(id,userId) {

		//alert(id);

		if(confirm("Are you sure you want to accept proof for this?")) {

			//alert('manageAccount.php?act=accept&id='+id);
			window.location = 'manageAccount.php?act=accept&id='+id+'&userId='+userId;
			//window.location = 'manageAccount.php?act=accept&id='+id
		}
	}

	function hideRows(id,id1,id3)
	{
		displayRow(id3);
		hideRow(id);
		hideRow(id1);
	}

	function hideTag(id)
	{
		//alert(divId);
		if (id  && document.getElementById(id).style.display == 'block') {
			document.getElementById(id).style.display = 'none';
		}
	}


	function copyAddress()
	{
		
		document.personalInfo.postAddress1.innerHTML = document.personalInfo.resAddress1;
		document.getElementById('postAddress1').value = document.getElementById('resAddress1').value;
		document.getElementById('postAddress2').value = document.getElementById('resAddress2').value;
	}


	function enableSocialInp() {
		//alert("here");
		document.getElementById('usSocialSecNoInp').disabled = false;
	}

	function disableSocialInp() {
		//alert(id);
		document.getElementById('usSocialSecNoInp').disabled = true;

	}




	function enableInp(id) {
		//alert(id);
		document.personalInfo.usSocialSecNoInp.disabled = false;

	}

	
	function disableInp(id) {
		//alert(id);
		document.personalInfo.usSocialSecNoInp.disabled = true;

	}



	function displayDiv(divId)
	{
		//alert(divId);
		if (divId  && document.getElementById(divId).style.display == 'none') {
			document.getElementById(divId).style.display = 'block';
		} else if (divId  && document.getElementById(divId).style.display == 'block') {
			document.getElementById(divId).style.display = 'none';
		}
	}

	function displayHideDiv(divId)
	{
		//alert(divId);
		document.getElementById('createApp').style.display = 'none';
		document.getElementById('personalInfo').style.display = 'none';
		document.getElementById('passportInfo').style.display = 'none';

		if (divId  && document.getElementById(divId).style.display == 'none') {
			document.getElementById(divId).style.display = 'block';
		}
	}



	function confirmDeletion(delId)
	{
		if (confirm("Are you sure, you want to delete this application/user? This will delete all other related data also ")) {
			window.location = 'registeredUsers.php?action=delete&id='+delId
		}
	}

	function confirmActivate(delId)
	{
		var arr = document.location.href.split('?');

		//alert(arr[0]);

		if (confirm("Are you sure, you want to activate this user?")) {
			window.location = arr[0]+'?action=act&id='+delId
		}
	}

	function confirmDeactivate(delId)
	{

		var arr = document.location.href.split('?');

		//alert(arr[0]);

 		if (confirm("Are you sure, you want to deactivate this user?")) {
 			window.location = arr[0]+'?action=deact&id='+delId
 		}
	}

	function popUpEdit(userId)
	{
		//alert(userId);
		window.open('editRegisteredUsers.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}


	function popUpEditSignature(userId)
	{
	//	alert(userId);
		window.open('editSignature.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}


	function popUpEditStaffMember(userId)
	{
		//alert(userId);
		window.open('editStaffMembers.php?id='+userId,'EditStaffMember','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}


	function popUpEditAccount(id)
	{
		//alert(userId);
		window.open('editAccount.php?id='+id,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function popUpManageAccount(userId)
	{
		//alert(userId);
		window.open('manageAccount.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function popUpSendMessage(userId)
	{
		//alert(userId);
		window.open('sendMessage.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function popUpSendEmail(userId)
	{
		//alert(userId);
		window.open('sendEmail.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function popUpEditPhase(userId)
	{
		//alert(userId);
		window.open('phaseManagement.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function popUpAddNote(userId)
	{
		//alert(userId);
		window.open('addNote.php?id='+userId,'EditPhase','width=900,height=500,left=200,top=60,resizable=0,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function popUpWidow(userId,tabNum,colName)
	{
		window.open('popUpUserInfo.php?userId='+userId+'&tabNum='+tabNum+'&colName='+colName,'UserInformation','fullWindow,fullscreen,resizable=1,location=0,statusbar=0,status=0,,scrollbars=1');
	}

	function confirmActivateStaff(delId)
	{
		if (confirm("Are you sure, you want to activate this staff member?")) {
			window.location = 'manageStaff.php?action=act&id='+delId
		}
	}

	function confirmDeactivateStaff(delId)
	{
		if (confirm("Are you sure, you want to deactivate this staff member?")) {
			window.location = 'manageStaff.php?action=deact&id='+delId
		}
	}
