<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML >
<html class="RecordBody" id="htmlRecord">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<!--MqRelPath--><link rel="stylesheet" type="text/css" href="/connect/theme/css/censusmain.css"/><!--/MqRelPath--><!--MqAbsPath><link rel="stylesheet" type="text/css" href="<BASE_VD>/theme/css/censusmain.css"/></MqAbsPath-->
	<!--MqRelPath--><link rel="stylesheet" type="text/css" href="/connect/theme/css/balloon.css"/><!--/MqRelPath--><!--MqAbsPath><link rel="stylesheet" type="text/css" href="<BASE_VD>/theme/css/balloon.css"/></MqAbsPath-->
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
	<!--MqRelPath--><link rel="stylesheet" type="text/css" href="/connect/js/JQUERY/jquery-ui-1.10.2.custom.css"/><!--/MqRelPath--><!--MqAbsPath><link rel="stylesheet" type="text/css" href="<BASE_VD>../../js/JQUERY/jquery.ui.theme.css"/></MqAbsPath-->
	<!--MqRelPath--><link rel="stylesheet" type="text/css" href="/connect/js/JQUERY/jquery.ui.timepicker.css"/><!--/MqRelPath--><!--MqAbsPath><link rel="stylesheet" type="text/css" href="<BASE_VD>../../js/JQUERY/jquery.ui.timepicker.css"/></MqAbsPath-->
	<!--MqRelPath--><link rel="stylesheet" type="text/css" href="/connect/js/JQUERY/jquery.ui.timepicker.extras.css"/><!--/MqRelPath--><!--MqAbsPath><link rel="stylesheet" type="text/css" href="<BASE_VD>../../js/JQUERY/jquery.ui.timepicker.extras.css"/></MqAbsPath-->

	<link rel="stylesheet" href="/connect/materialize/css/materialize.custom.css">
	<link rel="stylesheet" type="text/css" href="/connect/js/jquery/bootstrap3.3.7/css/bootstrap.min.css"  />	
	
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/JQUERY/jquery-1.7.1.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/JQUERY/jquery-1.7.1.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/JQUERY/jquery.ui.core.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/JQUERY/jquery.ui.core.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/JQUERY/jquery.ui.position.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/JQUERY/jquery.ui.position.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/JQUERY/jquery.ui.timepicker.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/JQUERY/jquery.ui.timepicker.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/JQUERY/jquery.ui.timepicker.changes.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/JQUERY/jquery.ui.timepicker.changes.js"></script></MqAbsPath-->
	
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqsysutils.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqsysutils.js" ></script></MqAbsPath-->
  	<!--MqRelPath--><script type="text/javascript" src="/connect/js/cmqslddmgr.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/cmqslddmgr.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/cmqsummarylist.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/cmqsummarylist.js" ></script></MqAbsPath-->				
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/dependentfields.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/dependentfields.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/vnreportmanager.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/vnreportmanager.js" ></script></MqAbsPath-->
	<script type="text/javascript" src="/connect/js/vn.core.js" ></script>
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/window.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/window.js" ></script></MqAbsPath-->
  	<!--MqRelPath--><script type="text/javascript" src="../js/viewconstants.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/<VIEW_FOLDER>/js/viewconstants.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqformelements.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqformelements.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqrecordset.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqrecordset.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqviewfields.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqviewfields.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqloaddata.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqloaddata.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/xml.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/xml.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="../js/customcode.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/<VIEW_FOLDER>/js/customcode.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqvipadptr.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqvipadptr.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqaddassetsext.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqaddassetsext.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/cmqlookupitemint.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/cmqlookupitemint.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/initlookupitemint.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/initlookupitemint.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/autosuggest.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/autosuggest.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="../js/cmqworkflowrules.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/<VIEW_FOLDER>/js/cmqworkflowrules.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/mqlist.js" ></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/mqlist.js" ></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/popupwindow.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/popupwindow.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/date.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/date.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/anchorposition.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/anchorposition.js"></script></MqAbsPath-->
	<!--MqRelPath--><script type="text/javascript" src="/connect/js/calendarpopup.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/js/calendarpopup.js"></script></MqAbsPath-->
	

	
	<script type="text/javascript">
		var BTN_NAME_BACK="Back";
		var BTN_NAME_NEXT="Next";
		var BTN_NAME_FINISH="Finish";
		var _currentSection=1;
		
		var m_objMqButton=new MqButton();
		var BASE_VD_NAME="%BaseVD%";
		var PROJ_ID="%ProjID%";
		var VIEW_ID="%ViewID%";
		var mstrCurrentLocation=g_MqRef.MqFS.GetCurrentLocation(window);
		var m_objFormElement=new CMqFormElement();
		var objCustomCode=new MqCustomCode();
		var objRequest=new CMqHTTPRequest_js();
		var m_objLoadDataMgr;
		var m_objWorkFlow;
		var m_objDisplayElements=new CMqDisplayElements();
		
		var m_objAutoSuggest = new CMqAutoSuggest();
		
		m_objAutoSuggest.Initialize("", document, GetAutoSuggestHideEventElements());
		
		var m_objLookupItemInfoColl=new Array();
		var g_VWS=new VecWebSession();
		g_VWS.Init("", 
						BASE_VD_NAME,
						document, this, new VNUser( "", 0), PROJ_ID);
						
		var m_objViewFields= g_VWS.ViewFields();
		var m_objLookupItemDD = new CMqLookupItemDDEvents();
		var m_objLookupItemUI = new CMqLookupItemDDUI();
		var m_objLookupItemQry = new CMqLookupItemDDQry(this);
		
		m_objLookupItemDD.Initialize("", document, GetAutoSuggestHideEventElements(), this);
		
		var strDateFormat = parent.Record.strDateFormat;
		var strTimeFormat = parent.Record.strTimeFormat;
		
		var objVNCal = new VNCalendar("ifraCal")
		document.write(objVNCal.GetStyles());
		
		var _isDirty=false;
		
		function GetAutoSuggestHideEventElements()
		{
			var arrFrameObjects=new Array(document);
			
			return arrFrameObjects;
		}
		
		function CreateWindowWithApplet2(ctrl ,ctrlAnchor,strFieldID)
		{	
			objVNCal.Show(ctrl, ctrlAnchor, strFieldID);
		}
		
		function VerifyValue(ctrlName,strNewValue,strFieldID)
		{	
			var ctrl = document.getElementById(ctrlName);
			if (ctrl){
				ctrlvalue = ctrl.value;
				if (ctrlvalue !=  strNewValue){
					ctrl.value = strNewValue;
		
					if(ctrl.onchange){
						ctrl.onchange();
					}
		
					OnRecordChanged(strFieldID);
				}		
			}
		}
	</script>
	<!--MqRelPath--><script type="text/javascript" src="../js/customsettings.js"></script><!--/MqRelPath--><!--MqAbsPath><script type="text/javascript" src="<BASE_VD>/<VIEW_FOLDER>/js/customsettings.js"></script></MqAbsPath-->
	<script type="text/javascript">
		//START Common with tmplRecord
		function AddURLButton(strURL,strCSSClassName,strFieldID, strFieldName, objDocumentRef)
        {
			var strTooltipButton="";
			var URL_BUTTON_NAME="RC";
			var RC_CSS_CLASS_NAME="RemoteControl";
			var strURLButtonName;
			var objString=new MqString();
			var USER_DETAILS_CLASS_NAME ="UserDetails";
			var BROWSE_ALT_CHOICE_LIST_CLASS_NAME ="BrowseAlternateChoiceList";
			var strButtonAction="MqOpenURL('"+strURL+"')";
			var strButtonNamePostfix;
			
			if (RC_CSS_CLASS_NAME==objString.Left(strCSSClassName,RC_CSS_CLASS_NAME.length)){
				strTooltipButton=parent.TITLE_START_REMOTE_CONTROL;
			}else{			
				if(USER_DETAILS_CLASS_NAME.toLowerCase()==objString.Left(strCSSClassName,USER_DETAILS_CLASS_NAME.length).toLowerCase()){
					strTooltipButton=parent.TITLE_USER_DETAILS;
					strButtonAction=strURL;
				}else{	
					if(BROWSE_ALT_CHOICE_LIST_CLASS_NAME.toLowerCase()==objString.Left(strCSSClassName,BROWSE_ALT_CHOICE_LIST_CLASS_NAME.length).toLowerCase()){
						strTooltipButton=parent.TITLE_SELECT_VALUE;
						strButtonAction=strURL;
						strButtonNamePostfix="_SelVal";
					}else{
						strTooltipButton=parent.TITLE_CONNECT_TO_WEB_ADDRESS;
					}
				}
			}
					
			if(m_objMqButton){	
				if(strFieldName){
					if(strButtonNamePostfix){
						strURLButtonName=strFieldName+strButtonNamePostfix;
					}else{
						strURLButtonName=URL_BUTTON_NAME+strFieldName;
					}
				}else{
					strURLButtonName=URL_BUTTON_NAME+strFieldID;		
				}
				
				m_objMqButton.WriteButtonHTML(strURLButtonName,strButtonAction,strCSSClassName,false,m_objMqButton.STATE_1,strTooltipButton, null, objDocumentRef);
			}
        }		
		
		function SetComboOrListValue(lngFieldID, arrSelectedIDs, arrSelectedValues)
		{
			var strSelectedIDs;
			var strSelectedValues;
			
			if (lngFieldID)
			{
				var objField=m_objViewFields.Field(lngFieldID);

				var objFormElement=new CMqFormElement();
				objFormElement.Initialize(objField.GetBoundControl(),objField.GetControlType(),'document');
				var lngControlType=objFormElement.GetControlType();
				
				var strPrevVal=objFormElement.GetValue(false, objFormElement.GetElement());
				
				if (lngControlType == CTRL_TYPE_LARGE_COMBO)
				{
					strSelectedIDs = "";
					strSelectedValues = "";
					
					if(arrSelectedIDs && arrSelectedValues){
						strSelectedIDs = arrSelectedIDs[0];
						strSelectedValues = arrSelectedValues[0];
					}
						
					objFormElement.SetValueToLargeCombo(objFormElement.GetElement(), strSelectedIDs, strSelectedValues, lngFieldID);
					objFormElement.ProcessCustomAttributes();
				}
				else
				{
					var selectedValues="";
					if(arrSelectedValues){
						for (var i=0; i < arrSelectedValues.length; i++)
						{
							if (i > 0){
								selectedValues += DEFAULT_VALUE_DELIM;
							}
			
							selectedValues += g_MqRef.MqStr.MqDecodeURIComponent(arrSelectedValues[i]);
						}
					}
					objFormElement.SetValue(selectedValues);
				}
				
				var strNewVal=objFormElement.GetValue(false, objFormElement.GetElement());
				
				//only trigger the on change event if the value has actually changed
				if(strNewVal!=strPrevVal)
				{
					var objHTMLElement = objFormElement.GetElement();
					if (objHTMLElement && objHTMLElement.onchange)
					{
						objHTMLElement.onchange();
					}
					else
					{
						OnRecordChanged(lngFieldID);
					}
				}
			}
		}
				
		function LoadLargeListOrCombo(lngFieldID, notUsed, strSearchResultsURL, strTableName, blnAutoComplete, lngRecordsPerPage, fnSetValue, lngWidth, lngHeight,lngDSType)
		{ 
		

			var objField=m_objViewFields.Field(lngFieldID);

			var objCL = new CMqChoiceList(document, this);			

			objCL.InitLargeListOrCombo(objField, fnSetValue, strSearchResultsURL, blnAutoComplete, lngRecordsPerPage);
	
			var blnMultiSelect=objField.IsMultiSelect(document);
			
			if(!lngWidth){
				if(blnMultiSelect){
					lngWidth=1000;
				}else{
					lngWidth=850;
				}
			}
			if(!lngHeight){
				if(blnMultiSelect){
					lngHeight=770;
				}else{
					lngHeight=700;
				}
			}
			
			var strWinFeatures=GetWinFeaturesToCenter(lngWidth, lngHeight); 
			var strURL=mstrCurrentLocation+"WCDisplayChoices.asp?WCI=TmplLookupItem&MqFID=" + lngFieldID;
			var strURLExtraQS="";
			
			if(!blnAutoComplete){
				if(blnMultiSelect){
					if(objField){
						var objFieldCtrl=document.getElementById(objField.GetBoundControl());
						if(objFieldCtrl){
							objFieldCtrl.focus();
						}
					}
					strURLExtraQS="&MC=1";
				}
				var objWin = new VNWindow(true);
					objWin.OpenModalTop(strURL + strURLExtraQS, lngWidth, lngHeight,true);
			}else{
				strURLExtraQS="&AC=1";
				return strURL + strURLExtraQS;
			}
		}
		//END Common with tmplRecord
		
		function Onload()
		{
			g_MqRef.ResMgr.ProcessAll(document);
			
			var intBodyHeight;
			
			if (document.all){
				if (document.documentElement && document.documentElement.offsetHeight){
					intBodyHeight=document.documentElement.offsetHeight;
				}else{
					intBodyHeight=document.body.offsetHeight;
				}
			}else{
				intBodyHeight=window.innerHeight;
			}
			var lngHeightDiff=75;
			var mblHeightDiffCorrection = 0;
			if(CMqBrowserDetector().mobile)
			{
				mblHeightDiffCorrection = 250;
			}
			var lngID=g_MqRef.MqStr.GetQueryStringValue(location.search, "UEID");
			
			LoadData(lngID);
			if(lngID==""){
				//add new UI
				document.getElementById("wizTitle").innerHTML=WIZARD_TITLE_EDIT;
				document.getElementById("wizDesc").innerHTML=WIZARD_DESCRIPTION_EDIT;
				document.getElementById("frmButton").src=WIZARD_IMG;
				document.getElementById("RecTabRO").style.display = "";
				document.getElementById("RecHeader").style.display = "";
				
				objCustomCode.OnAfterLoadRec();
				lngHeightDiff=150;
			}else{
				//R-O view UI
				document.getElementById("RecTabRO").style.display = "none";
				m_objMqButton.HideTextButton(m_objMqButton.GetButtonHTMLName("Save"), true);
			}
			var objFormContents=document.getElementById("FormContents");
			if(objFormContents){
				objFormContents.style.height=(intBodyHeight-lngHeightDiff-mblHeightDiffCorrection)+"px";
			}
			
			HandleUIMode();
		}
		
		function HandleUIMode()
		{
			var lngWizMode=g_MqRef.MqStr.GetQueryStringValue(location.search, "wiz");
			var objWizButtons=document.getElementById("wizButtons");
			var objDlgButtons=document.getElementById("dlgButtons");
			
			if(lngWizMode=="1"){
				if(objWizButtons){
					objWizButtons.style.display="";
				}
				if(objDlgButtons){
					objDlgButtons.style.display="none";
				}
				
				ShowSection(0);
			}else{
				if(objWizButtons){
					objWizButtons.style.display="none";
				}
				if(objDlgButtons){
					objDlgButtons.style.display="";
				}
			}
		}
		
		function ShowSection(moveBy)
		{
			_currentSection+=moveBy;
			
			var arrSection1Rows=GetRowsInSection(1);
			var arrSection2Rows=GetRowsInSection(2);
			if(_currentSection==1){
			
				if(arrSection1Rows){
					for(x=0; x<arrSection1Rows.length; x++)
					{
						if(arrSection1Rows[x])
						{
							arrSection1Rows[x].style.display="";
						}
					}
				}
				
				if(arrSection2Rows){
					for(x=0; x<arrSection2Rows.length; x++)
					{
						if(arrSection2Rows[x])
						{
							arrSection2Rows[x].style.display="none";
						}
					}
				}
				
				m_objAddAssetsAdptr.HideNextUniqueInput();
				
			}else{
				if(arrSection1Rows){
					for(x=0; x<arrSection1Rows.length; x++)
					{
						if(arrSection1Rows[x])
						{
							arrSection1Rows[x].style.display="none";
						}
					}
				}
				
				if(arrSection2Rows){
					for(x=0; x<arrSection2Rows.length; x++)
					{
						if(arrSection2Rows[x])
						{
							arrSection2Rows[x].style.display="";
						}
					}
				}
				
				m_objAddAssetsAdptr.ShowNextUniqueInput();
			}		
			
			HandleButtons();
			
		}
		
		function GetRowsInSection(lngSection)
		{
			var arrRows = new Array();
			
			var objTable=document.getElementById("RecTabRO");
			var objSection=document.getElementById("Section" + lngSection + "Header");
			var objNextSection=document.getElementById("Section" + (lngSection + 1) + "Header");
			var blnStarted=false;
			
			if(objSection)
			{
				var objStartRow=objSection.parentNode.parentNode;
				var objEndRow=null;
				
				if(objNextSection)
				{
					objEndRow=objNextSection.parentNode.parentNode;
				}
				if(objTable)
				{
					for(var r=0; r<objTable.rows.length;r++)
					{
						var oRow=objTable.rows[r];
						
						if(oRow==objStartRow)
						{
							blnStarted=true;
						}
						
						if(blnStarted)
						{
							if(objEndRow)
							{
								if(objEndRow==oRow)
								{
									break;
								}
							}

							//add row to array
							arrRows.length++;
							arrRows[arrRows.length-1]=oRow;
						}
					}
				}
			}
			return arrRows;
		}
		
		function HandleButtons()
		{
			if(_currentSection==1)
			{
				m_objMqButton.DisableButton(BTN_NAME_BACK);
				m_objMqButton.EnableButton(BTN_NAME_NEXT);
				m_objMqButton.DisableButton(BTN_NAME_FINISH);

			}else{
				m_objMqButton.EnableButton(BTN_NAME_BACK);
				m_objMqButton.DisableButton(BTN_NAME_NEXT);
				m_objMqButton.EnableButton(BTN_NAME_FINISH);
			}
		}
		
		function LoadData(lngID)
		{
			var strXMLFields="<Mq:WVAtt_43>";
			g_VWS.InitFields(strXMLFields, null, m_MqAutoList, 
							m_objDisplayElements, InitDeclaredBizRules, "document");
			
			m_objWorkFlow=g_VWS.WorkflowMgr();
			
			var strRevisionHistoryFieldID=""; //write from WVE
			
			var m_oViewFields= g_VWS.ViewFields();//new CMqFieldCol();
			m_oViewFields.SetRevisionHistoryFieldID(strRevisionHistoryFieldID);
				
			m_objLoadDataMgr=g_VWS.LoadDataMgr();	
			m_objLoadDataMgr.SetEnFldsPerMode([0,0,0]);
			m_objLoadDataMgr.OnBeforeLoad();
				
			if(lngID!="")
			{
				g_MqRef.RESTClient.Initialize(g_VWS.URL().BaseVDURL());
				const req={
					"Srch": lngID, 
					"SrchFlds":[1],
					"ProjID": PROJ_ID,
					"ViewID": VIEW_ID};
				g_MqRef.RESTClient.Post("vzc/" + PROJ_ID + "/GetData", JSON.stringify(req))
				.then(function (response) 
				{
					if(response.numRecsFound == 1){
						var strXMLFieldValues = response.xml;
						if (strXMLFieldValues.length>0){
							var oFieldValuesRs=new CMqRecordset(strXMLFieldValues,m_oViewFields.GetFieldIDName());	
							m_objLoadDataMgr.Load(oFieldValuesRs,1, m_objDisplayElements);
						}
					}
				});
			}
		}
		
		function LoadEditMode(strURL, lngID, lngWidth, lngHeight)
		{
			if(lngID!="" && strURL){
				strURL=strURL.replace("<ISSUEID>", lngID);
				var oWin = new VNWindow(true);
				oWin.OpenModalTop(strURL, lngWidth, lngHeight, true);
				oWin.CloseModalTop();
			}
		}
		
		function OnClickClose()
		{
			CloseWindow();
		}
		
		function OnClickSave()
		{
			//for now the save is in the ext in the saveBefore
			objCustomCode.saveBefore();
		}
		
		function OnRecordChanged(strFieldID)
		{
			_isDirty=true;
			
			g_VWS.LoadDataMgr().SetFieldChanged(strFieldID);
		}
			
		CloseWindowByEscKey();
	</script>
</head>
<iframe id="ifrAutoSuggest" src="TmplLookupItemDD.htm" 
style="position: absolute;width: 400px; height: 170px;z-index: 16;display: none; border: 1px solid gray;overflow: none" frameborder="0" ></iframe>
<body onload="Onload()" class="RecordBody addAssetHeader" style="height:100%">
	<div id="ifraCal" style="position:absolute;visibility:hidden;background-color:white;layer-background-color:white;width:150px;height:170px;padding:0px;z-index:10;"></div>
	<div id="RecHeader" class="TopToolBarPopup" style="width:100%;margin-right:5px;margin-left:5px;pos-ition:absolute;t-op:0px; display:none;">
		<table width="100%" class="TopToolBarWizard">
			<tr>
				<td>
					<img id="frmButton" src="" style="height:42px; margin:0 5px 0 20px;" />
				</td>
				<td valign="top" style="padding-top:15px; padding-left:10px;" width="100%">
					<div class="WizardTitle" id="wizTitle" name="wizTitle"></div>
					<div class="WizardDescription" id="wizDesc" name="wizDesc"></div>
					<div class="DlgCloseBtn" onclick="OnClickClose();" style="margin-top:7px; margin-right:13px;"><i class="fa fa-close"></i></div>
				</td>
			</tr>
		</table>
	</div>
<form name="Record" action="#">
	<div id="FormContents" style="overflow-y: auto; overflow-x:hidden; margin-right:5px;">
		<div>
			<div class="DlgCloseBtn" onclick="OnClickClose();" style="margin-top:15px; margin-right:20px;"><i class="fa fa-close"></i></div>
			
	<table width="100%" id="RecTabRO" class="RecordTab AddRecordTab" cellspacing="0" style="table-layout: fixed; position:relative;">
		<tr><td><br></td></tr>
		%FirstTabText%
		<tr>
			%FormFields%
		</tr>
	</table>
	</div>
	
	</form>
	<div id='dvCloseBtn' style="margin-right:5px;margin-left:5px;width:99%; position:absolute;bottom:0px;left:0px;">
		
		<table width="100%" style="" id="dlgButtons">
			<tr>
				<td>
					<table>
						<tr>
							<td>
								<script type="text/javascript">
									if(typeof(strEditViewURL)!="undefined"){
										if(strEditViewURL!=""){
											var strBtn1Caption=g_MqRef.MqStr.FormatString(g_MqRef.RESX["VNFORM.BTN1.CAPTION"], WIZARD_TITLE_EDIT+";",";");
											var strBtn1TT=g_MqRef.MqStr.FormatString(g_MqRef.RESX["VNFORM.BTN1.TT"], WIZARD_TITLE_EDIT+";",";");
											
											var lngID=g_MqRef.MqStr.GetQueryStringValue(location.search, "UEID");
											if(lngID!=""){
												m_objMqButton.WriteTextButtonHTML("Edit1", strBtn1Caption, 'LoadEditMode(strEditViewURL, ' + lngID + ', lngEditViewWidth, lngEditViewHeight);return false;', "", 32, "", strBtn1TT, 140);
											}
										}
									}
								</script>
							</td>
							<td>
								<script type="text/javascript">
									if(typeof(strEditViewURL2)!="undefined"){
										var strBtn2Caption=g_MqRef.MqStr.FormatString(g_MqRef.RESX["VNFORM.BTN2.CAPTION"], strEditView2Display+";",";");
										var strBtn2TT=g_MqRef.MqStr.FormatString(g_MqRef.RESX["VNFORM.BTN2.TT"], strEditView2Display+";",";");
										var lngID=g_MqRef.MqStr.GetQueryStringValue(location.search, "UEID2");
										if(lngID!=""){
											m_objMqButton.WriteTextButtonHTML("Edit2", strBtn2Caption, 'LoadEditMode(strEditViewURL2, ' + lngID + ', lngEditView2Width, lngEditView2Height);return false;', "", 32, "", strBtn2TT, 140);
										}
									}
								</script>
							</td>
						</tr>
					</table>
				</td>
				<td align="right" style="width:100px">
					<script type="text/javascript">
						m_objMqButton.WriteTextButtonHTML("Save", g_MqRef.RESX["BUTTON_OK"], 'OnClickSave();', "", 32, "", g_MqRef.RESX["BUTTON_OK"], 90);
					</script>
				</td>
				<td align="right" style="width:100px">
					<script type="text/javascript">
						m_objMqButton.WriteTextButtonHTML("Close", g_MqRef.RESX["BUTTON_CLOSE"], 'OnClickClose();', "", 32, "", g_MqRef.RESX["BUTTON_CLOSE"], 90);
					</script>
				</td>
			</tr>
		</table>
		
		<table style="display:none" align="right" id="wizButtons">
			<tr>
			<td style="width:100px" align="right">
				<script type="text/javascript">
					m_objMqButton.WriteTextButtonHTML(BTN_NAME_BACK, g_MqRef.RESX["BUTTON_BACK"], 'ShowSection(-1)', "", 32, "", g_MqRef.RESX["BUTTON_BACK"], 90);
				</script>
			</td>
			<td style="width:100px" align="right">
				<script type="text/javascript">
					m_objMqButton.WriteTextButtonHTML(BTN_NAME_NEXT, g_MqRef.RESX["BUTTON_NEXT"], 'ShowSection(1)', "", 32, "", g_MqRef.RESX["BUTTON_NEXT"], 90);
				</script>
			</td>
			<td style="width:100px" align="right">
				<script type="text/javascript">
					m_objMqButton.WriteTextButtonHTML(BTN_NAME_FINISH, g_MqRef.RESX["BUTTON_FINISH"], 'OnClickSave()', "", 32, "", g_MqRef.RESX["BUTTON_FINISH"], 90);
				</script>
			</td>
			<td style="width:100px" align="right">
				<script type="text/javascript">
					m_objMqButton.WriteTextButtonHTML("Close", g_MqRef.RESX["BUTTON_CANCEL"], 'OnClickClose();', "", 32, "", g_MqRef.RESX["BUTTON_CANCEL"], 90);
				</script>
			</td>
		</tr>
	</table>
	</div>
	<div id="loadingOverlay" class="ui-widget-overlay" style="width:100%;height:100%;z-index:1001;display:none"><img src="../../theme/images/images/icon_wait.gif" style="position:absolute; left:50%; top:50%;"/></div>
</body>
</html>
