
function hideDhtml(){
    document.getElementById('broadcastbox2').style.display='none';
}

function deletePlatMap2(id){

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
          if(xmlHttp.responseText=="true"){
            alert("PlatMap Deleted!");
          }
          else{
            alert(xmlHttp.responseText);
          }


      }
    }
    xmlHttp.open("post","deletePlatMap.php",true);
					var parameters = "id="+encodeURI(id);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function showDetails(varID)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      document.getElementById(varID).innerHTML=xmlHttp.responseText;
      }
    }
    xmlHttp.open("post","showDetails.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);



  }

function showDetailsLess(varID)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      document.getElementById(varID).innerHTML=xmlHttp.responseText;
      }
    }
    xmlHttp.open("post","showDetailsLess.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

  }

function sortProperty()
{

document.getElementById('listing').innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class=\"listings-row-white\"><br /><h2>Loading Properties....please wait.</h2><br /></td></tr></table>';
var x = document.getElementById('select');
var y = document.getElementById('select2');
var select = x.value;
var select2 = y.value;
var selectText = x.options[x.selectedIndex].text;
var select2Text = y.options[y.selectedIndex].text;

varID=document.getElementById('listing');

var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      varID.innerHTML=xmlHttp.responseText;
      document.getElementById('titlebar-content').innerHTML='Sort result by:<select name="select" id="select" onchange="sortProperty()">              <option value="'+select+'">'+selectText+'</option>    <option value="subdivision_idsubdivision">Subdivision</option>                    <option value="wholesale_price*markup">Price</option>                    <option value="idproperty">Property Id</option>                    <option value="city_idcity">City</option>                    <option value="county_idcounty">County</option>                    <option value="size">Size</option>                    <option value="sale_status_idsale_status">Status</option>                                      </select>                  <select name="select2" id="select2" onchange="sortProperty()">            <option value="'+select2+'">'+select2Text+'</option>        <option value="ASC">Ascending</option>                    <option value="DESC">Decending</option>                  </select>';
      sortProperty2();
      }
    }
  xmlHttp.open("post","showListings.php",true);
        var parameters = "field="+encodeURI(select)+"&&"+"order="+encodeURI(select2);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);
}

function sortProperty2()
{

//document.getElementById('listing').innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class=\"listings-row-white\"><br /><h2>Loading Properties....please wait.</h2><br /></td></tr></table>';
var select = document.getElementById('select').value;
var select2 = document.getElementById('select2').value;
varID=document.getElementById('listing');

var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      var divit=document.createElement("div");
      divit.id="listingChild";
      divit.innerHTML=xmlHttp.responseText;
      varID.appendChild(divit);
      }

  }
  xmlHttp.open("post","showListings.php",true);
        var startIT="10";
        var parameters = "field="+encodeURI(select)+"&&"+"order="+encodeURI(select2)+"&&"+"start="+encodeURI(startIT);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

}

function sortBookmarkProperty()
{

document.getElementById('listing').innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class=\"listings-row-white\"><br /><h2>Loading Properties....please wait.</h2><br /></td></tr></table>';
var x = document.getElementById('select');
var y = document.getElementById('select2');
var select = x.value;
var select2 = y.value;
var selectText = x.options[x.selectedIndex].text;
var select2Text = y.options[y.selectedIndex].text;
varID=document.getElementById('listing');

var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      //document.getElementById('select').setAttribute('onchange', 'sortBookmarkProperty()');
      //document.getElementById('select2').onchange="sortBookmarkProperty()";
      document.getElementById('titlebar-content').innerHTML="";
      document.getElementById('titlebar-content').innerHTML='Sort result by:<select name="select" id="select" onchange="sortProperty()">              <option value="'+select+'">'+selectText+'</option>    <option value="subdivision_idsubdivision">Subdivision</option>                    <option value="wholesale_price*markup">Price</option>                    <option value="idproperty">Property Id</option>                    <option value="city_idcity">City</option>                    <option value="county_idcounty">County</option>                    <option value="size">Size</option>                    <option value="sale_status_idsale_status">Status</option>                                      </select>                  <select name="select2" id="select2" onchange="sortProperty()">            <option value="'+select2+'">'+select2Text+'</option>        <option value="ASC">Ascending</option>                    <option value="DESC">Decending</option>                  </select>';
      varID.innerHTML=xmlHttp.responseText;
    }
  }
  xmlHttp.open("post","showBookmarkListings.php",true);
        var parameters = "field="+encodeURI(select)+"&&"+"order="+encodeURI(select2);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

}

function sortResellerProperty()
{
varID=document.getElementById('listing');
varID.innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class=\"listings-row-white\"><br /><h2>Loading Properties....please wait.</h2><br /></td></tr></table>';
var select = document.getElementById('select').value;
var select2 = document.getElementById('select2').value;

var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      //document.getElementById('titlebar-content').innerHTML="";
      document.getElementById('titlebar-content').innerHTML='Sort result by:<select name="select" id="select" onchange="sortResellerPropertyBK()">  <option value="wholesale_price*markup">Price</option>    <option value="subdivision_idsubdivision">Subdivision</option>                                        <option value="idproperty">Property Id</option>                    <option value="city_idcity">City</option>                    <option value="county_idcounty">County</option>                    <option value="size">Size</option>                    <option value="sale_status_idsale_status">Status</option>                                      </select>                  <select name="select2" id="select2" onchange="sortResellerPropertyBK()">                    <option value="ASC">Ascending</option>                    <option value="DESC">Decending</option>                  </select>';
      varID.innerHTML=xmlHttp.responseText;
      //alert('init()');
      sortResellerProperty2();
    }
  }
  xmlHttp.open("post","showResellerListings.php",true);
        var parameters = "field="+encodeURI(select)+"&&"+"order="+encodeURI(select2);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

}

function sortResellerProperty2()
{

var select = document.getElementById('select').value;
var select2 = document.getElementById('select2').value;
varID=document.getElementById('listing');

var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      var divit=document.createElement("div");
      divit.id="listingChild";
      divit.innerHTML=xmlHttp.responseText;
      varID.appendChild(divit);
    }
  }
  xmlHttp.open("post","showResellerListings.php",true);
        var startIT="10";
        var parameters = "field="+encodeURI(select)+"&&"+"order="+encodeURI(select2)+"&&"+"start="+encodeURI(startIT);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

}

function sortResellerPropertyBK()
{
document.getElementById('listing').innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td class=\"listings-row-white\"><br /><h2>Loading Properties....please wait.</h2><br /></td></tr></table>';
var select = document.getElementById('select').value;
var select2 = document.getElementById('select2').value;
varID=document.getElementById('listing');

var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      varID.innerHTML=xmlHttp.responseText;
      sortResellerPropertyBK2();
    }
  }
  xmlHttp.open("post","showResellerListingsBK.php",true);
        var parameters = "field="+encodeURI(select)+"&&"+"order="+encodeURI(select2);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

}

function sortResellerPropertyBK2()
{

var select = document.getElementById('select').value;
var select2 = document.getElementById('select2').value;
varID=document.getElementById('listing');

var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function(){
    if(xmlHttp.readyState==4){
      var divit=document.createElement("div");
      divit.id="listingChild";
      divit.innerHTML=xmlHttp.responseText;
      varID.appendChild(divit);
    }
  }
  xmlHttp.open("post","showResellerListingsBK.php",true);
        var startIT="10";
        var parameters = "field="+encodeURI(select)+"&&"+"order="+encodeURI(select2)+"&&"+"start="+encodeURI(startIT);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

}


function loadCityInfo(){

  city=document.getElementById("city_idcity").value;
  if(cityInfo=document.getElementById("cityDesc")){
    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState==4){
          cityInfo.value=xmlHttp.responseText;
        }
      }
      xmlHttp.open("post","showCityInfo.php",true);
            var parameters = "city="+encodeURI(city);
            xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xmlHttp.setRequestHeader("Content-length", parameters.length);
            xmlHttp.setRequestHeader("Connection", "close");
            xmlHttp.send(parameters);
  }
}

function loadSubdivisionInfo(){

  subdivision=document.getElementById("subdivision_idsubdivision").value;
  if(subdivisionInfo=document.getElementById("subdivisionDesc")){
    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState==4){
          subdivisionInfo.value=xmlHttp.responseText;
        }
      }
      xmlHttp.open("post","showSubdivisionInfo.php",true);
            var parameters = "subdivision="+encodeURI(subdivision);
            xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xmlHttp.setRequestHeader("Content-length", parameters.length);
            xmlHttp.setRequestHeader("Connection", "close");
            xmlHttp.send(parameters);
  }
}
function loadIframe(varID){
   dhtmlwindow.open("broadcastbox2", "iframe", varID, "Subscribe", "width=775px,height=480px,left=150px,top=145px,resize=1,scrolling=0", "recal")
        

}

function toggle_visibility(id,id2,id3) {
    //alert(id+id2+id3);
   var e = document.getElementById(id);
   if(e.style.display == 'inline')
      e.style.display = 'none';
   else
      e.style.display = 'inline';

   if(id3==0){
       document.getElementById(id2).innerHTML='<a href="#" onclick="toggle_visibility(\'loginDan\',\'adminLink\',1);return false;">Hide Login</a>';
   }
   else{
       document.getElementById(id2).innerHTML='<a href="#" onclick="toggle_visibility(\'loginDan\',\'adminLink\',0);return false;"><img src="blank.gif" alt="" border="0" /></a>';
   }
}


function loadSlideshow2(varID){

    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState==4){
          //showitFull('slideShowDiv');
          //document.getElementById('slideShowDiv').innerHTML=xmlHttp.responseText;
          //showdeadcenterdiv(644,480,'slideShowDiv');
          dhtmlwindow.open("broadcastbox2", "inline", xmlHttp.responseText, "Property : "+varID+"    Photo Slideshow", "width=644px,height=480px,left=150px,top=145px,resize=1,scrolling=0", "recal")
        }
      }
      xmlHttp.open("post","showSlideshowDiv.php",true);
            var parameters = "id="+encodeURI(varID);
            xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
            xmlHttp.setRequestHeader("Content-length", parameters.length);
            xmlHttp.setRequestHeader("Connection", "close");
            xmlHttp.send(parameters);

}



function loadSlideshow(varID){
x = document.getElementsByName('slideshowGroup');
  var x=document.getElementsByTagName("span");
  for(i=0; i<x.length; i++){
     y="Slideshow";
     //alert(x[i].id+" - "+y);
     if( x[i].id.indexOf(y,0)>=0){
         x[i].innerHTML= " ";
     }
  }

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      document.getElementById(varID).innerHTML=xmlHttp.responseText;
      }
    }
    xmlHttp.open("post","showSlideshow.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function loadPlatMap(varID){
x = document.getElementsByName('slideshowGroup');
  var x=document.getElementsByTagName("span");
  for(i=0; i<x.length; i++){
     y="Slideshow";
     //alert(x[i].id+" - "+y);
     if( x[i].id.indexOf(y,0)>=0){
         x[i].innerHTML= " ";
     }
  }

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      //document.getElementById(varID).innerHTML=xmlHttp.responseText;
      dhtmlwindow.open("broadcastbox2", "inline", xmlHttp.responseText, "Property : "+varID.replace(/Slideshow/,"")+"   Plat Map View", "width=640px,height=480px,left=150px,top=145px,resize=1,scrolling=0", "recal")
      }
    }
    xmlHttp.open("post","showPlatMap.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function loadAudioClip(varID){
x = document.getElementsByName('slideshowGroup');
  var x=document.getElementsByTagName("span");
  for(i=0; i<x.length; i++){
     y="Slideshow";
     //alert(x[i].id+" - "+y);
     if( x[i].id.indexOf(y,0)>=0){
         x[i].innerHTML= " ";
     }
  }

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      document.getElementById(varID).innerHTML=xmlHttp.responseText;
      }
    }
    xmlHttp.open("post","showAudioClip.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}


function loadVideoClip(varID){
x = document.getElementsByName('slideshowGroup');
  var x=document.getElementsByTagName("span");
  for(i=0; i<x.length; i++){
     y="Slideshow";
     //alert(x[i].id+" - "+y);
     if( x[i].id.indexOf(y,0)>=0){
         x[i].innerHTML= " ";
     }
  }

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      //document.getElementById(varID).innerHTML=xmlHttp.responseText;
      dhtmlwindow.open("broadcastbox2", "inline", xmlHttp.responseText, "Property Id: "+varID.replace(/Slideshow/,"")+"   Video Clip", "width=700px,height=500px,left=150px,top=145px,resize=1,scrolling=1", "recal")
      }
    }
    xmlHttp.open("post","showVideoClip.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}


function loadGoogle(varID){
x = document.getElementsByName('slideshowGroup');
  var x=document.getElementsByTagName("span");
  for(i=0; i<x.length; i++){
     y="Slideshow";
     //alert(x[i].id+" - "+y);
     if( x[i].id.indexOf(y,0)>=0){
         x[i].innerHTML= " ";
     }
  }

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4){
      var lat= getLat(varID);
      var lng= getLng(varID);
      //alert(getLat(varID)+" "+getLng(varID));
      //document.getElementById(varID).innerHTML=xmlHttp.responseText;
      dhtmlwindow.open("broadcastbox2", "inline", xmlHttp.responseText, "Property : "+varID.replace(/Slideshow/,"")+"   Interactive Aerial Map & Street View", "width=750px,height=700px,left=150px,top=145px,resize=1,scrolling=1", "recal")
      //initialize(latGlobal,lngGlobal);
      //GUnload();
      }
    }
    xmlHttp.open("post","showGoogleMapIframe.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function getLng(varID){

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      lngGlobal = parseFloat(xmlHttp.responseText);
      //alert("lng=#"+lngGlobal+"#");
      return parseFloat(xmlHttp.responseText);
      }
    }
    xmlHttp.open("post","getGoogleMapLng.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function getLat(varID){

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      //alert("lat="+xmlHttp.responseText);
      latGlobal = parseFloat(xmlHttp.responseText);
      return parseFloat(xmlHttp.responseText);
      }
    }
    xmlHttp.open("post","getGoogleMapLat.php",true);
					var parameters = "id="+encodeURI(varID);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function checkDupEmail(email){

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      if(xmlHttp.responseText=="true"){
        alert("Email already exists!\nPlease choose another");
      }


      }
    }
    xmlHttp.open("post","checkDupEmail.php",true);
					var parameters = "email="+encodeURI(email);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}



function drawMap(id) {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById(id));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);//change values to longitude and latitude
    //add Marker
      var latlng = new GLatLng(37.4419, -122.1419);
      map.addOverlay(new GMarker(latlng));
    //add controls
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
  }
}


function closeSlideshow(varID){

      document.getElementById(varID).innerHTML=" ";

}

function validate_login(form)
{

 thisform=document.getElementById(form);
  with (thisform){
    if (validate_required(email,"Email must be completed!")==false){
      email.focus();return false;
    }
    else checkLogin(form);
  }
}

function validate_sendEmail(form)
{
 thisform=document.getElementById(form);
  with (thisform){
    if (validate_required(rEmail,"Email must be completed!")==false){
      rEmail.focus();return false;
    }
    else {
        rEmail.focus();
        return validateemail(rEmail.value);
    }
  }
}

function validate_customer(form)
{
 thisform=document.getElementById(form);
  with (thisform){
      //alert(email_address.value);
    if (validate_required(email_address,"Email must be completed!")===false){
      email_address.focus();return false;
    }
    else {
        return true;
    }

  }
}
/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

function validateemail(str) {
    //alert(str);
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail")
		    return false
		 }

		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail")
		    return false
		 }

 		 return true
	}


function ValidateForm(){
	var emailID=document.frmSample.txtEmail

	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
	return true
 }

function validate_register(form)
{
  thisform=document.getElementById(form);
  with (thisform){
    if (validate_required(username,"Email must be completed!")==false){
      username.focus();
      return false;
    }
    else if(validateemail(username.value)==false){
      username.focus();
      return false;
    }
    else{
      register(thisform);
    }
  }
}

function checkLogin(form){

 thisform=document.getElementById(form);
//CHECK LOGIN
  with(thisform){
    var xmlHttp;
     var varID = email;
     var passID = password3;
     var mktId = idmarketing_partner;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function(){
          if(xmlHttp.readyState==4){
            //alert(fname+" - "+lname) ;
            loginResponse(xmlHttp.responseText);
            //alert(xmlHttp.responseText);
          }
        }
        xmlHttp.open("post","checklogin.php",true);
        var parameters = "username="+encodeURI(varID.value)+"&&password="+encodeURI(passID.value)+"&&mktId="+encodeURI(idmarketing_partner.value);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

  }
}

function register(form){

//register
  
  with(form){
    var xmlHttp;
     varID = username;
     passID = password;
     mktrID = idmarketing_partner;
     fname = firstnamer;
     lname = lastnamer;
     signup = method;
     phonenum = phone;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function(){
          if(xmlHttp.readyState==4){
            registerResponse(xmlHttp.responseText);
          }
        }
        xmlHttp.open("post","register.php",true);
        var parameters = "username="+encodeURI(varID.value)+"&&password="+encodeURI(passID.value)+"&&idmarketer="+encodeURI(mktrID.value)+"&&firstname="+encodeURI(fname.value)+"&&lastname="+encodeURI(lname.value)+"&&method="+encodeURI(signup.value)+"&&phone="+encodeURI(phonenum.value);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);

  }
}

function registerResponse(text){
//alert("o"+text+"o");
//loginbutton=document.getElementById('loginButton');
var varID = document.getElementById('username');
var passID = document.getElementById('password');
  if(text=="true"){
    hideit('register');
    document.getElementById('email').value=varID.value;
    document.getElementById('password3').value=passID.value;
    focusOn('email');

    //document.getElementById('loginButton').innerHTML="Logout";
    //document.getElementById('loginButton').setAttribute((document.all ? "loginButton" : "onClick"), "logout()");
    //loginbutton.setAttribute('onClick', 'logout();');//showdeadcenterdiv(250,150,'login')
    //document.getElementById('loginButton').onClick='logout()';
    //document.getElementById('testData').innerHTML="foo";
    alert("Registration Successsful!\nPlease test your new login now. ");
    //alert("val - "+loginButton.getAttribute("onClick"));
    return true;
  }
  else{
    alert(text);
    //document.getElementById('testData').innerHTML="foo";
    //alert("val - "+loginButton.getAttribute("onClick"));
    return false;

  }

}

function loginResponse(text){
//alert("o"+text+"o");
//loginbutton=document.getElementById('loginButton');
varID = document.getElementById('email');
passID = document.getElementById('password');
  if(text=="true"){
    //hideit('login');
    //document.getElementById('testData').innerHTML="Welcome";

    //document.getElementById('loginButton').innerHTML="Logout";
    //loginbutton.setAttribute((document.all ? "loginButton" : "onClick"), "logout()");
    //loginbutton.setAttribute('onClick', 'logout();');//showdeadcenterdiv(250,150,'login')
    //document.getElementById('loginButton').onClick='logout()';
    //<span name="loginButton" id="loginButton" style="cursor: pointer;" onmouseover="underline(this)" onmouseout="nounderline(this)" onClick="showdeadcenterdiv(250,150,'login')">Login</span>
    //alert("Login Successsful!");
    history.go();
    return true;
  }
  else{
    //alert('Login Failed: \n\nEmail: '+varID.value+' \n\nPassword: '+passID.value+'\n\n Please verify your email and password and try again.');
    alert(text);
    varID.focus();
    return false;
  }
}

function logout(){
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      //document.getElementById('loginStatus').innerHTML=xmlHttp.responseText;
      //sortProperty();
      //alert(xmlHttp.responseText);
      var thedomain = xmlHttp.responseText;
      thedomain = "http://"+xmlHttp.responseText;
      //document.location.href= thedomain;
      history.go();
      }
    }
    xmlHttp.open("post","logout.php",true);
					var parameters = "msg=Logout Successful!";
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function killDomain(){
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      if("ok"==xmlHttp.responseText){
          alert('Domain has been Reset!');
      }
      else{
          alert('Domain reset failed!');
      }

      }
    }
    xmlHttp.open("post","killDomain.php",true);
					var parameters = "msg=Domain has been Reset!";
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function validateID(id){
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      //alert('testing id');
      if("exists"==xmlHttp.responseText){
        alert("Property Id already Exists! Please try another.");
        document.getElementById('idproperty').value="";
        document.getElementById('idproperty').focus();
      }

      }
    }
    xmlHttp.open("post","validateID.php",true);
					var parameters = "id="+encodeURI(id.value);
					xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length", parameters.length);
					xmlHttp.setRequestHeader("Connection", "close");
					xmlHttp.send(parameters);

}

function submitIt(id){
    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function()
        {
        if(xmlHttp.readyState==4)
          {
          //document.getElementById('bookmark1002').innerHTML=xmlHttp.responseText;
           //alert(xmlHttp.responseText);

          }
        }
        xmlHttp.open("post","bookmark_handler.php",true);
                        var parameters = "code="+encodeURI(id);
                        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                        xmlHttp.setRequestHeader("Content-length", parameters.length);
                        xmlHttp.setRequestHeader("Connection", "close");
                        xmlHttp.send(parameters);

}

function showall(id){
    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function()
        {
        if(xmlHttp.readyState==4)
          {
            //alert(xmlHttp.responseText);
            sortProperty();
          }
        }
        xmlHttp.open("post","showall.php",true);
        var parameters = "id="+encodeURI(id);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);
}

function showcpl(){

    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState==4){
          dhtmlwindow.open('broadcastbox2', 'inline', xmlHttp.responseText, 'Control', 'width=210px,height=280px,left=150px,top=145px,resize=1,scrolling=0', 'recal');
        }
      }
      xmlHttp.open("post","cpl.php",true);
        var parameters = "cpl="+encodeURI('1');
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);
}

function emailProperty(formId,propertyId,domain){
    var xmlHttp;
    var text;
    var thisform=document.getElementById(formId);
  with (thisform){
     var vrEmail = rEmail;
    var vsEmail = sEmail;
    var vmessage = message;
    var vsubject = subject;
  }

    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function()
        {
        if(xmlHttp.readyState==4)
          {
          //document.getElementById('alert').innerHTML=xmlHttp.responseText;
           //alert(xmlHttp.responseText);
           //alert("sEmail="+vsEmail.value+"&&rEmail="+vrEmail.value+"&&subject="+vsubject.value+"&&message="+vmessage.value+"&&domain="+domain+"&&property_idproperty="+propertyId);
           ;
           alert("Property was sent to "+vrEmail.value);
          }
        }
        xmlHttp.open("post","email_property.php",true);
                        var parameters = "sEmail="+encodeURI(vsEmail.value)+"&&rEmail="+encodeURI(vrEmail.value)+"&&subject="+encodeURI(vsubject.value)+"&&message="+encodeURI(vmessage.value)+"&&domain="+encodeURI(domain)+"&&property_idproperty="+encodeURI(propertyId);
                        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                        xmlHttp.setRequestHeader("Content-length", parameters.length);
                        xmlHttp.setRequestHeader("Connection", "close");
                        xmlHttp.send(parameters);

}

/**
 * Comment
 */
function resetprop(id) {
    var xmlHttp;
    try
      {
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
      }
    catch (e)
      {
      // Internet Explorer
      try
        {
        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
      catch (e)
        {
        try
          {
          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
          }
        catch (e)
          {
          alert("Your browser does not support AJAX!");
          return false;
          }
        }
      }
      xmlHttp.onreadystatechange=function(){
        if(xmlHttp.readyState==4){
          if(xmlHttp.responseText=="true"){
              alert("Properties reset successful!\nProperties will now show in default order.")
          }
        }
      }
      xmlHttp.open("post","resetprop.php",true);
        var parameters = "id="+encodeURI(id);
        xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp.setRequestHeader("Content-length", parameters.length);
        xmlHttp.setRequestHeader("Connection", "close");
        xmlHttp.send(parameters);
}
