var xmlDoc = null;								//the xml object that is loaded, modified in the background and finally posted to the backend var htmlbody = null;							//the html code of the form var arrHtmlViewbodies = new Array();	//an array with 1 or more viewbodies that need to be loaded var tmpXmlvalue = null;var resultXmlfill = null;var resultHtmlfill = null;var fckPrefix = "fck_";var FCKeditorLoaded = true;//This function gets the backend html data for 1 or more views (former $$viewbody) and fills a frontend div section with the view contents  function fillHtmlview(url){ 	//alert(url);	xmlDoc = loadXMLDoc(2,"",url);     //Start filling the Html from the Xml data     if (xmlDoc!=null){		//alert("xml: "+xmlDoc.xml);		//Retrieve the html body 		htmlbody = document.getElementsByTagName("body")[0];		//Locate all the the special aspml $$viewbody div(s) on the html  		arrHtmlViewbodies = this.getElementsByAttribute(htmlbody, "*", "aspmlvw" , "1"); 	      for(var i=0;i<arrHtmlViewbodies.length;i++){			//retrieve the $$viewbody from the backend (it's wrapped in a xml (aspml) layer      		tmpXmlvalue = getSingleValueFromXML(xmlDoc,"aspml_viewbody",fckPrefix);      		//alert(tmpXmlvalue);      		if (tmpXmlvalue!=null){     			arrHtmlViewbodies[i].innerHTML = tmpXmlvalue.replace(/&gt;/g,'>').replace(/&lt;/g,'<');			}		}	}}//The original function (above) was altered to be able to fill multiple frontend div section (labelled with aspmllabel) with dynamic content from the backendfunction fillHtmlview2(url,aspmllabel){ 	//alert(url);	xmlDoc = loadXMLDoc(2,"",url);     //Start filling the Html from the Xml data     if (xmlDoc!=null){		//alert("xml: "+xmlDoc.xml);		//Retrieve the html body 		htmlbody = document.getElementsByTagName("body")[0];		//Locate all the the special aspml $$viewbody div(s) on the html  		arrHtmlViewbodies = this.getElementsByAttribute(htmlbody, "*", "aspmlvw" , aspmllabel); 	      for(var i=0;i<arrHtmlViewbodies.length;i++){			//retrieve the $$viewbody from the backend (it's wrapped in a xml (aspml) layer      		tmpXmlvalue = getSingleValueFromXML(xmlDoc,"aspml_viewbody",fckPrefix);      		//alert(tmpXmlvalue);      		if (tmpXmlvalue!=null){     			arrHtmlViewbodies[i].innerHTML = tmpXmlvalue.replace(/&gt;/g,'>').replace(/&lt;/g,'<');			}		}	}}function FCKeditor_OnComplete(editorInstance) {  FCKeditorLoaded = true;}function loadAspmlview(url) {  if(!FCKeditorLoaded) {    setTimeout('loadAspmlview(\'' + url + '\')', 500);    return;  }fillHtmlview(url);}function loadAspmlview2(url,aspmllabel) {  if(!FCKeditorLoaded) {    setTimeout('loadAspmlview2(\'' + url,aspmllabel + '\')', 500);    return;  }fillHtmlview2(url,aspmllabel);}