function launchApp()
{
var webapp = window.open("about:blank","webapp","width=800,height=580,status=no,directories=no,toolbar=no,scrollbars=yes,resizeable=no");
document.getElementById('rentapp').submit();
webapp.focus();
}
function sendemail(thisPerson)
{
window.open('mailto:'+thisPerson+'@walnutridgearlington.com');
}
function launchMap(which)
{
map = window.open("http://www.dynamicone.cc/include/googlemaps/WalnutRidge.php","map","width=770,height=480screenX=60,screenY=60,menubar=no,scrollbars=no,status=0,titlebar=yes,toolbar=0");
map.focus();
}
function showGroup(thisElement)
{
if (document.getElementById('a'+thisElement).style.display == 'block')
document.getElementById('a'+thisElement).style.display = 'none';
else
{
if (document.getElementById('a'+thisElement).style.border == '')
document.getElementById('a'+thisElement).innerHTML = document.getElementById('a'+thisElement).innerHTML + '
Close Lisings<'+'/a><'+'/div>';
document.getElementById('a'+thisElement).style.display = 'block';
document.getElementById('a'+thisElement).style.border = '1px solid #fff';
}
}
function View360(name)
{
if (name != 0) w360 = window.open("ViewFloorplan.html?name=" + name,"_blank","width=760,height=700,status=no,directories=no,toolbar=no,resizeable=no,scrollbars=auto");
else w360 = window.open("ViewFloorplan.html","_blank","width=760,height=700,status=no,directories=no,toolbar=no,scrollbars=auto,resizeable=no");
w360.focus;
}
function ViewSS(name)
{
if (name != 0) w360 = window.open("ViewGallery.html?name=" + name,"_blank","width=840,height=700,status=no,directories=no,toolbar=no,resizeable=no,scrollbars=auto");
else w360 = window.open("ViewGallery.html","_blank","width=760,height=700,status=no,directories=no,toolbar=no,scrollbars=auto,resizeable=no");
w360.focus;
}
function tellFriend(id)
{
if (id != "")
window.open("/include/_tellafriend.php?id="+id+"&criteria=body","_blank","width=759,height=640,menubar=no,resizable=no,scrollbars=yes,status=0");
else
window.open("/include/_tellafriend.php?type=ecard","_blank","width=759,height=640,menubar=no,resizable=no,scrollbars=yes,status=0");
}
function printThis(filename)
{ window.open("/include/_mediawindow.php?printnow=1&buttons=1&value="+filename+"&criteria=filename","_blank","width=759,height=480,menubar=no,resizable=no,scrollbars=yes,status=0"); }
function xmlhttpPost(outputTo,strURL,params)
{
if (document.getElementById(outputTo).innerHTML != '' && params=='')
document.getElementById(outputTo).innerHTML = '';
else
{
document.getElementById(outputTo).innerHTML = 'Loading...';
var xmlHttpReq = false;
var self = this;
if (window.XMLHttpRequest) // Mozilla/Safari
self.xmlHttpReq = new XMLHttpRequest();
else if (window.ActiveXObject) // IE
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
self.xmlHttpReq.open('POST', strURL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function()
{
if (self.xmlHttpReq.readyState == 4)
updatePage(outputTo, self.xmlHttpReq.responseText);
}
self.xmlHttpReq.send('activeDiv=' + outputTo + '&' + params);
}
}
function updatePage(outputTo,value)
{
document.getElementById(outputTo).innerHTML = value;
}
function ajaxSubmit(fobj,submitTo,outputTo)
{
var getstr = '';
for (i=0; i < fobj.elements.length; i++)
{
var el = fobj.elements[i];
switch(el.type)
{
case "textarea":
case "hidden":
case "text":
case "password":
getstr += encodeURIComponent(el.name) + "=" + encodeURIComponent(el.value) + "&";
break;
case "select-one":
getstr += encodeURIComponent(el.name) + "=" + encodeURIComponent(el.options[el.selectedIndex].value) + "&";
break;
case "select-multiple":
var selLen = el.options.length;
for (var j=0; j < selLen; j++)
if (el.options[j].selected)
getstr += encodeURIComponent(el.name+"[]") + "=" + encodeURIComponent(el.options[j].value) + "&";
break;
case "checkbox":
case "radio":
if(el.checked)
getstr += encodeURIComponent(el.name) + "=" + encodeURIComponent(el.value) + "&";
break;
}
}
xmlhttpPost(outputTo,submitTo,getstr);
}