// JavaScript Document

Window = {	
	//Returns an integer representing the width of the browser window (without the scrollbar).
	getWindowWidth : function() {
	return (document.layers||(document.getElementById&&!document.all)) ? window.outerWidth : (document.all ? document.body.clientWidth : 0);
	},
	
	//Returns an integer representing the height of the browser window (without the scrollbar).
	getWindowHeight : function() {	
	return window.innerHeight ? window.innerHeight :(document.getBoxObjectFor ? Math.min(document.documentElement.clientHeight, document.body.clientHeight) : ((document.documentElement.clientHeight != 0) ? document.documentElement.clientHeight : (document.body ? document.body.clientHeight : 0)));
	},	
	
	//Returns an integer representing the scrollWidth of the window. 
	getScrollWidth : function() {
	return document.all ? Math.max(Math.max(document.documentElement.offsetWidth, document.documentElement.scrollWidth), document.body.scrollWidth) : (document.body ? document.body.scrollWidth : ((document.documentElement.scrollWidth != 0) ? document.documentElement.scrollWidth : 0));
	},
	
	//Returns an integer representing the scrollHeight of the window. 
	getScrollHeight : function(){		
		return document.all ? Math.max(Math.max(document.documentElement.offsetHeight, document.documentElement.scrollHeight), Math.max(document.body.offsetHeight, document.body.scrollHeight)) : (document.body ? document.body.scrollHeight : ((document.documentElement.scrollHeight != 0) ? document.documentElement.scrollHeight : 0));
	},			
	
	//Returns an integer representing the scrollLeft of the window (the number of pixels the window has scrolled from the left).
	getScrollLeft : function() {
		return document.all ? (!document.documentElement.scrollLeft ? document.body.scrollLeft : document.documentElement.scrollLeft) : ((window.pageXOffset != 0) ? window.pageXOffset : 0);
	},
	
	//Returns an integer representing the scrollTop of the window (the number of pixels the window has scrolled from the top).
	getScrollTop : function() {
		return document.all ? (!document.documentElement.scrollTop ? document.body.scrollTop : document.documentElement.scrollTop) : ((window.pageYOffset != 0) ? window.pageYOffset : 0);
	}
}

function getWindowHeight() {
    var windowHeight = 0;
    if (typeof(window.innerHeight) == 'number') {
        windowHeight = window.innerHeight;
    } else {
        if (document.documentElement && document.documentElement.clientHeight) {
            windowHeight = document.documentElement.clientHeight;
        } else {
	if (document.body && document.body.clientHeight) {
	    windowHeight = document.body.clientHeight;
	}
         }
    }
    return windowHeight;
}



function hideAllSelects() {

	var selectElements = document.getElementsByTagName('select');
	for (var i=0; i < selectElements.length; i++) {
		selectElements[i].style.visibility = 'hidden';	
	}

}

function showAllSelects() {
	var selectElements = document.getElementsByTagName('select');
	for (var i=0; i < selectElements.length; i++) {
		selectElements[i].style.visibility = 'visible';
	}
}

function hide_selects()
{
    document.getElementById('quick_price_min').style.display='none';
    document.getElementById('quick_price_max').style.display='none';
}

function show_selects()
{
    document.getElementById('quick_price_min').style.display='';
    document.getElementById('quick_price_max').style.display='';
}


function hideBox(){
    $('box_cont').hide();
    $('box2_cont').hide();
	$('overlay').hide();
    showAllSelects();
    showFlash();
	unHideCustomScrollbars();
    return false;
}

function hidePromoBox(){
    $('box_cont').hide();
    $('box2_cont').hide();
	$('overlay_promo').hide();
    showAllSelects();
    showFlash();
	unHideCustomScrollbars();
    return false;
}

function center(element){
    if (element == 'box') 
        hideAllSelects();	
    try{
        element = $(element);
    }catch(e){
        return;
    }

    var my_width  = 0;
    var my_height = 0;

    if ( typeof( window.innerWidth ) == 'number' ){
        my_width  = window.innerWidth;
        my_height = window.innerHeight;
    }else if ( document.documentElement && 
             ( document.documentElement.clientWidth ||
               document.documentElement.clientHeight ) ){
        my_width  = document.documentElement.clientWidth;
        my_height = document.documentElement.clientHeight;
    }
    else if ( document.body && 
            ( document.body.clientWidth || document.body.clientHeight ) ){
        my_width  = document.body.clientWidth;
        my_height = document.body.clientHeight;
    }

    element.style.position = 'absolute';
    element.style.zIndex   = 99;

    var scrollY = 0;

    if ( document.documentElement && document.documentElement.scrollTop ){
        scrollY = document.documentElement.scrollTop;
    }else if ( document.body && document.body.scrollTop ){
        scrollY = document.body.scrollTop;
    }else if ( window.pageYOffset ){
        scrollY = window.pageYOffset;
    }else if ( window.scrollY ){
        scrollY = window.scrollY;
    }

    var elementDimensions = Element.getDimensions(element);

    //////////added by steve////////////
    if(whichBrs() == 'Safari')
    {
		my_height = getWindowHeight();
		
	}
    /////////////////////////////////

    var setX = ( my_width  - elementDimensions.width  ) / 2;
   
    if(whichBrs() == 'Safari')
	{
		var setY = ( my_height - 305 ) / 2 + scrollY;
	}
	else
	{
    	var setY = ( my_height - elementDimensions.height ) / 2 + scrollY;

	}
    setX = ( setX < 0 ) ? 0 : setX;
    setY = ( setY < 0 ) ? 0 : setY;

     //added by demby
    if(scrollY == 0 && whichBrs()!='Safari')
    {
		setY= 170;
    }

    if(my_height < 372 && whichBrs()!='Safari')
    {
		setY=0;
	}

    element.style.left = setX + "px";
    element.style.top  = setY + "px";

    element.style.display  = 'block';
    

    //alert("scrollY: "+scrollY);
     //alert("setY: "+setY);
    //alert("elementheight: "+ elementDimensions.height);
}


function hideFlash()
{
	embeds = document.getElementsByTagName('embed');	for(i = 0; i < embeds.length; i++) {	embeds[i].style.visibility = 'hidden';	}			embeds = document.getElementsByTagName('object');	for(i = 0; i < embeds.length; i++) {	embeds[i].style.visibility = 'hidden';	}				
}

function showFlash()
{
	embeds = document.getElementsByTagName('embed');	for(i = 0; i < embeds.length; i++) {	embeds[i].style.visibility = 'visible';	}		embeds = document.getElementsByTagName('object');	for(i = 0; i < embeds.length; i++) {	embeds[i].style.visibility = 'visible';	}		
}

function hideCustomScrollbars()
{
	if($('specials_mid_id'))
	{
		$('specials_mid_id').style.overflow = 'hidden';
	}

	if($('news_mid_id'))
	{
		$('news_mid_id').style.overflow = 'hidden';
	}

}	

function unHideCustomScrollbars()
{
	if($('specials_mid_id'))
	{
		$('specials_mid_id').style.overflow = 'auto';
	}
	
	if($('news_mid_id'))
	{
		$('news_mid_id').style.overflow = 'auto';
	}

}	

function ThirdPopUp(path, AptAvailability){
 var close_img_path= path+"/images/close_x_btn.jpg";
 hideFlash();
 hideAllSelects();
 $('box1').innerHTML = '<div class="secondary_form" style="height:130px; width:400px;"> \
			<img src="'+close_img_path+'" onclick="hideBox()" border="0" class="float_right" /></a>\
			<span class="hp_contact_title">Contact Us</span><br/>\
				One of our <strong>knowledge team members</strong> will be in-touch with you shortly.<br/><br/>If you would like to get started on your own, please click one the links to <br/><a href="'+AptAvailability+'" target="_blank">Apply Online</a> or <a href="'+AptAvailability+'" target="_blank">Check Apartment Availability</a>\
		</div>';
    $('overlay').show();
    $('box_cont').show();
	$('box_cont').makePositioned();
	center('box_cont');
   
    if(document.body.clientHeight < 3000)
    {
       $('overlay').style.height = 3000 + 'px'; 
    }
    else
    {
       $('overlay').style.height = document.body.clientHeight + 'px'; 
    }

  $('box_cont').makePositioned();
  center('box_cont');

}


function Show_Promotional(path){

 //var img_path= path+"/images/2010_award.gif";
 //var img_path= path+"/images/BonaventureBURST.gif";
 var img_path= path+"/images/FinalOlympicLogo.jpg";
hideFlash();
 hideAllSelects();
$('box2').innerHTML ='<div style="margin:0px 0px 0px 70px;height:450px;"><img src="'+img_path+'" height="450" width="270" onclick="hidePromoBox()" /></div>';

 
   $('overlay_promo').show();
    $('box2_cont').show();
	$('box2_cont').makePositioned();
	center('box2_cont');
   
  //  alert(getWindowHeight());


/*   if(getWindowHeight() < 2000)
    {
	   
       $('overlay_promo').style.height = getWindowHeight() + 'px'; 
    }
    else
    {
       $('overlay_promo').style.height = getWindowHeight() + 'px'; 
    }
*/

 /*var elementDimensions = Element.getDimensions('box2_cont');
 elementDimensions.height = 450;
 alert("elementheight: "+ elementDimensions.height);*/
 
   if(document.body.clientHeight < 3000)
    {
       $('overlay_promo').style.height = 1000 + 'px'; 
    }
    else
    {
       $('overlay_promo').style.height = document.body.clientHeight + 'px'; 
    }

}










function Show_Email_Box(path){

 var close_img_path= path+"/images/close_x_btn.jpg";
 var img_path= path+"/images/submit_btn.gif";
 hideFlash();
 hideAllSelects();
$('box2').innerHTML ='<div class="email_friend_form">  \
<img src="'+close_img_path+'" onclick="hideBox()" border class="float_right" />\
        <span class="hp_contact_title">Email to a friend</span><br/> \
           <p><font color="#FF0000">*</font> Required information</p> \
        <font color="#FF0000">*</font> <input name="your_name" id="your_name" type="text" style="width:270px; margin:0 0 0 0;" value="Your Name" onfocus="if(this.value==\'Your Name\'){this.value=\'\'};"/><br/> \
        <font color="#FF0000">*</font> <input name="your_email" id="your_email" type="text" style="width:270px; margin:3px 0 0 0; " value="Your Email" onfocus="if(this.value==\'Your Email\'){this.value=\'\'};"/> \
        <font color="#FF0000">*</font> <input name="friends_name" id="friends_name" type="text" style="width:270px; margin:18px 0 0 0; " value="Friend Name" onfocus="if(this.value==\'Friend Name\'){this.value=\'\'};"/><br/> \
        <font color="#FF0000">*</font> <input name="friends_email" id="friends_email" type="text" style="width:270px; margin:3px 0 0 0;" value="Friend Email" onfocus="if(this.value==\'Friend Email\'){this.value=\'\'};"/> \
        <textarea name="Text_Area" id="Text_Area" value="Text_Area" style="width:284px; height:50px; margin:18px 0 3px 0; padding:0;" onfocus="if(this.value==\'Comments\'){this.value=\'\'};"/>Comments</textarea><br/>\
        <a href="javascript:Send_Friend_Email()"><img src="'+img_path+'" border="0"/></a>\
        </div>';


   $('overlay').show();
    $('box2_cont').show();
	$('box2_cont').makePositioned();
	center('box2_cont');
   
    if(document.body.clientHeight < 3000)
    {
       $('overlay').style.height = 3000 + 'px'; 
    }
    else
    {
       $('overlay').style.height = document.body.clientHeight + 'px'; 
    }
}

function SendToFriend(NameOfFloorPlan, url){
 hideFlash();
 hideAllSelects();
 var path=document.getElementById('AbsolutePath').value;                                                                                                
 var close_img_path= path+"/images/close_x_btn.jpg";
 var img_path= path+"/images/submit_btn.gif";
$('box2').innerHTML ='<div class="email_friend_form">  \
<img src="'+close_img_path+'" onclick="hideBox()" border class="float_right" />\
        <span class="hp_contact_title">Email to a friend</span><br/> \
           <p><font color="#FF0000">*</font> Required information</p> \
        <font color="#FF0000">*</font> <input name="your_name" id="your_name" type="text" style="width:270px; margin:0 0 0 0;" value="Your Name" onfocus="if(this.value==\'Your Name\'){this.value=\'\'};"/><br/> \
        <font color="#FF0000">*</font> <input name="your_email" id="your_email" type="text" style="width:270px; margin:3px 0 0 0; " value="Your Email" onfocus="if(this.value==\'Your Email\'){this.value=\'\'};"/> \
        <font color="#FF0000">*</font> <input name="friends_name" id="friends_name" type="text" style="width:270px; margin:18px 0 0 0; " value="Friend Name" onfocus="if(this.value==\'Friend Name\'){this.value=\'\'};"/><br/> \
        <font color="#FF0000">*</font> <input name="friends_email" id="friends_email" type="text" style="width:270px; margin:3px 0 0 0;" value="Friend Email" onfocus="if(this.value==\'Friend Email\'){this.value=\'\'};"/> \
        <textarea name="Text_Area" id="Text_Area" value="Text_Area" style="width:284px; height:50px; margin:18px 0 3px 0; padding:0;" />Check out the '+NameOfFloorPlan+' Floorplan. </textarea><br/>\
        <a href="javascript:SendToFriendEmail(\''+NameOfFloorPlan+'\',\''+url+'\')"><img src="'+img_path+'" border="0"/></a>\
        </div>';

   $('overlay').show();
    $('box2_cont').show();
	$('box2_cont').makePositioned();
	center('box2_cont');
   
    if(document.body.clientHeight < 3000)
    {
       $('overlay').style.height = 3000 + 'px'; 
    }
    else
    {
       $('overlay').style.height = document.body.clientHeight + 'px'; 
    }
}


function ContactUsSubmit(formName) {
	var path=document.getElementById('AbsolutePath').value;      
  var AbsolutePath=document.getElementById('AbsolutePath').value;
  var your_name=document.getElementById('clb_your_name').value;
  var your_email=document.getElementById('clb_your_email').value;
  var your_phone=document.getElementById('clb_your_phone').value;
  var Bedroom=document.getElementById('clb_Bedroom').value;
  var date_needed = document.getElementById('clb_date_needed').value;
  var Comments=document.getElementById('clb_comments').value;  
  if(your_name=='Your Name' || your_name==''){
     alert("Please enter your Name");
  }            
  else if(your_email=='Your Email' || your_email==''){
     alert("Please enter your Email");
  }
  else if(your_phone=='Your Phone Number' || your_phone==''){
     alert("Please enter your Phone Number");
  }
  else if(date_needed == '' || date_needed == '-Select a date-')
  {
	alert("Please enter a date");
  }

  else{
     var PropertyID=document.getElementById('PropertyID').value; 
  	var params = 'ContactName='+your_name+'&Email='+your_email+'&Phone='+your_phone+'&Bedroom='+Bedroom+'&Comments='+Comments+'&PropertyID='+PropertyID+'&FormName='+formName+'&Date='+date_needed;
    new Ajax.Request(AbsolutePath+"/InsertUserData.php",{  onSuccess: function(transport) {
    	if ((formName == 'Check Availability') || (formName == 'Apartment Availability')) { 
				document.location.href = path + '/contact_transfer1.html';
				//document.location.href = path + '/contact_transfer1.php?sval='+PropertyID;
			}
			else {
				document.location.href = path + '/contact_transfer2.html';
				//document.location.href = path + '/contact_transfer2.php?sval='+PropertyID;				
			}
  }, parameters:params});
	  }	
	
}


function ContactUsForm(formName){
 hideFlash();
 hideAllSelects();
 var path=document.getElementById('AbsolutePath').value;                                                                                                
 var close_img_path= path+"/images/close_x_btn.jpg";
 var img_path= path+"/images/submit_btn.gif";
$('box2').innerHTML ='<div class="email_friend_form"> \
	<a href="#"><img src="'+close_img_path+'" onclick="hideBox()" border="0" class="float_right" /></a> \
	<span class="hp_contact_title">Contact Us</span><br/> \
	<p><font color="#FF0000">*</font> Required information</p> \
	<font color="#FF0000">*</font> <input onfocus="if(this.value==\'Your Name\'){this.value=\'\'};" id="clb_your_name" name="your_name" type="text" style="width:270px; margin:0 0 0 0;" value="Your Name"/><br/> \
	<font color="#FF0000">*</font> <input onfocus="if(this.value==\'Your Email\'){this.value=\'\'};" id="clb_your_email" name="your_email" type="text" style="width:270px; margin:3px 0 0 0; " value="Your Email"/> \
	<font color="#FF0000">*</font> <input onfocus="if(this.value==\'Your Phone Number\'){this.value=\'\'};" id="clb_your_phone" name="your_phone" type="text" style="width:270px; margin:3px 0 0 0; " value="Your Phone Number"/> \
	<p>Number of bedrooms desired&nbsp;&nbsp; \
	<br><select id="clb_Bedroom" style="margin:3px 0 0 0; padding:0;"> \
	<option value=0>-Select bedrooms-</option> \
	<option value=1>1</option> \
	<option value=2>2</option> \
	<option value=3>3</option> \
	<option value=4>4</option> \
	</select><br/> \
	<p><font color="#FF0000">*</font> Date Needed&nbsp;&nbsp; \
	<br> <select id="clb_date_needed" style="margin:3px 0 0 0; padding:0;"> \
<option value="">-Select a date-</option> \
<option value="1 week">1 week</option> \
<option value="1 month">1 month</option> \
<option value="2 months">2 months</option> \
<option value="3 months">3 months +</option> \
	</select><br/> \
	<textarea onfocus="if(this.value==\'Comments\'){this.value=\'\'};" id="clb_comments" style="width:284px; height:50px; margin:18px 0 3px 0; padding:0;">Comments</textarea><br/> \
	</p> \
	<a href="javascript:ContactUsSubmit(\'' + formName + '\')"><img src="'+img_path+'" border="0" /></a> \
</div>';

  
   // $('box2_cont').show();
	$('box2_cont').makePositioned();
	center('box2_cont');
   
    if(document.body.clientHeight < 3000)
    {
       $('overlay').style.height = 3000 + 'px'; 
    }
    else
    {
       $('overlay').style.height = document.body.clientHeight + 'px'; 
    }

	center('box2_cont');
    $('overlay').show();
}










function findPos(obj) {
var curleft = curtop = 0;
if (obj.offsetParent) {
	curleft = obj.offsetLeft
	curtop = obj.offsetTop
	while (obj = obj.offsetParent) {
		curleft += obj.offsetLeft
		curtop += obj.offsetTop
	}
}
return [curleft,curtop];
}


function whichBrs() {var agt=navigator.userAgent.toLowerCase();if (agt.indexOf("opera") != -1) return 'Opera';if (agt.indexOf("staroffice") != -1) return 'Star Office';if (agt.indexOf("webtv") != -1) return 'WebTV';if (agt.indexOf("beonex") != -1) return 'Beonex';if (agt.indexOf("chimera") != -1) return 'Chimera';if (agt.indexOf("netpositive") != -1) return 'NetPositive';if (agt.indexOf("phoenix") != -1) return 'Phoenix';if (agt.indexOf("firefox") != -1) return 'Firefox';if (agt.indexOf("safari") != -1) return 'Safari';if (agt.indexOf("skipstone") != -1) return 'SkipStone';if (agt.indexOf("msie") != -1) return 'Internet Explorer';if (agt.indexOf("netscape") != -1) return 'Netscape';if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';if (agt.indexOf('\/') != -1) {if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {return navigator.userAgent.substr(0,agt.indexOf('\/'));}else return 'Netscape';} else if (agt.indexOf(' ') != -1)return navigator.userAgent.substr(0,agt.indexOf(' '));else return navigator.userAgent;}



function check_usphone(phonenumber)
{
if((phonenumber.match(/^[ ]*[]{0,1}[ ]*[0-9]{3,3}[ ]*[]{0,1}[-]{0,1}[ ]*[0-9]{3,3}[ ]*[-]{0,1}[ ]*[0-9]{4,4}[ ]*$/)==null) && (phonenumber.match(/^[ ]*[0-9]{3,3}[ ]*[-]{0,1}[ ]*[0-9]{4,4}[ ]*$/)==null)) return false;
return true;
} 
	
function Show_SendUs_Message_Box(path){
 var Comments=document.getElementById('Comments').value;
 if(Comments=='Your Message'){ var TheComments=''; }else{var TheComments=Comments;}
 var img_path= path+"/images/submit_btn.gif";
 var close_img_path= path+"/images/close_x_btn.jpg";
 var PropertyID=document.getElementById('PropertyID').value;                                                                                                
 var PropertyName=document.getElementById('PropertyName').value;                          
 var wValue=document.getElementById('wValue').value;                          
 var ContactName=document.getElementById('ContactName').value;
 var Email=document.getElementById('Email').value;
 var TelePhone=document.getElementById('Phone').value;
 var Bedroom=document.getElementById('Bedroom').value;
 var Date=document.getElementById('Date').value;
 
 if(Bedroom=='0'){
   BedroomValue='Studio';
 }
 else if(Bedroom=='0.5'){
   BedroomValue='Efficiency';
 }
 else if(Bedroom=='1'){
   BedroomValue='1 Bedrooms';
 }
 else if(Bedroom=='1.5'){
   BedroomValue='1 Bedrooms + Den';
 }
 else if(Bedroom=='2'){
   BedroomValue='2 Bedrooms';
 }
 else if(Bedroom=='2.5'){
   BedroomValue='2 Bedrooms + Den';
 }
 else if(Bedroom=='3'){
   BedroomValue='3 Bedrooms';
 }
 

if(check_usphone(TelePhone)==false){
   alert("Please enter your phone number in the following format: 123-456-7890");
 }
 else if(ContactName=='Name' || ContactName==''){
     alert("Please enter your Name");
 }
 else if(Email=='Email' || Email==''){
    alert("Please enter your Email");
 }
 else if(TelePhone=='Phone' || TelePhone==''){
   alert("Please enter your Phone Number");
 }
 else if(Bedroom=='' || Bedroom=='Bedrooms'){
   alert("Please choose the number of bedrooms desired");
 }
 else if(Date=='Date needed' || Date ==''){
   alert("Please choose the date needed");
 }
 
 
 else {
 new Ajax.Request(path+"/InsertUserData.php",
				  {parameters:'PropertyID='+PropertyID+'&ContactName='+ContactName+'&Email='+Email+'&Phone='+TelePhone+'&Bedroom='+Bedroom+'&Date='+Date+'&Comments='+TheComments,
				  onSuccess: function(t) {


/*
 var Comments=document.getElementById('Comments').value;
 if(Comments=='Your Message'){ var TheComments=''; }else{var TheComments=Comments;}
 var img_path= path+"/images/submit_btn.gif";
 var close_img_path= path+"/images/close_x_btn.jpg";
 var PropertyID=document.getElementById('PropertyID').value;                                                                                                
 var PropertyName=document.getElementById('PropertyName').value;                          
 var wValue=document.getElementById('wValue').value;                          
 var ContactName=document.getElementById('ContactName').value;
 var Email=document.getElementById('Email').value;
 var TelePhone=document.getElementById('Phone').value;
 var Bedroom=document.getElementById('Bedroom').value;
 var Date=document.getElementById('Date').value;
 var DataID = t.responseText;
 
 if(Bedroom=='0'){
   BedroomValue='Studio';
 }
 else if(Bedroom=='0.5'){
   BedroomValue='Efficiency';
 }
 else if(Bedroom=='1'){
   BedroomValue='1 Bedrooms';
 }
 else if(Bedroom=='1.5'){
   BedroomValue='1 Bedrooms + Den';
 }
 else if(Bedroom=='2'){
   BedroomValue='2 Bedrooms';
 }
 else if(Bedroom=='2.5'){
   BedroomValue='2 Bedrooms + Den';
 }
 else if(Bedroom=='3'){
   BedroomValue='3 Bedrooms';
 }
 
 */
 

 var DataID = t.responseText;
 
hideFlash();
hideAllSelects();
hideCustomScrollbars();

  if(document.getElementById('news_mid_id')!=null && document.getElementById('specials_news_id')!=null){
    hideCustomScrollbars();
  }

if(PropertyID=='1330326')
{
$('box1').innerHTML ='<div class="secondary_form">\
<img src="'+close_img_path+'" onclick="document.location.href=\'' + path + '/contact_transfer2.html\';" border class="float_right" />\
<span class="hp_contact_title">Contact Us</span><br/>\
	<table border=\'0\' cellspacing=\'0\' cellpadding=\'0\'>\
<tr>\
	<td width=\'628\' align=\'left\' valign=\'top\' CLASS="contxt">\
					Thank you for your interest in our Communities.\
					To better enable us assist you, please provide the following information. One of our team members will contact you very shortly.<br/><br/>\
					<font color="#FF0000">*</font> Required information<BR CLEAR="all">\
					<br/>\
<!--FORM action="contactus.asp?w=carriagehillapts&t=template_bonaventure&u=1&siteid=1330329" method=POST onsubmit="return (checkFields())" NAME="oMailForm"-->\
<table cellpadding=1 cellspacing=0 WIDTH="100%">\
	<tr>\
		<td>\
			<table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff" bordercolor="#fffff" WIDTH="100%">\
				<tr>\
					<td class=guestcard>\
						<table cellpadding=1 cellspacing=0 BORDER="0" WIDTH="100%">\
							<tr>\
								<td class=guestcard><b>Contact Name</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Name</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+ContactName+'\
								</font></em</td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Date Needed</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+Date+'\
								</font></em></td>\
							</tr>\
                                                 	<tr>\
								<td class=guestcard><b>Address</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Street</td>\
								<td class=guestcard>\
									&nbsp;<input name=address id="the_address" type=text size=30 maxlength=96 value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>City</td>\
								<td class=guestcard>\
									<table cellpadding=1 cellspacing=0>\
										<tr>\
											<td class=guestcard>\
											&nbsp;<input name=city id="city_name" type=text size=10 maxlength=96 value="" >\
											</td>\
											<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>State</td>\
											<td class=guestcard>\
											<input type="hidden" value="'+DataID+'" name="DataID" id="DataID">\
									<select name=state id="state_name" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select state-</option>\
												<option value=\'AK\' >AK</option>\
												<option value=\'AL\' >AL</option>\
												<option value=\'AR\' >AR</option>\
												<option value=\'AZ\' >AZ</option>\
												<option value=\'CA\' >CA</option>\
												<option value=\'CO\' >CO</option>\
												<option value=\'CT\' >CT</option>\
												<option value=\'DC\' >DC</option>\
												<option value=\'DE\' >DE</option>\
												<option value=\'FL\' >FL</option>\
												<option value=\'GA\' >GA</option>\
												<option value=\'GU\' >GU</option>\
												<option value=\'HI\' >HI</option>\
												<option value=\'IA\' >IA</option>\
												<option value=\'ID\' >ID</option>\
												<option value=\'IL\' >IL</option>\
												<option value=\'IN\' >IN</option>\
												<option value=\'KS\' >KS</option>\
												<option value=\'KY\' >KY</option>\
												<option value=\'LA\' >LA</option>\
												<option value=\'MA\' >MA</option>\
												<option value=\'MD\' >MD</option>\
												<option value=\'ME\' >ME</option>\
												<option value=\'MI\' >MI</option>\
												<option value=\'MN\' >MN</option>\
												<option value=\'MO\' >MO</option>\
												<option value=\'MS\' >MS</option>\
												<option value=\'MT\' >MT</option>\
												<option value=\'NC\' >NC</option>\
												<option value=\'ND\' >ND</option>\
												<option value=\'NE\' >NE</option>\
												<option value=\'NH\' >NH</option>\
												<option value=\'NJ\' >NJ</option>\
												<option value=\'NM\' >NM</option>\
												<option value=\'NV\' >NV</option>\
												<option value=\'NY\' >NY</option>\
												<option value=\'OH\' >OH</option>\
												<option value=\'OK\' >OK</option>\
												<option value=\'OR\' >OR</option>\
												<option value=\'PA\' >PA</option>\
												<option value=\'PR\' >PR</option>\
												<option value=\'RI\' >RI</option>\
												<option value=\'SC\' >SC</option>\
												<option value=\'SD\' >SD</option>\
												<option value=\'TN\' >TN</option>\
												<option value=\'TX\' >TX</option>\
												<option value=\'UT\' >UT</option>\
												<option value=\'VA\' >VA</option>\
												<option value=\'VI\' >VI</option>\
												<option value=\'VT\' >VT</option>\
												<option value=\'WA\' >WA</option>\
												<option value=\'WI\' >WI</option>\
												<option value=\'WV\' >WV</option>\
												<option value=\'WY\' >WY</option>\
												</select>\
											</td>\
											<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>ZIP</td>\
											<td class=guestcard>\
											<input name=zip id="zip_code" type=text size=5 maxlength=5 value="" >\
											</td>\
										</tr>\
									</table>\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard NOWRAP><b>Preferred contact</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>\
									<input type="radio" name="preferredcontact" value="Phone" id="value0"  >\
									Phone\
									&nbsp;&nbsp;\
									<input type="radio" name="preferredcontact" value="Email" id="value1" >\
									E-mail\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard><b>Contact Info</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Email</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+Email+'\
								</font></em></td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Phone</td>\
								<td class=guestcard>\
									<table cellpadding=1 cellspacing=0>\
								<tr>\
									<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+TelePhone+'\
									</font></em></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>Best day/time to call:</td>\
											<td class=guestcard>\
									<select name=dayofweek id="dayofweek" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select day-</option>\
													<option value=\'any day\' >any day</option>\
												<option value=\'weekdays\' >weekdays</option>\
												<option value=\'weekends\' >weekends</option>\
												</select>\
									<select name=timeofday id="timeofday" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select time-</option>\
												<option value=\'any time\' >any time</option>\
											<option value=\'business hours\' >business hours</option>\
													<option value=\'evening\' >evening</option>\
												</select>\
											</td>\
										</tr>\
									</table>\
								</td>\
							</tr>\
						</table>\
					</td>\
				</tr>\
			</table>\
		</td>\
	</tr>\
	<tr>\
		<td class=guestcard><BR><i>Your answers to these questions will help us serve you better:</i></td>\
	</tr>\
	<tr>\
		<td class=guestcard valign="top">\
			<table cellpadding=1 cellspacing=0>\
				<tr>\
					<td class=guestcard valign="top">\
						<table cellpadding=1 cellspacing=0>\
							<tr>\
								<td class=guestcard>How did you find out about our apartment community?</td>\
								<td class=guestcard>\
								<select name=howdidyouhear id="howdidyouhear" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
										<option value=\'\'>-select source-</option>\
										<option value=\'Apartment Guide\' >Apartment Guide</option>\
										<option value=\'ApartmentGuide.com\' >ApartmentGuide.com</option>\
										<option value=\'Apartments.com\' >Apartments.com</option>\
										<option value=\'Apartments.com\' >Apartments.com</option>\
										<option value=\'ApartmentsPlus.com\' >ApartmentsPlus.com</option>\
										<option value=\'Brochure/Flyer\' >Brochure/Flyer</option>\
										<option value=\'Community Weekly\' >Community Weekly</option>\
										<option value=\'Counsel on Aging\' >Counsel on Aging</option>\
										<option value=\'Craigslist.com\' >Craigslist.com</option>\
										<option value=\'Current resident\' >Current resident</option>\
										<option value=\'Direct Mail\' >Direct Mail</option>\
										<option value=\'Drive by\' >Drive by</option>\
										<option value=\'Family Member Referral\' >Family Member Referral</option>\
										<option value=\'Fifty Plus Magazine\' >Fifty Plus Magazine</option>\
										<option value=\'For Rent Magazine\' >For Rent Magazine</option>\
										<option value=\'ForRent.com\' >ForRent.com</option>\
										<option value=\'Guide to Retirement Living\' >Guide to Retirement Living</option>\
										<option value=\'Hotpads.com\' >Hotpads.com</option>\
										<option value=\'Other property\' >Other property</option>\
										<option value=\'Other publication\' >Other publication</option>\
										<option value=\'Other site\' >Other site</option>\
										<option value=\'Para-Rentar\' >Para-Rentar</option>\
										<option value=\'Prior resident\' >Prior resident</option>\
										<option value=\'Property web site\' >Property web site</option>\
										<option value=\'Rent.com\' >Rent.com</option>\
										<option value=\'Senior guide 50 plus\' >Senior guide 50 plus</option>\
										<option value=\'Senior Source\' >Senior Source</option>\
										<option value=\'Seniority\' >Seniority</option>\
										<option value=\'Showcase\' >Showcase</option>\
										<option value=\'Sign/Drive By\' >Sign/Drive By</option>\
										<option value=\'Triangle Shoppers Guide\' >Triangle Shopper\'s Guide</option>\
										<option value=\'Unknown/Would not give\' >Unknown/Would not give</option>\
										<option value=\'Word of Mouth\' >Word of Mouth</option>\
							 </select>\
						 </td>\
							</tr>\
							<tr>\
								<td class=guestcard>What size apartment would you prefer?<font color="#FF0000">*</font></td>\
									<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+BedroomValue+'\
								</font></em></td>\
							</tr>\
							<tr>\
								<td class=guestcard>How much do you plan to spend on rent each month?<font color="#FF0000">*</font></td>\
									<td class=guestcard>\
									<select NAME=maxrent id="maxrent" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
									<option value=\'\' selected >-select amount-</option>\
									<option value=\'500\' >500-799</option>\
									<option value=\'800\' >800-999</option>\
									<option value=\'1000\' >1000-1199</option>\
									<option value=\'1200\' >1200+</option>\
									</select>\
								</td>\
							</tr>\
							<tr>\
						<td class=guestcard>How many people will live in the apartment? <font color="#FF0000">*</font></td>\
								<td class=guestcard>\
									<input name=occupants id="occupants" type=text size=1 maxlength=1 value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>What date will you be moving? (mm/dd/yyyy)</td>\
								<td class=guestcard>\
									<input type=text size=10 maxlength=10 name=datemoving id="datemoving" value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>Do you (or will you) have pets?</td>\
								<td class=guestcard>\
										<input type="radio" name="pets" value="yes" id="valueyes" >Yes\
										&nbsp;&nbsp;\
										<input type="radio" name="pets" value="no" id="valueno">No\
						 </td>\
							</tr>\
						</table>\
					</td>\
				</tr>\
				<tr>\
				<td class=guestcard valign="bottom">Comments\
			<br CLEAR="all"><textarea style="width:600px; height:70px;" name=textarea1 id="contactustextarea" >'+TheComments+'</textarea></td>\
				</tr>\
			</table>\
		</td>\
	</tr>\
	<tr>\
		<td class=guestcard align="left">\
			<!-- Choose floor plan to receive a brochure by e-mail\
			<select name=floorplans> -->\
			<!-- </select> -->\
				<input name=submit type=image value="Submit" onclick="Contact_Us(\''+ContactName+'\',\''+Email+'\',\''+TelePhone+'\',\''+Date+'\',\''+Bedroom+'\')" src="'+img_path+'" width="64" height="24">\
			</td>\
		</tr>\
	</table>\
<!--/form-->\
     </td>\
	</tr>\
</table>\
	</div>';
}
else
{
$('box1').innerHTML ='<div class="secondary_form">\
<img src="'+close_img_path+'" onclick="hideBox()" border class="float_right" />\
<span class="hp_contact_title">Contact Us</span><br/>\
	<table border=\'0\' cellspacing=\'0\' cellpadding=\'0\'>\
<tr>\
	<td width=\'628\' align=\'left\' valign=\'top\' CLASS="contxt">\
					Thank you for your interest in our Communities.\
					To better enable us assist you, please provide the following information. One of our team members will contact you very shortly.<br/><br/>\
					<font color="#FF0000">*</font> Required information<BR CLEAR="all">\
					<br/>\
<!--FORM action="contactus.asp?w=carriagehillapts&t=template_bonaventure&u=1&siteid=1330329" method=POST onsubmit="return (checkFields())" NAME="oMailForm"-->\
<table cellpadding=1 cellspacing=0 WIDTH="100%">\
	<tr>\
		<td>\
			<table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff" bordercolor="#fffff" WIDTH="100%">\
				<tr>\
					<td class=guestcard>\
						<table cellpadding=1 cellspacing=0 BORDER="0" WIDTH="100%">\
							<tr>\
								<td class=guestcard><b>Contact Name</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Name</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+ContactName+'\
								</font></em</td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Date Needed</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+Date+'\
								</font></em></td>\
							</tr>\
                                                 	<tr>\
								<td class=guestcard><b>Address</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Street</td>\
								<td class=guestcard>\
									&nbsp;<input name=address id="the_address" type=text size=30 maxlength=96 value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>City</td>\
								<td class=guestcard>\
									<table cellpadding=1 cellspacing=0>\
										<tr>\
											<td class=guestcard>\
											&nbsp;<input name=city id="city_name" type=text size=10 maxlength=96 value="" >\
											</td>\
											<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>State</td>\
											<td class=guestcard>\
											<input type="hidden" value="'+DataID+'" name="DataID" id="DataID">\
									<select name=state id="state_name" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select state-</option>\
												<option value=\'AK\' >AK</option>\
												<option value=\'AL\' >AL</option>\
												<option value=\'AR\' >AR</option>\
												<option value=\'AZ\' >AZ</option>\
												<option value=\'CA\' >CA</option>\
												<option value=\'CO\' >CO</option>\
												<option value=\'CT\' >CT</option>\
												<option value=\'DC\' >DC</option>\
												<option value=\'DE\' >DE</option>\
												<option value=\'FL\' >FL</option>\
												<option value=\'GA\' >GA</option>\
												<option value=\'GU\' >GU</option>\
												<option value=\'HI\' >HI</option>\
												<option value=\'IA\' >IA</option>\
												<option value=\'ID\' >ID</option>\
												<option value=\'IL\' >IL</option>\
												<option value=\'IN\' >IN</option>\
												<option value=\'KS\' >KS</option>\
												<option value=\'KY\' >KY</option>\
												<option value=\'LA\' >LA</option>\
												<option value=\'MA\' >MA</option>\
												<option value=\'MD\' >MD</option>\
												<option value=\'ME\' >ME</option>\
												<option value=\'MI\' >MI</option>\
												<option value=\'MN\' >MN</option>\
												<option value=\'MO\' >MO</option>\
												<option value=\'MS\' >MS</option>\
												<option value=\'MT\' >MT</option>\
												<option value=\'NC\' >NC</option>\
												<option value=\'ND\' >ND</option>\
												<option value=\'NE\' >NE</option>\
												<option value=\'NH\' >NH</option>\
												<option value=\'NJ\' >NJ</option>\
												<option value=\'NM\' >NM</option>\
												<option value=\'NV\' >NV</option>\
												<option value=\'NY\' >NY</option>\
												<option value=\'OH\' >OH</option>\
												<option value=\'OK\' >OK</option>\
												<option value=\'OR\' >OR</option>\
												<option value=\'PA\' >PA</option>\
												<option value=\'PR\' >PR</option>\
												<option value=\'RI\' >RI</option>\
												<option value=\'SC\' >SC</option>\
												<option value=\'SD\' >SD</option>\
												<option value=\'TN\' >TN</option>\
												<option value=\'TX\' >TX</option>\
												<option value=\'UT\' >UT</option>\
												<option value=\'VA\' >VA</option>\
												<option value=\'VI\' >VI</option>\
												<option value=\'VT\' >VT</option>\
												<option value=\'WA\' >WA</option>\
												<option value=\'WI\' >WI</option>\
												<option value=\'WV\' >WV</option>\
												<option value=\'WY\' >WY</option>\
												</select>\
											</td>\
											<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>ZIP</td>\
											<td class=guestcard>\
											<input name=zip id="zip_code" type=text size=5 maxlength=5 value="" >\
											</td>\
										</tr>\
									</table>\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard NOWRAP><b>Preferred contact</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>\
									<input type="radio" name="preferredcontact" value="Phone" id="value0"  >\
									Phone\
									&nbsp;&nbsp;\
									<input type="radio" name="preferredcontact" value="Email" id="value1" >\
									E-mail\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard><b>Contact Info</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Email</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+Email+'\
								</font></em></td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Phone</td>\
								<td class=guestcard>\
									<table cellpadding=1 cellspacing=0>\
								<tr>\
									<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+TelePhone+'\
									</font></em></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>Best day/time to call:</td>\
											<td class=guestcard>\
									<select name=dayofweek id="dayofweek" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select day-</option>\
													<option value=\'any day\' >any day</option>\
												<option value=\'weekdays\' >weekdays</option>\
												<option value=\'weekends\' >weekends</option>\
												</select>\
									<select name=timeofday id="timeofday" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select time-</option>\
												<option value=\'any time\' >any time</option>\
											<option value=\'business hours\' >business hours</option>\
													<option value=\'evening\' >evening</option>\
												</select>\
											</td>\
										</tr>\
									</table>\
								</td>\
							</tr>\
						</table>\
					</td>\
				</tr>\
			</table>\
		</td>\
	</tr>\
	<tr>\
		<td class=guestcard><BR><i>Your answers to these questions will help us serve you better:</i></td>\
	</tr>\
	<tr>\
		<td class=guestcard valign="top">\
			<table cellpadding=1 cellspacing=0>\
				<tr>\
					<td class=guestcard valign="top">\
						<table cellpadding=1 cellspacing=0>\
							<tr>\
								<td class=guestcard>How did you find out about our apartment community?</td>\
								<td class=guestcard>\
								<select name=howdidyouhear id="howdidyouhear" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
										<option value=\'\'>-select source-</option>\
										<option value=\'Apartment Guide\' >Apartment Guide</option>\
										<option value=\'ApartmentGuide.com\' >ApartmentGuide.com</option>\
										<option value=\'Apartments.com\' >Apartments.com</option>\
										<option value=\'Apartments.com\' >Apartments.com</option>\
										<option value=\'ApartmentsPlus.com\' >ApartmentsPlus.com</option>\
										<option value=\'Brochure/Flyer\' >Brochure/Flyer</option>\
										<option value=\'Community Weekly\' >Community Weekly</option>\
										<option value=\'Counsel on Aging\' >Counsel on Aging</option>\
										<option value=\'Craigslist.com\' >Craigslist.com</option>\
										<option value=\'Current resident\' >Current resident</option>\
										<option value=\'Direct Mail\' >Direct Mail</option>\
										<option value=\'Drive by\' >Drive by</option>\
										<option value=\'Family Member Referral\' >Family Member Referral</option>\
										<option value=\'Fifty Plus Magazine\' >Fifty Plus Magazine</option>\
										<option value=\'For Rent Magazine\' >For Rent Magazine</option>\
										<option value=\'ForRent.com\' >ForRent.com</option>\
										<option value=\'Guide to Retirement Living\' >Guide to Retirement Living</option>\
										<option value=\'Hotpads.com\' >Hotpads.com</option>\
										<option value=\'Other property\' >Other property</option>\
										<option value=\'Other publication\' >Other publication</option>\
										<option value=\'Other site\' >Other site</option>\
										<option value=\'Para-Rentar\' >Para-Rentar</option>\
										<option value=\'Prior resident\' >Prior resident</option>\
										<option value=\'Property web site\' >Property web site</option>\
										<option value=\'Rent.com\' >Rent.com</option>\
										<option value=\'Senior guide 50 plus\' >Senior guide 50 plus</option>\
										<option value=\'Senior Source\' >Senior Source</option>\
										<option value=\'Seniority\' >Seniority</option>\
										<option value=\'Showcase\' >Showcase</option>\
										<option value=\'Sign/Drive By\' >Sign/Drive By</option>\
										<option value=\'Triangle Shoppers Guide\' >Triangle Shopper\'s Guide</option>\
										<option value=\'Unknown/Would not give\' >Unknown/Would not give</option>\
										<option value=\'Word of Mouth\' >Word of Mouth</option>\
							 </select>\
						 </td>\
							</tr>\
							<tr>\
								<td class=guestcard>What size apartment would you prefer?<font color="#FF0000">*</font></td>\
									<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+BedroomValue+'\
								</font></em></td>\
							</tr>\
							<tr>\
								<td class=guestcard>How much do you plan to spend on rent each month?<font color="#FF0000">*</font></td>\
									<td class=guestcard>\
									<select NAME=maxrent id="maxrent" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
									<option value=\'\' selected >-select amount-</option>\
									<option value=\'500\' >500-799</option>\
									<option value=\'800\' >800-999</option>\
									<option value=\'1000\' >1000-1199</option>\
									<option value=\'1200\' >1200+</option>\
									</select>\
								</td>\
							</tr>\
							<tr>\
						<td class=guestcard>How many people will live in the apartment? <font color="#FF0000">*</font></td>\
								<td class=guestcard>\
									<input name=occupants id="occupants" type=text size=1 maxlength=1 value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>What date will you be moving? (mm/dd/yyyy)</td>\
								<td class=guestcard>\
									<input type=text size=10 maxlength=10 name=datemoving id="datemoving" value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>Do you (or will you) have pets?</td>\
								<td class=guestcard>\
										<input type="radio" name="pets" value="yes" id="valueyes" >Yes\
										&nbsp;&nbsp;\
										<input type="radio" name="pets" value="no" id="valueno">No\
						 </td>\
							</tr>\
						</table>\
					</td>\
				</tr>\
				<tr>\
				<td class=guestcard valign="bottom">Comments\
			<br CLEAR="all"><textarea style="width:600px; height:70px;" name=textarea1 id="contactustextarea" >'+TheComments+'</textarea></td>\
				</tr>\
			</table>\
		</td>\
	</tr>\
	<tr>\
		<td class=guestcard align="left">\
			<!-- Choose floor plan to receive a brochure by e-mail\
			<select name=floorplans> -->\
			<!-- </select> -->\
				<input name=submit type=image value="Submit" onclick="Contact_Us(\''+ContactName+'\',\''+Email+'\',\''+TelePhone+'\',\''+Date+'\',\''+Bedroom+'\')" src="'+img_path+'" width="64" height="24">\
			</td>\
		</tr>\
	</table>\
<!--/form-->\
     </td>\
	</tr>\
</table>\
	</div>';

}


   $('overlay').show();
    $('box_cont').show();
	$('box_cont').makePositioned();
	center('box_cont');

    if(document.body.clientHeight < 3000)
    {
       $('overlay').style.height = 3000 + 'px'; 
    }
    else
    {
       $('overlay').style.height = document.body.clientHeight + 'px'; 
    }

				  }				  			  
				  }); 
 
  if(document.getElementById("contact_us_left")){
     document.getElementById("contact_us_left").innerHTML="<br><div style='padding-left:0px;'><strong><font face='arial' color='#000000' size='2'>Thank you for your inquiry. A Bonaventure Team member will contact you shortly.</font></strong></div>";
  }
  else if(document.getElementById("contact_us")){
     document.getElementById("contact_us").innerHTML="<br><div style='text-align:center;'><strong><font face='arial' color='#000000' size='2'>Thank you for your inquiry. A Bonaventure Team member will contact you shortly.</font></strong></div>";
  }
}

}

function Show_SendUs_Message_Box_Cascades(path){
 var Comments=document.getElementById('Comments').value;
 if(Comments=='Your Message'){ var TheComments=''; }else{var TheComments=Comments;}
 var img_path= path+"/images/submit_btn.gif";
 var close_img_path= path+"/images/close_x_btn.jpg";
 var PropertyID=document.getElementById('PropertyID').value;                                                                                                
 var PropertyName=document.getElementById('PropertyName').value;                          
 var wValue=document.getElementById('wValue').value;                          
 var ContactName=document.getElementById('ContactName').value;
 var Email=document.getElementById('Email').value;
 var TelePhone=document.getElementById('Phone').value;
 var Bedroom=document.getElementById('Bedroom').value;
 var Date=document.getElementById('Date').value;
 
 if(Bedroom=='0'){
   BedroomValue='Studio';
 }
 else if(Bedroom=='0.5'){
   BedroomValue='Efficiency';
 }
 else if(Bedroom=='1'){
   BedroomValue='1 Bedrooms';
 }
 else if(Bedroom=='1.5'){
   BedroomValue='1 Bedrooms + Den';
 }
 else if(Bedroom=='2'){
   BedroomValue='2 Bedrooms';
 }
 else if(Bedroom=='2.5'){
   BedroomValue='2 Bedrooms + Den';
 }
 else if(Bedroom=='3'){
   BedroomValue='3 Bedrooms';
 }
 

if(check_usphone(TelePhone)==false){
   alert("Please enter your phone number in the following format: 123-456-7890");
 }
 else if(ContactName=='Name' || ContactName==''){
     alert("Please enter your Name");
 }
 else if(Email=='Email' || Email==''){
    alert("Please enter your Email");
 }
 else if(TelePhone=='Phone' || TelePhone==''){
   alert("Please enter your Phone Number");
 }
 else if(Bedroom=='' || Bedroom=='Bedrooms'){
   alert("Please choose the number of bedrooms desired");
 }
 else if(Date=='Date needed' || Date ==''){
   alert("Please choose the date needed");
 }
 
 
 else {
 new Ajax.Request(path+"/InsertUserData.php",
				  {parameters:'PropertyID='+PropertyID+'&ContactName='+ContactName+'&Email='+Email+'&Phone='+TelePhone+'&Bedroom='+Bedroom+'&Date='+Date+'&Comments='+TheComments,
				  onSuccess: function(t) {


/*
 var Comments=document.getElementById('Comments').value;
 if(Comments=='Your Message'){ var TheComments=''; }else{var TheComments=Comments;}
 var img_path= path+"/images/submit_btn.gif";
 var close_img_path= path+"/images/close_x_btn.jpg";
 var PropertyID=document.getElementById('PropertyID').value;                                                                                                
 var PropertyName=document.getElementById('PropertyName').value;                          
 var wValue=document.getElementById('wValue').value;                          
 var ContactName=document.getElementById('ContactName').value;
 var Email=document.getElementById('Email').value;
 var TelePhone=document.getElementById('Phone').value;
 var Bedroom=document.getElementById('Bedroom').value;
 var Date=document.getElementById('Date').value;
 var DataID = t.responseText;
 
 if(Bedroom=='0'){
   BedroomValue='Studio';
 }
 else if(Bedroom=='0.5'){
   BedroomValue='Efficiency';
 }
 else if(Bedroom=='1'){
   BedroomValue='1 Bedrooms';
 }
 else if(Bedroom=='1.5'){
   BedroomValue='1 Bedrooms + Den';
 }
 else if(Bedroom=='2'){
   BedroomValue='2 Bedrooms';
 }
 else if(Bedroom=='2.5'){
   BedroomValue='2 Bedrooms + Den';
 }
 else if(Bedroom=='3'){
   BedroomValue='3 Bedrooms';
 }
 
 */
 

 var DataID = t.responseText;
 
hideFlash();
hideAllSelects();
hideCustomScrollbars();

  if(document.getElementById('news_mid_id')!=null && document.getElementById('specials_news_id')!=null){
    hideCustomScrollbars();
  }

if(PropertyID=='1330326')
{
$('box1').innerHTML ='<div class="secondary_form">\
<img src="'+close_img_path+'" onclick="document.location.href=\'' + path + '/contact_transfer2.html\';" border class="float_right" />\
<span class="hp_contact_title">Contact Us</span><br/>\
	<table border=\'0\' cellspacing=\'0\' cellpadding=\'0\'>\
<tr>\
	<td width=\'628\' align=\'left\' valign=\'top\' CLASS="contxt">\
					Thank you for your interest in our Communities.\
					To better enable us assist you, please provide the following information. One of our team members will contact you very shortly.<br/><br/>\
					<font color="#FF0000">*</font> Required information<BR CLEAR="all">\
					<br/>\
<!--FORM action="contactus.asp?w=carriagehillapts&t=template_bonaventure&u=1&siteid=1330329" method=POST onsubmit="return (checkFields())" NAME="oMailForm"-->\
<table cellpadding=1 cellspacing=0 WIDTH="100%">\
	<tr>\
		<td>\
			<table cellpadding="5" cellspacing="0" border="0" bgcolor="#ffffff" bordercolor="#fffff" WIDTH="100%">\
				<tr>\
					<td class=guestcard>\
						<table cellpadding=1 cellspacing=0 BORDER="0" WIDTH="100%">\
							<tr>\
								<td class=guestcard><b>Contact Name</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Name</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+ContactName+'\
								</font></em</td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Date Needed</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+Date+'\
								</font></em></td>\
							</tr>\
                                                 	<tr>\
								<td class=guestcard><b>Address</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Street</td>\
								<td class=guestcard>\
									&nbsp;<input name=address id="the_address" type=text size=30 maxlength=96 value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>City</td>\
								<td class=guestcard>\
									<table cellpadding=1 cellspacing=0>\
										<tr>\
											<td class=guestcard>\
											&nbsp;<input name=city id="city_name" type=text size=10 maxlength=96 value="" >\
											</td>\
											<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>State</td>\
											<td class=guestcard>\
											<input type="hidden" value="'+DataID+'" name="DataID" id="DataID">\
									<select name=state id="state_name" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select state-</option>\
												<option value=\'AK\' >AK</option>\
												<option value=\'AL\' >AL</option>\
												<option value=\'AR\' >AR</option>\
												<option value=\'AZ\' >AZ</option>\
												<option value=\'CA\' >CA</option>\
												<option value=\'CO\' >CO</option>\
												<option value=\'CT\' >CT</option>\
												<option value=\'DC\' >DC</option>\
												<option value=\'DE\' >DE</option>\
												<option value=\'FL\' >FL</option>\
												<option value=\'GA\' >GA</option>\
												<option value=\'GU\' >GU</option>\
												<option value=\'HI\' >HI</option>\
												<option value=\'IA\' >IA</option>\
												<option value=\'ID\' >ID</option>\
												<option value=\'IL\' >IL</option>\
												<option value=\'IN\' >IN</option>\
												<option value=\'KS\' >KS</option>\
												<option value=\'KY\' >KY</option>\
												<option value=\'LA\' >LA</option>\
												<option value=\'MA\' >MA</option>\
												<option value=\'MD\' >MD</option>\
												<option value=\'ME\' >ME</option>\
												<option value=\'MI\' >MI</option>\
												<option value=\'MN\' >MN</option>\
												<option value=\'MO\' >MO</option>\
												<option value=\'MS\' >MS</option>\
												<option value=\'MT\' >MT</option>\
												<option value=\'NC\' >NC</option>\
												<option value=\'ND\' >ND</option>\
												<option value=\'NE\' >NE</option>\
												<option value=\'NH\' >NH</option>\
												<option value=\'NJ\' >NJ</option>\
												<option value=\'NM\' >NM</option>\
												<option value=\'NV\' >NV</option>\
												<option value=\'NY\' >NY</option>\
												<option value=\'OH\' >OH</option>\
												<option value=\'OK\' >OK</option>\
												<option value=\'OR\' >OR</option>\
												<option value=\'PA\' >PA</option>\
												<option value=\'PR\' >PR</option>\
												<option value=\'RI\' >RI</option>\
												<option value=\'SC\' >SC</option>\
												<option value=\'SD\' >SD</option>\
												<option value=\'TN\' >TN</option>\
												<option value=\'TX\' >TX</option>\
												<option value=\'UT\' >UT</option>\
												<option value=\'VA\' >VA</option>\
												<option value=\'VI\' >VI</option>\
												<option value=\'VT\' >VT</option>\
												<option value=\'WA\' >WA</option>\
												<option value=\'WI\' >WI</option>\
												<option value=\'WV\' >WV</option>\
												<option value=\'WY\' >WY</option>\
												</select>\
											</td>\
											<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>ZIP</td>\
											<td class=guestcard>\
											<input name=zip id="zip_code" type=text size=5 maxlength=5 value="" >\
											</td>\
										</tr>\
									</table>\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard NOWRAP><b>Preferred contact</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>\
									<input type="radio" name="preferredcontact" value="Phone" id="value0"  >\
									Phone\
									&nbsp;&nbsp;\
									<input type="radio" name="preferredcontact" value="Email" id="value1" >\
									E-mail\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard><b>Contact Info</b></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Email</td>\
								<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+Email+'\
								</font></em></td>\
							</tr>\
							<tr>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
								<td class=guestcard>Phone</td>\
								<td class=guestcard>\
									<table cellpadding=1 cellspacing=0>\
								<tr>\
									<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+TelePhone+'\
									</font></em></td>\
								<td class=guestcard>&nbsp;&nbsp;</td>\
											<td class=guestcard>Best day/time to call:</td>\
											<td class=guestcard>\
									<select name=dayofweek id="dayofweek" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select day-</option>\
													<option value=\'any day\' >any day</option>\
												<option value=\'weekdays\' >weekdays</option>\
												<option value=\'weekends\' >weekends</option>\
												</select>\
									<select name=timeofday id="timeofday" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
												<option value=\'\' selected >-select time-</option>\
												<option value=\'any time\' >any time</option>\
											<option value=\'business hours\' >business hours</option>\
													<option value=\'evening\' >evening</option>\
												</select>\
											</td>\
										</tr>\
									</table>\
								</td>\
							</tr>\
						</table>\
					</td>\
				</tr>\
			</table>\
		</td>\
	</tr>\
	<tr>\
		<td class=guestcard><BR><i>Your answers to these questions will help us serve you better:</i></td>\
	</tr>\
	<tr>\
		<td class=guestcard valign="top">\
			<table cellpadding=1 cellspacing=0>\
				<tr>\
					<td class=guestcard valign="top">\
						<table cellpadding=1 cellspacing=0>\
							<tr>\
								<td class=guestcard>How did you find out about our apartment community?</td>\
								<td class=guestcard>\
								<select name=howdidyouhear id="howdidyouhear" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
										<option value=\'\'>-select source-</option>\
										<option value=\'Apartment Guide\' >Apartment Guide</option>\
										<option value=\'ApartmentGuide.com\' >ApartmentGuide.com</option>\
										<option value=\'Apartments.com\' >Apartments.com</option>\
										<option value=\'Apartments.com\' >Apartments.com</option>\
										<option value=\'ApartmentsPlus.com\' >ApartmentsPlus.com</option>\
										<option value=\'Brochure/Flyer\' >Brochure/Flyer</option>\
										<option value=\'Community Weekly\' >Community Weekly</option>\
										<option value=\'Counsel on Aging\' >Counsel on Aging</option>\
										<option value=\'Craigslist.com\' >Craigslist.com</option>\
										<option value=\'Current resident\' >Current resident</option>\
										<option value=\'Direct Mail\' >Direct Mail</option>\
										<option value=\'Drive by\' >Drive by</option>\
										<option value=\'Family Member Referral\' >Family Member Referral</option>\
										<option value=\'Fifty Plus Magazine\' >Fifty Plus Magazine</option>\
										<option value=\'For Rent Magazine\' >For Rent Magazine</option>\
										<option value=\'ForRent.com\' >ForRent.com</option>\
										<option value=\'Guide to Retirement Living\' >Guide to Retirement Living</option>\
										<option value=\'Hotpads.com\' >Hotpads.com</option>\
										<option value=\'Other property\' >Other property</option>\
										<option value=\'Other publication\' >Other publication</option>\
										<option value=\'Other site\' >Other site</option>\
										<option value=\'Para-Rentar\' >Para-Rentar</option>\
										<option value=\'Prior resident\' >Prior resident</option>\
										<option value=\'Property web site\' >Property web site</option>\
										<option value=\'Rent.com\' >Rent.com</option>\
										<option value=\'Senior guide 50 plus\' >Senior guide 50 plus</option>\
										<option value=\'Senior Source\' >Senior Source</option>\
										<option value=\'Seniority\' >Seniority</option>\
										<option value=\'Showcase\' >Showcase</option>\
										<option value=\'Sign/Drive By\' >Sign/Drive By</option>\
										<option value=\'Triangle Shoppers Guide\' >Triangle Shopper\'s Guide</option>\
										<option value=\'Unknown/Would not give\' >Unknown/Would not give</option>\
										<option value=\'Word of Mouth\' >Word of Mouth</option>\
							 </select>\
						 </td>\
							</tr>\
							<tr>\
								<td class=guestcard>What size apartment would you prefer?<font color="#FF0000">*</font></td>\
									<td class=guestcard><em><font color="#0000FF">\
									&nbsp;'+BedroomValue+'\
								</font></em></td>\
							</tr>\
							<tr>\
								<td class=guestcard>How much do you plan to spend on rent each month?<font color="#FF0000">*</font></td>\
									<td class=guestcard>\
									<select NAME=maxrent id="maxrent" STYLE="FONT-SIZE: 8pt;FONT-FAMILY: Arial, Verdana">\
									<option value=\'\' selected >-select amount-</option>\
									<option value=\'500\' >500-799</option>\
									<option value=\'800\' >800-999</option>\
									<option value=\'1000\' >1000-1199</option>\
									<option value=\'1200\' >1200+</option>\
									</select>\
								</td>\
							</tr>\
							<tr>\
						<td class=guestcard>How many people will live in the apartment? <font color="#FF0000">*</font></td>\
								<td class=guestcard>\
									<input name=occupants id="occupants" type=text size=1 maxlength=1 value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>What date will you be moving? (mm/dd/yyyy)</td>\
								<td class=guestcard>\
									<input type=text size=10 maxlength=10 name=datemoving id="datemoving" value="" >\
								</td>\
							</tr>\
							<tr>\
								<td class=guestcard>Do you (or will you) have pets?</td>\
								<td class=guestcard>\
										<input type="radio" name="pets" value="yes" id="valueyes" >Yes\
										&nbsp;&nbsp;\
										<input type="radio" name="pets" value="no" id="valueno">No\
						 </td>\
							</tr>\
						</table>\
					</td>\
				</tr>\
				<tr>\
				<td class=guestcard valign="bottom">Comments\
			<br CLEAR="all"><textarea style="width:600px; height:70px;" name=textarea1 id="contactustextarea" >'+TheComments+'</textarea></td>\
				</tr>\
			</table>\
		</td>\
	</tr>\
	<tr>\
		<td class=guestcard align="left">\
			<!-- Choose floor plan to receive a brochure by e-mail\
			<select name=floorplans> -->\
			<!-- </select> -->\
				<input name=submit type=image value="Submit" onclick="Contact_Us(\''+ContactName+'\',\''+Email+'\',\''+TelePhone+'\',\''+Date+'\',\''+Bedroom+'\')" src="'+img_path+'" width="64" height="24">\
			</td>\
		</tr>\
	</table>\
<!--/form-->\
     </td>\
	</tr>\
</table>\
	</div>';
}
else
{}


   $('overlay').show();
    $('box_cont').show();
	$('box_cont').makePositioned();
	center('box_cont');

    if(document.body.clientHeight < 3000)
    {
       $('overlay').style.height = 3000 + 'px'; 
    }
    else
    {
       $('overlay').style.height = document.body.clientHeight + 'px'; 
    }

				  }				  			  
				  }); 
 
  if(document.getElementById("contact_us_left")){
     document.getElementById("contact_us_left").innerHTML="<br><div style='padding-left:0px;'><strong><font face='arial' color='#000000' size='2'>Thank you for your inquiry. A Bonaventure Team member will contact you shortly.</font></strong></div>";
  }
  else if(document.getElementById("contact_us")){
     document.getElementById("contact_us").innerHTML="<br><div style='text-align:center;'><strong><font face='arial' color='#000000' size='2'>Thank you for your inquiry. A Bonaventure Team member will contact you shortly.</font></strong></div>";
  }
}

}


