var xmlhttp
var c=0
var t
function submitLandingpage(Location)
{xmlhttp=null
if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}
else if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}
if(xmlhttp!=null){url="/setLandingPage?page_requested="+Location;xmlhttp.onreadystatechange=getResponseAction;xmlhttp.open("GET",url,true);xmlhttp.send(null);}
else{alert("Your browser does not support XMLHTTP.")}}
function verifyReadyState(obj){if(obj.readyState==4){if(obj.status==200){return true}
else{alert("Problem retrieving XML data")}}}
function getResponseAction(){if(verifyReadyState(xmlhttp)==true){}}
function getIntendedUseList(PropertyId)
{xmlhttp=null
if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest()}
else if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}
if(xmlhttp!=null){url="/IntendedUseWishListItems?MasterId="+PropertyId;xmlhttp.onreadystatechange=showResponse(xmlhttp);xmlhttp.open("GET",url,true);xmlhttp.send(null);}
else{alert("Your browser does not support XMLHTTP.")}}
function populateComboItems(){if(verifyReadyState(xmlhttp)==true){}}
function showResponse(originalRequest)
{var list=document.requestform.selectIntendedSubUseList;alert(' Getting the XML');alert(' Got the Response'+originalRequest.responseText);var items=originalRequest.responseText.getElementsByTagName('ListValueBean');alert(items);clearList(list);if(items.length>0)
{for(var i=0;i<items.length;i++)
{var node=items[i];var value="";var label="";if(node.getElementsByTagName("label")[0].firstChild.nodeValue){value=node.getElementsByTagName("label")[0].firstChild.nodeValue;label=node.getElementsByTagName("value")[0].firstChild.nodeValue;}
addElementToList(list,value,label);}}
else
{addElementToList(list,"","-- Select is Empty --");}}
function clearList(list)
{while(list.length>0)
{list.remove(0);}}
function addElementToList(list,value,label)
{var option=document.createElement("option");option.value=value;var labelNode=document.createTextNode(label);option.appendChild(labelNode);list.appendChild(option);}
