entityConfiguration.dcendusers = {
	entity:"dcendusers",
	applicationId:"AppId4",
	searchTemplate:"/dotcom/"+gOrgFolder+"/ProfileManagement/jsp/profilemanagement/ForgotPassword.jsp",
	addEditTemplate:"/dotcom/"+gOrgFolder+"/ProfileManagement/jsp/profilemanagement/SignUp.jsp",
	listTemplate:"",
	viewTemplate:"",
	entityIdField:"euid_eudatacenterid",
	URLForEntityList:"/dotcom/"+gOrgFolder+"/SearchUsersList.kar",
	URLForEntityPreEdit:"",
	URLForEntitySave:"/dotcom/"+gOrgFolder+"/ProfileSave.kar?orgfolder="+gOrgFolder,
	URLForPreFetch:"/dotcom/"+gOrgFolder+"/ForgotPrefetch.kar?OrgFolder="+gOrgFolder,
	URLForEntityDelete:"",
	URLForEntityView:"",
	URLForEntitySubmit:"/dotcom/"+gOrgFolder+"/ForgotPassword.kar",
	postAddEdit:"attachDatePicker",
	postSearch:"",
	postEdit:"attachDatePicker",
	postList:null,
	saveValidate:null,
	beforeRowAdd:null,
	beforeCellAdd:null,
	beforeHeaderRowAdd:null,
	afterHeaderRowAdd:null,
	afterRowAdd:null,
	postViewTemplate:"",
	postView:"",
	imageURL:""
};

entityConfiguration.MENU= {
	entity:"MENU",
	applicationId : "AppId4",
	searchTemplate: "/dotcom/gOrgFolder/ProfileManagement/jsp/profilemanagement/UserMenuDisplay.jsp",
	addEditTemplate: "",
	listTemplate: "",
	viewTemplate: "",
	entityIdField: "",
	URLForEntityList:"",
	URLForEntityPreEdit:"",
	URLForEntitySave:"/dotcom/"+gOrgFolder+"/ModuleController.kar",
	URLForPreFetch:"/dotcom/"+gOrgFolder+"/UserMenuDisplay.kar",
	postAddEdit: "",
	postSearch:null,
	postEdit:"",
	postList:null,
	saveValidate:null,
	beforeRowAdd:null,
	beforeCellAdd:null,
	beforeHeaderRowAdd:null,
	afterHeaderRowAdd:null,
	imageURL:""
};


entityConfiguration.sccouriermaster= {
	entity:"sccouriermaster",
	applicationId : "AppId4",
	searchTemplate: "",
	addEditTemplate: "",
	listTemplate: "",
	viewTemplate: "",
	entityIdField: "couriermstrid_couriermstrdcnid",
	URLForEntityList:"/dotcom/"+gOrgFolder+"/CourierListing.kar",
	URLForEntityPreEdit:"",
	URLForEntitySave:"",
	URLForPreFetch:"/dotcom/"+gOrgFolder+"/ZonePrefetch.kar",
	postAddEdit: "",
	postSearch:null,
	postEdit:"",
	postList:null,
	saveValidate:null,
	beforeRowAdd:null,
	beforeCellAdd:null,
	beforeHeaderRowAdd:null,
	afterHeaderRowAdd:null,
	imageURL:""
};

var USERFIELDS = new Object();

USERFIELDS.LoginId = "cusloginid";
USERFIELDS.Password = "cuspassword";
USERFIELDS.Salutation = "salid";
USERFIELDS.FirstName = "eufirstname";
USERFIELDS.MiddleName = "eumiddlename";
USERFIELDS.LastName = "eulastname";
USERFIELDS.DisplayName = "cusdisplayname";
USERFIELDS.ContactNo = "eucontactno";
USERFIELDS.AddLine1 = "euaddline1";
USERFIELDS.AddLine2 = "euaddline2";
USERFIELDS.City= "euaddcity";
USERFIELDS.State = "euaddstate";
USERFIELDS.Country = "countrymastid";
USERFIELDS.ZipCode = "euaddzipcode";
USERFIELDS.EmailId = "euemailid";
USERFIELDS.DoB = "eudob";
USERFIELDS.QuestionId = "favid";
USERFIELDS.Answer = "eusecretanswer";
USERFIELDS.OldPassword = "OldPassword";
USERFIELDS.NewPassword = "newpassword";
USERFIELDS.ConfirmNewPassword = "ConfirmNewPassword";
USERFIELDS.SalutationEdit = "salid";
USERFIELDS.QuestionIdEdit = "favid";
USERFIELDS.Interest = "euinterest";
USERFIELDS.Status = "usid";
USERFIELDS.col1title = "dcemdata1col1title";
USERFIELDS.col2title = "dcemdata1col2title";
USERFIELDS.col3title = "dcemdata1col3title";
USERFIELDS.col4title = "dcemdata1col4title";
USERFIELDS.col5title = "dcemdata1col5title";
USERFIELDS.col6title = "dcemdata1col6title";
USERFIELDS.col7title = "dcemdata1col7title";
USERFIELDS.col8title = "dcemdata1col8title";
USERFIELDS.col9title = "dcemdata1col9title";
USERFIELDS.col10title = "dcemdata1col10title";
USERFIELDS.col11title = "dcemdata1col11title";
USERFIELDS.col12title = "dcemdata1col12title";
USERFIELDS.col13title = "dcemdata1col13title";
USERFIELDS.col14title = "dcemdata1col14title";
USERFIELDS.col15title = "dcemdata1col15title";
USERFIELDS.col16title = "dcemdata1col16title";
USERFIELDS.col17title = "dcemdata1col17title";
USERFIELDS.col18title = "dcemdata1col18title";
USERFIELDS.col19title = "dcemdata1col19title";
USERFIELDS.col20title = "dcemdata1col20title";
USERFIELDS.col21title = "dcemdata1col21title";
USERFIELDS.col22title = "dcemdata1col22title";
USERFIELDS.col23title = "dcemdata1col23title";
USERFIELDS.col24title = "dcemdata1col24title";
USERFIELDS.col25title = "dcemdata1col25title";
USERFIELDS.col26title = "dcemdata1col26title";
USERFIELDS.col27title = "dcemdata1col27title";




function showForgotPassword(pOrgFolder)
{

	var lEntity='dcendusers';
	var	lEntityConfig = eval("entityConfiguration." + lEntity);	
	showOnlyEntity(lEntity);
	gCurrentEntitySaveURL = gEntityConfig.URLForEntitySubmit;
	submitForm(document.SEARCH ,gCurrentEntitySaveURL, "POST", handleRedirectSave, gLoginKey, null);
}

function signUp(pOFolder)
{
	//alert('hiii");
    clearDIV("Search");
	var lSearchElement;
	var lSearch;
	var lEntityConfiguration;
	var lRequest;
	var lXMLResponse;
	var lRoot;

	var lEntity="dcendusers";
	gEntityConfig = eval("entityConfiguration." + lEntity);	
	lEntityConfiguration = gEntityConfig;
	gCurrentEntity = lEntityConfiguration.entity;
	gCurrentSearchTemplate = lEntityConfiguration.searchTemplate;
	gCurrentAddEditTemplate = lEntityConfiguration.addEditTemplate;
	gCurrentListTemplate = lEntityConfiguration.listTemplate;
	gCurrentViewTemplate = lEntityConfiguration.viewTemplate;
	gCurrentEntityIdField = lEntityConfiguration.entityIdField;
	gCurrentEntityListURL = lEntityConfiguration.URLForEntityList;
	gCurrentEntityPreEditURL = lEntityConfiguration.URLForEntityPreEdit;
	gCurrentEntitySaveURL = lEntityConfiguration.URLForEntitySave;
	gCurrentEntityPreURL = lEntityConfiguration.URLForPreFetch;
	gCurrentEntityDeleteURL = lEntityConfiguration.URLForEntityDelete;
	gPostAddEdit = lEntityConfiguration.postAddEdit;
	gPostSearch = lEntityConfiguration.postSearch;
	gPostEdit = lEntityConfiguration.postEdit;
	gPostList = lEntityConfiguration.postList;
	gClearAddEdit = true;
	lAddEditElement = null;
	if (lAddEditElement == null)
	{
		var lSignUpTemplate="/dotcom/"+pOFolder+"/ProfileManagement/jsp/profilemanagement/SignUp.jsp?OrgFolder="+pOFolder;
		var lAJAXInteraction = new AJAXInteraction(lSignUpTemplate, null, true);
		lRequest = lAJAXInteraction.doPost('LK=' + gLoginKey);
		lXMLResponse = lRequest.responseXML;
		lRoot = lXMLResponse.documentElement;
		lAddEditElement = copyNodes(lRoot);
	
	}
    showAddEdit(lAddEditElement);
	    
/*	var lEntity=gEntity;
    var	lEntityConfig = eval("entityConfiguration." + lEntity);	
	showOnlyEntity(lEntity);
	showEntityAddEdit();
*/	
	
}

function fillCheckbox(pXMLObject)
{
	var lXMLResponse;
	var lRoot;
	var lLists;
	var lCount;
	var lElementCount;
	var lOptionCount;
	var lForm;
	var lOptions;
	var lSuccess;
	lXMLResponse = pXMLObject.responseXML;
	lRoot = lXMLResponse.documentElement;
	lSuccess = handleResult(lRoot.childNodes[0], null);
	if (lSuccess)
	{
		var lCheck=lRoot.childNodes[1].childNodes[3];
		for(lCount=0; lCount<lCheck.childNodes.length; lCount++)
		{
			fillInterest(lCheck.childNodes[lCount],lCount);
		}
	}
}

function fillInterest(pInterest,pCount)
{
	for ( var i=0; i<pInterest.attributes.length; i++)
	{
		if(pInterest.attributes[i].nodeName=="DISPLAY") 
		{
			var lInterest=pInterest.attributes[i].value;
			break;
		}
		if(pInterest.attributes[i].nodeName=="ID") 
		{
			var lID=pInterest.attributes[i].value;
		}
	}
	var lElement;
	var lIntDiv=document.getElementById("Interest");	
	lElement = gDOM.createNewElement("INPUT", [{name:"type", value:"checkbox"},{name:"value", value:lID},{name:"name", value:"userInterest"+pCount}]);
	if (pCount%3=='0')
	{
		var lRow = gDOM.createNewElement("TR", [{name:"id", value:"RowID"+pCount}]);
		var lTempRow=lRow;
		lIntDiv.appendChild(lRow);
		lRow.appendChild(lElement);
	}
	lIntDiv.appendChild(lElement);

	var lOption= document.createTextNode(lInterest);
	lIntDiv.appendChild(lOption);
}

function showSearchSignUp(pSearchElement)
{
	var lSearch;
	lSearch = document.getElementById("Search");
	lSearch.appendChild(pSearchElement);
	if (gPostSearch != null)
	{
		eval(gPostSearch);
	}
	clearForm("LIST");
	getPreEntitySignUp();
}

function getPreEntitySignUp()
{
	if (gEntityConfig.URLForPreFetch != null)
	{
		var lAJAXInteraction;
		lAJAXInteraction = new AJAXInteraction(gEntityConfig.URLForPreFetch, handlePreEntitySignUp);
		lAJAXInteraction.doPost('LK=' + gLoginKey);
	}
}

function  handlePreEntitySignUp(pXMLObject)
{
	var lXMLResponse;
	var lBaseEdit;
	var lEntity;
	var lData;
	var lLists;
	var lChildren;
	var lCount;
	var lSuccess;
	var lModules;
	lXMLResponse = pXMLObject.responseXML;
	lBaseEdit = lXMLResponse.documentElement;
	lBaseEdit = copyNodes(lBaseEdit);
	lSuccess = handleResult(lBaseEdit.childNodes[0]);
	if (lSuccess)
	{
		lChildren = lBaseEdit.childNodes;
		lLists = null;
		for (lCount = 1; lCount < lChildren.length; lCount++)
		{
			if (!isNodeNull(lChildren[lCount]))
			{
				 if (lChildren[lCount].nodeName == "LISTS")
				{
					lLists = parseLists(lChildren[lCount]);
				}
			}
		}
		if (lLists != null)
		{
			fillSelectsInForm(document.AddEdit, lLists);
		}
		
		if (gEntityConfig.postAddEdit!= null)
		{
			eval (gPostEdit + "(pXMLObject)");
		}
	}

}

function redirectFunction()
{
	var lRedirectPath="/dotcom/"+gOrgFolder+"/ProfileManagement/redirectToHome.html";
	gotoPage(lRedirectPath, null, null);
}

function fillCheckbox1(pXMLObject)
{
	var lXMLResponse;
	var lRoot;
	var lLists;
	var lCount;
	var lElementCount;
	var lOptionCount;
	var lForm;
	var lOptions;
	var lSuccess;
	lXMLResponse = pXMLObject.responseXML;
	lRoot = lXMLResponse.documentElement;
	lSuccess = handleResult(lRoot.childNodes[0], null);
	if (lSuccess)
	{
		var lCheck=lRoot.childNodes[1].childNodes[3];
		for(lCount=0; lCount<lCheck.childNodes.length; lCount++)
		{
			fillInterest1(lCheck.childNodes[lCount],lCount);
		}
	}
}

function fillInterest1(pInterest,pCount)
{
	for ( var i=0; i<pInterest.attributes.length; i++)
	{
		if(pInterest.attributes[i].nodeName=="DISPLAY") 
		{
			var lInterest=pInterest.attributes[i].value;
			break;
		}
		if(pInterest.attributes[i].nodeName=="ID") 
		{
			var lID=pInterest.attributes[i].value;
		}
	}
	var lElement;
	var lIntDiv=document.getElementById("Interest");	
	lElement = gDOM.createNewElement("INPUT", [{name:"type", value:"checkbox"},{name:"value", value:lID},{name:"name", value:"userInterest"+pCount}]);
	if (pCount%3=='0')
	{
		var lRow = gDOM.createNewElement("TR", [{name:"id", value:"RowID"+pCount}]);
		var lTempRow=lRow;
		lIntDiv.appendChild(lRow);
		lRow.appendChild(lElement);
	}
	lIntDiv.appendChild(lElement);

	var lOption= document.createTextNode(lInterest);
	lIntDiv.appendChild(lOption);
}

/*function showProfileEdit(pXMLObject)
{
	//alert(pXMLObject.responseText);
	var lXMLResponse;
	var lBaseEdit;
	var lEntity;
	var lData;
	var lLists;
	var lChildren;
	var lCount;
	var lSuccess;
	lXMLResponse = pXMLObject.responseXML;
	lBaseEdit = lXMLResponse.documentElement;
	lBaseEdit = copyNodes(lBaseEdit);
	lSuccess = handleResult(lBaseEdit.childNodes[0]);
	if (lSuccess)
	{
		lChildren = lBaseEdit.childNodes;
		lLists = null;
		for (lCount = 1; lCount < lChildren.length; lCount++)
		{
			if (!isNodeNull(lChildren[lCount]))
			{
					if (lChildren[lCount].nodeName == "DATA")
				{
						lData = lChildren[lCount];
				}
				else if (lChildren[lCount].nodeName == "LISTS")
				{
					lLists = parseLists(lChildren[lCount]);
				}
			}
		}
		gCurrentEntityIdForEdit = "";
		if (lLists != null)
		{
			fillSelectsInForm(document.AddEdit, lLists);
		}
			//var lName=lData.childNodes[1];
			//var lInterest=lName.getAttribute("euinterest");
			//var selectedInterest=lInterest.split("-");
			//for(var c=0;c<selectedInterest.length;c++)
			//{
			//	var a=selectedInterest[c];
			//	a=a-1;
			//	var b="userInterest"+a;
			//	var lFinal=eval("document.AddEdit."+b);
			//	lFinal.checked=true;
			//}
						
			for (lCount = 0; lCount < lData.childNodes.length; lCount++)
			{
				fillForm("AddEdit", lData.childNodes[lCount]);
			}
		if (gEntityConfig.postAddEdit!= null)
		{
			eval (gPostEdit + "(pXMLObject)");
		}
	}
}*/