function LoadCodeList(thisform){	document.getElementById("TreeResults").innerHTML=" ...please wait"	xmlHttp2=getXMLHTTP();	if(xmlHttp2){		var url = 'ag.BE.CodeList?OpenAgent&'+ new Date().valueOf();		xmlHttp2.open("POST", url, true);		xmlHttp2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp2.send(buildPOST2(thisform));		xmlHttp2.onreadystatechange = function() {	     		if (xmlHttp2.readyState == 4 && xmlHttp2.responseText ) {				if(xmlHttp2.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");									}else if(xmlHttp2.responseText.indexOf("FTSINGLEHIT")!=-1){					eval(xmlHttp2.responseText);				}else{				    	document.getElementById("TreeResults").innerHTML=xmlHttp2.responseText;					var stList = new SortableTable(document.getElementById("SearchResultTable"), ['Number','String', 'String']);					stList.onsort = function () {		 			var rows = stList.tBody.rows;		 			var l = rows.length;		 			for (var i = 0; i < l; i++) {		 		 		removeClassName(rows[i], i % 2 ? "odd" : "even");		 		 		addClassName(rows[i], i % 2 ? "even" : "odd");		 			}					};									stList.sort(1);						if(typeof parent.resizeIframe != "undefined"){							parent.resizeIframe("searchResult");    						}									}						}				}	}}function getCLValues(){	var aValues = new Array()	chboALL = window.document.forms[0].fdSelectAllContentLanguages; 	if (chboALL.checked == true){ 			window.document.forms[0].fdContentLanguage.value = chboALL.value; 	}else{		chbo = window.document.forms[0].fdSelectContentLanguage 			for(i=0;i<chbo.length;i++){ 				if(chbo[i].checked){ 					aValues[aValues.length] = chbo[i].value				}			}  		window.document.forms[0].fdContentLanguage.value = aValues.join(',');  		document.getElementById("selectCL").style.display='';	}}function FreeSearchIntranet(e){var key = window.event ? e.keyCode : e.which;	var keychar = String.fromCharCode(key);	if(key==13) {		AjaxFreeSearch(document.forms[0],document.forms[0].fdSearchType.value, 'ADMIN', '0');	return false;	}} function FreeSearch(e){var key = window.event ? e.keyCode : e.which;	var keychar = String.fromCharCode(key);	if(key==13) {		AjaxFreeSearch(document.forms[0],document.forms[0].fdSearchType.value, document.forms[0].fdLang.value,'1');	return false;	}} function CodeSearch(e){var key = window.event ? e.keyCode : e.which;	var keychar = String.fromCharCode(key);	if(key==13) {		LoadCodeList(document.forms[0]);	return false;	}}function ArrowSwitch(divname){var e = document.getElementById(divname);	if (e.className=='arrowdown'){		e.className="arrowright";	}else{		e.className="arrowdown";	}	if(typeof parent.resizeIframe != "undefined"){		parent.resizeIframe("searchResult");	}}function ArrowSwitch2(divname){var e = document.getElementById(divname);	if (e.className=='arrowdown2'){		e.className="arrowright2";	}else{		e.className="arrowdown2";	}}function addClassName(el, sClassName) {		 var s = el.className;		 var p = s.split(" ");		 var l = p.length;		 for (var i = 0; i < l; i++) {		 		 if (p[i] == sClassName)		 		 		 return;		 }		 p[p.length] = sClassName;		 el.className = p.join(" ").replace( /(^\s+)|(\s+$)/g, "" );}function removeClassName(el, sClassName) {		 var s = el.className;		 var p = s.split(" ");		 var np = [];		 var l = p.length;		 var j = 0;		 for (var i = 0; i < l; i++) {		 		 if (p[i] != sClassName)		 		 		 np[j++] = p[i];		 }		 el.className = np.join(" ").replace( /(^\s+)|(\s+$)/g, "" );}function setURLParameters() {	var args = new Object();	var query = location.search.substring(1); // Get query string.	var pairs = query.split("&" ); // Break at comma.	for(var i = 0; i < pairs.length; i++) {		var pos = pairs[i].indexOf('='); // Look for "name=value".		if (pos == -1) continue; // If not found, skip.		var argname = pairs[i].substring(0,pos); // Extract the name.		var value = pairs[i].substring(pos+1); // Extract the value.		args[argname] = unescape(value); // Store as a property.	}return args;} function getURLParameter(arg){	var URLParameters = setURLParameters();	var argValue = URLParameters[arg];	if(argValue==null){		return null;	} else {		return argValue;	} } function switchMenu(obj) {	var el = document.getElementById(obj);	if ( el.style.display != 'none' ) {	el.style.display = 'none';	}	else {	el.style.display = '';	}}//var off_color = '#d4d4d4';//var on_color = '#a4aab1';//var off_border = '1px solid #ffffff';//var on_border = '1px solid #a4aab1';//var off_font = '#000000';//var on_font = '#ffffff';function changeBG_link1(){document.getElementById('TreeBrowser').style.display = '';document.getElementById('TreeBrowser1').style.display = '';document.getElementById('TreeBrowser2').style.display = '';document.getElementById('SmartSearch').style.display = 'none';var my_li1 = document.getElementById("li1");var my_li2 = document.getElementById("li2");var my_link1 = document.getElementById("link1");var my_link2 = document.getElementById("link2");my_li1.className = 'tabon';my_li2.className = 'taboff';my_link1.className = 'linkon';my_link2.className = 'linkoff';//my_link1.style.borderBottom = on_border;//my_link2.style.borderBottom = off_border;//my_li1.style.backgroundColor = on_color;//my_li2.style.backgroundColor = off_color;//my_link1.style.color = on_font;//my_link2.style.color = off_font;}function changeBG_link2(){document.getElementById('SmartSearch').style.display = '';document.getElementById('TreeBrowser').style.display = 'none';document.getElementById('TreeBrowser1').style.display = 'none';document.getElementById('TreeBrowser2').style.display = 'none';var my_li1 = document.getElementById("li1");var my_li2 = document.getElementById("li2");var my_link1 = document.getElementById("link1");var my_link2 = document.getElementById("link2");my_li1.className = 'taboff';my_li2.className = 'tabon';my_link1.className = 'linkoff';my_link2.className = 'linkon';//my_li1.style.backgroundColor = off_color;//my_li2.style.backgroundColor = on_color;//my_link1.style.borderBottom = off_border;//my_link2.style.borderBottom = on_border;//my_link1.style.color = off_font;//my_link2.style.color = on_font;}function LoadTreeAsync(Tree, Lang, Type){	var path = window.location.pathname;	var host = window.location.hostname	var filePath = webLibraryPath	document.getElementById("TreeBrowser").innerHTML='<img src="http://' + host + filePath + '/im.ft.web.loading.gif" border=0 title=loading>&nbsp;Please wait .. tree is loading '		xmlHttpC=getXMLHTTP();	if(xmlHttpC){		var url = 'http://' + host + filePath + '/ag.BE.GetTree?OpenAgent&&'+new Date().valueOf() + '&&'+ Tree + '&&'+ Lang+'&&ASYNC'+ '&&' + Type;	xmlHttpC.open("POST", url, true);		xmlHttpC.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttpC.send(buildPOST2(document.forms[0]));		xmlHttpC.onreadystatechange = function() {	     		if (xmlHttpC.readyState == 4 && xmlHttpC.responseText ) {			//	document.write(xmlHttpC.responseText)				eval(xmlHttpC.responseText);			}				}	}}function LoadTreeAsync2(Tree, Lang, Type){	var path = window.location.pathname;	var host = window.location.hostname	var filePath = webLibraryPath	document.getElementById("TreeBrowser").innerHTML='<img src="http://' + host + filePath + '/im.ft.web.loading.gif" border=0 title=loading>&nbsp;Please wait .. tree is loading '		xmlHttpD=getXMLHTTP();	if(xmlHttpD){		var url = 'http://' + host + filePath + '/ag.BE.GetTree?OpenAgent&&'+new Date().valueOf() + '&&'+ Tree + '&&'+ Lang+'&&ASYNC'+ '&&' + Type;		xmlHttpD.open("POST", url, true);		xmlHttpD.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttpD.send(buildPOST2(document.forms[0]));		xmlHttpD.onreadystatechange = function() {	     		if (xmlHttpD.readyState == 4 && xmlHttpC.responseText ) {				eval(xmlHttpD.responseText);			}				}	}}function ClearList(){	document.getElementById("TreeResults").innerHTML=''	if(typeof parent.resizeIframe != "undefined"){		parent.resizeIframe("searchResult");    	}}function ShowNodeResults(thisDoc, LLIST, Lang, ProdDB, Category){	document.getElementById("TreeResults").innerHTML='<img src="im.ft.web.loading.gif" border=0 title=loading>&nbsp;'				xmlHttp3=getXMLHTTP();		if(xmlHttp3){		var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');				var url = 'http://' + host + filePath + '/ag.i7.TreeEntry.Functions?OpenAgent&&ShowNodeResults&&http://'+ host + filePath + '&&NOUNID&&'+ Lang+'&&'+ ProdDB+'&&'+ Category + '&&' +LLIST;		xmlHttp3.open("POST", url, true);		xmlHttp3.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp3.send(buildPOST2(thisDoc.forms[0]));		xmlHttp3.onreadystatechange = function() {	     		if (xmlHttp3.readyState == 4 && xmlHttp3.responseText ) {				if(xmlHttp3.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");				}else{				    	document.getElementById("TreeResults").innerHTML=xmlHttp3.responseText;					if(typeof parent.resizeIframe != "undefined"){						parent.resizeIframe("searchResult");    					} 					    	var st = new SortableTable(document.getElementById("SearchResultTable"), ['none', 'String', 'String', 'String', 'Number']);					st.onsort = function () {		 			var rows = st.tBody.rows;		 			var l = rows.length;		 			for (var i = 0; i < l; i++) {		 		 		removeClassName(rows[i], i % 2 ? "odd" : "even");		 		 		addClassName(rows[i], i % 2 ? "even" : "odd");		 			}					};					st.sort(1);				    					    					    										}						}				}	}}function ShowNodeResultsGroup(thisDoc, LLIST, Lang, ProdDB, Category){	document.getElementById("TreeResults").innerHTML='<img src="im.ft.web.loading.gif" border=0 title=loading>&nbsp;'				xmlHttp3=getXMLHTTP();		if(xmlHttp3){		var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');				var url = 'http://' + host + filePath + '/ag.i7.TreeEntry.Functions?OpenAgent&&ShowNodeResultsGroup&&http://'+ host + filePath + '&&NOUNID&&'+ Lang+'&&'+ ProdDB+'&&'+Category + '&&'+ LLIST;		xmlHttp3.open("POST", url, true);		xmlHttp3.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp3.send(buildPOST2(thisDoc.forms[0]));		xmlHttp3.onreadystatechange = function() {	     		if (xmlHttp3.readyState == 4 && xmlHttp3.responseText ) {				if(xmlHttp3.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");				}else{				    	document.getElementById("TreeResults").innerHTML=xmlHttp3.responseText;													    		if(typeof parent.resizeIframe != "undefined"){						parent.resizeIframe("searchResult");    					}									}						}				}	}}function RowDetails(thisDoc,UNID, Lang){	//if(document.getElementById('D'+UNID).innerHTML!='')return;	document.getElementById('D'+UNID).innerHTML="getting details ...please wait"	xmlHttp3=getXMLHTTP();	if(xmlHttp3){		var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');				var url = 'http://' + host + filePath + '/ag.i7.TreeEntry.Functions?OpenAgent&&RowDetails&&http://'+ host + filePath + '&&'  +UNID+'&&'+ Lang			xmlHttp3.open("POST", url, true);		xmlHttp3.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp3.send(buildPOST2(thisDoc.forms[0]));		xmlHttp3.onreadystatechange = function() {	     		if (xmlHttp3.readyState == 4 && xmlHttp3.responseText ) {				if(xmlHttp3.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");				}else{											//Effect.toggle('D'+UNID,'slide',{duration:'0.5'});							//alert(xmlHttp3.responseText);						    	document.getElementById('D'+UNID).innerHTML=unescape(xmlHttp3.responseText);						    	if(typeof parent.resizeIframe != "undefined"){								parent.resizeIframe("searchResult");    							}														    		//Effect.toggle('T'+UNID,'slide',{duration:'0.5'});				}						}				}	}}function BuildPromptPost(theForm, unid){var qs = ''	for (e=0;e<theForm.elements.length;e++) {		if(theForm.elements[e].name){			if (theForm.elements[e].type.toLowerCase() == 'text'||theForm.elements[e].type.toLowerCase() == 'textarea'||theForm.elements[e].type.toLowerCase() == 'hidden'||theForm.elements[e].type.toLowerCase() == 'radio') {								if (theForm.elements[e].name.indexOf(unid)>=1){										var name = theForm.elements[e].name.substring(0,theForm.elements[e].name.indexOf(unid));									qs+=(qs=='')?'':'&&';					qs+= name+'='+escape(theForm.elements[e].value);									}							}		}	}return qs}function _trim(str) {  if(str) {    str = str.replace(/^\s+/, "");    str = str.replace(/\s+$/, "");  }  return str;}function checkPrompt(thisform, msgFillOut, msgEMail) {var msgNumber  = "must be a number";var msgURL     = "must be a Internet-address (www)";var msgNoForm  = "Form does not exist!";var msgNoField = "Form field does not exist!";  var args = checkPrompt.arguments; // var f = args[0];  var msg = "";  var arr, field, title, type, minLength, elem, val, cnt, i, j;  var valid_url = /^(https?|ftp):\/\/([a-z0-9._-]+:[a-z0-9._-]+@)?[a-z0-9\u00C3\u00A4\u00C3\u00B6\u00C3\u00BC\u00C3\u201E\u00C3\u2013\u00C3\u0153#._\/~% -]+(\?([a-z0-9_-]+(=[a-zA-Z0-99\u00C3\u00A4\u00C3\u00B6\u00C3\u00BC\u00C3\u201E\u00C3\u2013\u00C3\u0153\u00C3\u0178+%?_-]+&?)?)*)?$/i;  var valid_mail = /^[a-z0-9._-]+@[a-z0-9\u00C3\u00A4\u00C3\u00B6\u00C3\u00BC\u00C3\u201E\u00C3\u2013\u00C3\u0153.-]+\.[a-z]{2,4}$/i;  if(thisform) {    for(i = 3; i < args.length; i++) {      arr = args[i].split(":");      field = _trim(arr[0]);      title = _trim(arr[1]);      if(!title) title = field;      type = _trim(arr[2]);      minLength = _trim(arr[3]);      elem = thisform.elements[field];	elem.style.backgroundColor="#FFFFFF"		      if(elem) {        val = _trim(elem.value);        if(val != "") {          if(type == "number") {            val = val.replace(",", ".");	          if(isNaN(val)){				msg += '"' + title + '" ' + msgNumber + "\n";							}          }          else if(type == "mail" && val.search(valid_mail) == -1){		 msg += '<LI>"' + title + '" ' + msgEMail + "\n";		elem.style.backgroundColor="#ffcccc"		}else if(type == "url" && val.search(valid_url) == -1) msg += '"' + title + '" ' + msgURL + "\n";        }        if(minLength) {          if(elem.length) {            if(elem.options) {              for(j = cnt = 0; j < elem.options.length; j++) {                if(elem.options[j].selected && elem.options[j].value != "") cnt++;              }            }            else for(j = cnt = 0; j < elem.length; j++) {              if(elem[j].checked) cnt++;            }          }          else if(elem.type == "checkbox") cnt = elem.checked ? 1 : 0;          else cnt = val.length;          if(cnt < minLength) {			msg +='<LI>'+ msgFillOut + ' "' + title + '"\n';			elem.style.backgroundColor="#ffcccc"		}	        }      }      else msg += msgNoField + ': "' + field + '"\n';    }    if(msg){    	    		return msg;	}else{		return '';	}  }  else alert(msgNoForm + ': "' + '"');}function DUCK(unid,thisform, DuckPath, misstext, wrongemail, lbl1, lbl2,lbl3,lbl4,lbl5) {			var Validation =checkPrompt(document.forms[0],misstext,wrongemail,'fldWebUserName'+unid+':'+lbl1+'::1','fldWebUserCompanyName'+unid+':'+lbl2+'::1','fldWebUserCity'+unid+':'+lbl3+'::1','fldWebUserPhone'+unid+':'+lbl4+'::1','fldWebUserEmail'+unid+':'+lbl5+':mail:1')	    						if(Validation==''){			document.getElementById("PromptValidationHolder"+ unid).style.display='none'	xmlHttp=getXMLHTTP();	if(xmlHttp){		var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');				document.getElementById("PromptDownloadButton"+ unid).innerHTML='<img src="im.FT.Web.loading.gif" border=0 title=loading>'					var url = DuckPath 					xmlHttp.open("POST", url, true);		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");			xmlHttp.send(BuildPromptPost(thisform, unid));		xmlHttp.onreadystatechange = function() {	     		if (xmlHttp.readyState == 4 && xmlHttp.responseText ) {				if(xmlHttp.responseText.indexOf("<title>Server")!=-1){				alert("You are not logged in. Please reload page");				}else{			//	alert(xmlHttp.responseText);					if(xmlHttp.responseText.indexOf("Success")!=-1){												document.getElementById("PromptDownload"+unid).style.display='none';						document.getElementById("PromptDownloadSuccess"+unid).style.display='';												//dofunc();					}else{						document.getElementById("PromptDownload"+ unid).innerHTML='Error sending mail'					}				}						}				}	}		}else{			document.getElementById("PromptValidationHolder"+ unid).style.display=''			document.getElementById("PromptDownloadValidation"+ unid).innerHTML=Validation			if(typeof parent.resizeIframe != "undefined"){					parent.resizeIframe("searchResult");    			}				}}function LoadDocument(thisform,Key, Lang, FromWhere, Brand){		if (FromWhere=='URL'){	document.getElementById("TreeResults").innerHTML='<img src="im.FT.Web.loading.gif" border=0 title=loading>'	}else{	document.getElementById("Document").innerHTML='<img src="im.FT.Web.loading.gif" border=0 title=loading>'	}		xmlHttp2=getXMLHTTP();	if(xmlHttp2){		var url = 'ag.BE.Document?OpenAgent&Key='+ Key+'&Lang=' + Lang + '&From=' + FromWhere+ '&Brand=' + Brand +'&'+new Date().valueOf();		xmlHttp2.open("POST", url, true);		xmlHttp2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp2.send(buildPOST2(thisform));		xmlHttp2.onreadystatechange = function() {	     		if (xmlHttp2.readyState == 4 && xmlHttp2.responseText ) {				if(xmlHttp2.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");				}else{					if (FromWhere=='URL'){					document.getElementById("TreeResults").innerHTML=xmlHttp2.responseText;																				}else{				    	document.getElementById("Document").innerHTML=xmlHttp2.responseText;																if(typeof parent.resizeIframe != "undefined"){								parent.resizeIframe("searchResult");						}					}										}						}				}	}}function LoadList(thisform,Key, Lang, Brand){	document.getElementById("TreeResults").innerHTML="Fetching Saved Searches ...please wait"				//var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");  	xmlHttp2=getXMLHTTP();	//'alert("Validtion begins");	if(xmlHttp2){			var url = 'ag.BE.List?OpenAgent&Key='+ Key+'&Lang=' + Lang +'&Brand=' + Brand +'&'+ new Date().valueOf();		xmlHttp2.open("POST", url, true);		xmlHttp2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp2.send(buildPOST2(thisform));		xmlHttp2.onreadystatechange = function() {	     		if (xmlHttp2.readyState == 4 && xmlHttp2.responseText ) {				if(xmlHttp2.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");				}else{			//alert(xmlHttp.responseText);				    	document.getElementById("TreeResults").innerHTML=xmlHttp2.responseText;					var stList = new SortableTable(document.getElementById("SearchResultTable"), ['Number','String', 'String']);					stList.onsort = function () {		 			var rows = stList.tBody.rows;		 			var l = rows.length;		 			for (var i = 0; i < l; i++) {		 		 		removeClassName(rows[i], i % 2 ? "odd" : "even");		 		 		addClassName(rows[i], i % 2 ? "even" : "odd");		 			}					};									stList.sort(1);											if(typeof parent.resizeIframe != "undefined"){							parent.resizeIframe("searchResult");    						}									}						}				}	}}function LoadBrandedList(thisform, Lang, Brand, Group){	document.getElementById("TreeResults").innerHTML="Fetching Saved Searches ...please wait"				//var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");  	xmlHttp2=getXMLHTTP();	//'alert("Validtion begins");	if(xmlHttp2){		var url = 'ag.BE.BrandedList?OpenAgent&Lang=' + Lang +'&Brand=' + Brand +'&Group='+Group+'&'+ new Date().valueOf();		xmlHttp2.open("POST", url, true);		xmlHttp2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp2.send(buildPOST2(thisform));		xmlHttp2.onreadystatechange = function() {	     		if (xmlHttp2.readyState == 4 && xmlHttp2.responseText ) {				if(xmlHttp2.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");				}else{			//alert(xmlHttp.responseText);				    	document.getElementById("TreeResults").innerHTML=xmlHttp2.responseText;					var stList = new SortableTable(document.getElementById("SearchResultTable"), ['Number','String', 'String']);					stList.onsort = function () {		 			var rows = stList.tBody.rows;		 			var l = rows.length;		 			for (var i = 0; i < l; i++) {		 		 		removeClassName(rows[i], i % 2 ? "odd" : "even");		 		 		addClassName(rows[i], i % 2 ? "even" : "odd");		 			}					};									stList.sort(1);											if(typeof parent.resizeIframe != "undefined"){							parent.resizeIframe("searchResult");    						}									}						}				}	}}function AjaxFreeSearch(thisform, Typ, Lang, Group){	document.getElementById("TreeResults").innerHTML='<img src="im.FT.Web.loading.gif" border=0 title=loading>&nbsp;&nbsp;Searching, please wait...'	xmlHttp=getXMLHTTP();	if(xmlHttp){		var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');				var url = 'http://' + host + filePath + '/ag.i7.Web.FreeSearch?OpenAgent&&'+ filePath + '&&'+Typ+ '&&'+ Lang + '&&'+ Group		xmlHttp.open("POST", url, true);		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp.send(buildPOST2(thisform));		xmlHttp.onreadystatechange = function() {	     		if (xmlHttp.readyState == 4 && xmlHttp.responseText ) {				if(xmlHttp.responseText.indexOf("<title>Server")!=-1){					alert("You are not logged in. Please reload page");				}else{				//alert(xmlHttp.responseText)				    	document.getElementById("TreeResults").innerHTML=xmlHttp.responseText;    									if(Group=='1'){					}else{						var st = new SortableTable(document.getElementById("SearchResultTable"), ['none', 'String', 'String', 'String', 'Number']);						st.onsort = function () {			 			var rows = st.tBody.rows;		 				var l = rows.length;		 				for (var i = 0; i < l; i++) {		 		 		removeClassName(rows[i], i % 2 ? "odd" : "even");		 		 		addClassName(rows[i], i % 2 ? "even" : "odd");		 				}						};						st.sort(1);					}    										if(typeof parent.resizeIframe != "undefined"){						parent.resizeIframe("searchResult");    					}    									}						}				}	}}function buildPOST2(theForm) {	var qs = ''	for (e=0;e<theForm.elements.length;e++) {		if(theForm.elements[e].name){			//if (theForm.elements[e].type.toLowerCase() == 'text'||theForm.elements[e].type.toLowerCase() == 'textarea'||theForm.elements[e].type.toLowerCase() == 'hidden'||theForm.elements[e].type.toLowerCase() == 'radio') {			if (theForm.elements[e].type.toLowerCase() == 'text'||theForm.elements[e].type.toLowerCase() == 'hidden'||theForm.elements[e].type.toLowerCase() == 'radio') {				if (theForm.elements[e].name.indexOf("fd")==0){					var name = theForm.elements[e].name;					qs+=(qs=='')?'':'&&';					qs+= name+'='+escape(theForm.elements[e].value);				}			}		}	}	for (e=0;e<theForm.elements.length;e++) {		if(theForm.elements[e].name){			if (theForm.elements[e].type.toLowerCase() == 'checkbox'){				if (theForm.elements[e].name.indexOf("fd")==0){					var name = theForm.elements[e].name;					qs+=(qs=='')?'':'&&';					if(theForm.elements[e].checked){						qs+= name+'=1';						}else{						qs+= name+'=0';						}				}				}		}	}	  var selects = theForm.getElementsByTagName('select'); 	 for( i = 0; i < selects.length; i++ ) 	{         var eSelect = selects[i];         if (eSelect.name.indexOf("fd")==0){  					var selectname = eSelect.name;					qs+=(qs=='')?'':'&&';					qs+= selectname+'='+escape(eSelect.options[eSelect.selectedIndex].value);       }    	}	return qs}function getXMLHTTP(){  var A = null;	try{	    A = new ActiveXObject("Msxml2.XMLHTTP");	  	}catch(e){	try{	      A = new ActiveXObject("Microsoft.XMLHTTP");    		} catch(oc){      A = null;    }  }  if(!A && typeof XMLHttpRequest != "undefined") {    A = new XMLHttpRequest();  }  return A;}function SubmitDocument(){document.forms[0].submit();}function AjaxValidate(thisform, dofunc) {	xmlHttp=getXMLHTTP();	if(xmlHttp){		var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');				if(document.getElementById("UPLOADING")){			document.getElementById("UPLOADING").innerHTML='<img src="im.FT.Web.loading.gif" border=0 title=loading>Uploading file....please wait'		}					if(dofunc== Notify){			var url = 'http://' + host + filePath + '/ag.i7.AjaxValidate?OpenAgent&clNotify';		}else{					var url = 'http://' + host + filePath + '/ag.i7.AjaxValidate?OpenAgent&' + thisform.fdDocumentClass.value;		}		xmlHttp.open("POST", url, true);		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp.send(buildPOST2(thisform));		xmlHttp.onreadystatechange = function() {	     		if (xmlHttp.readyState == 4 && xmlHttp.responseText ) {				if(xmlHttp.responseText.indexOf("<title>Server")!=-1){				alert("You are not logged in. Please reload page");				}else{					eval(xmlHttp.responseText);					if (isValidated == 'Yes'){dofunc()};									}						}				}	}}function AjaxValidateEXT(thisform, dofunc) {	xmlHttp=getXMLHTTP();	if(xmlHttp){				var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');		var url = 'http://' + host + filePath + '/ag.i7.AjaxValidate?OpenAgent&' + thisform.fdDocumentClass.value;		xmlHttp.open("POST", url, true);		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp.send(buildPOST2(thisform));		xmlHttp.onreadystatechange = function() {	     		if (xmlHttp.readyState == 4 && xmlHttp.responseText ) {				if(xmlHttp.responseText.indexOf("<title>Server")!=-1){				alert("You are not logged in. Please reload page");				}else{					eval(xmlHttp.responseText);					if (isValidated == 'Yes'){						dofunc()						//window.parent.myMask.hide()													}else{						//var diag=window.parent.Ext.getCmp('dialog-'+window.parent.document.forms[0].fdDocumentKey.value)						window.parent.myMask.hide()										}									}						}				}	}}function AjaxValidateProductFile(thisform, dofunc) {	xmlHttp=getXMLHTTP();	if(xmlHttp){		var path = window.location.pathname;		var host = document.forms[0].Server_Name.value		var filePath = document.forms[0].dpWebLibraryPath.value		var Message= new String("");		var isValidated = new String('No');		var url = 'http://' + host + filePath + '/ag.i7.AjaxValidate?OpenAgent&' + thisform.fdDocumentClass.value;		xmlHttp.open("POST", url, true);		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");		xmlHttp.send(buildPOST2(thisform));		xmlHttp.onreadystatechange = function() {	     		if (xmlHttp.readyState == 4 && xmlHttp.responseText ) {				if(xmlHttp.responseText.indexOf("<title>Server")!=-1){				alert("You are not logged in. Please reload page");				}else{					eval(xmlHttp.responseText);					if (isValidated == 'Yes'){						dofunc()						//window.parent.myMask.hide()													}else{						//var diag=window.parent.Ext.getCmp('dialog-'+window.parent.document.forms[0].fdDocumentKey.value)					     myMask.hide()										}									}						}				}	}}
