/*Start: Home Page Java Script  */
function generateBannerImageUrl(){
	document.location.href="search-results.htm?propertyStatus=Price Reduced&pagenumber=1&type=reo-properties";
}
function generateSCBannerImageUrl(){
	document.location.href="Bidding-Calendar.htm";
}
// Bidding Events 
var noTimeClick=0;	
var scrollLeft=0;
function homeBiddingEvents(direction)
{
    var noBiddingEvent=$(".noBiddingEvent").length;
    if(direction=="RIGHT"){
    	if(noTimeClick<noBiddingEvent-3){scrollLeft=scrollLeft-202;noTimeClick++;$('#carouselLeftEvents').attr("className","goLeft");}
    	if(noTimeClick==noBiddingEvent-3){$('#carouselRightEvents').attr("className","goRightDisable");}
    }
    else if(direction=="LEFT"){
    	if(noTimeClick>0){scrollLeft=scrollLeft+202;noTimeClick--;$('#carouselRightEvents').attr("className","goRight");}
    	if(noTimeClick==0){$('#carouselLeftEvents').attr("className","goLeftDisable");}
    }
    $("#scrollListingsBiddingEvents").animate({ left: scrollLeft}, 1000); 
} 
// Bidding Events 
// Hot Online Bid 
var noTimeClickHOB=0;	
var scrollLeftHOB=0;
function homeHotOnlineBid(direction)
{
    var noBiddingEvent=$(".noHotOnlineEvent").length;
    if(direction=="RIGHT"){
    	if(noTimeClickHOB<noBiddingEvent-3){scrollLeftHOB=scrollLeftHOB-202;noTimeClickHOB++;$('#carouselLeft').attr("className","goLeft");}
    	if(noTimeClickHOB==noBiddingEvent-3){$('#carouselRight').attr("className","goRightDisable");}
    }
    else if(direction=="LEFT"){
    	if(noTimeClickHOB>0){scrollLeftHOB=scrollLeftHOB+202;noTimeClickHOB--;$('#carouselRight').attr("className","goRight");}
    	if(noTimeClickHOB==0){$('#carouselLeft').attr("className","goLeftDisable");}
    }
    $("#scrollListingsHotOnlineBid").animate({ left: scrollLeftHOB}, 1000); 
} 

function carouselLeftRight()
{
	var onlineBid_z=document.getElementById("scrollListingsHotOnlineBid");
	var onlineBid_x=onlineBid_z.getElementsByTagName("td");
	if(onlineBid_x.length>3)
	{
		document.getElementById('carouselRight').className="goRight";
	}
	
	var biddingEvents_z=document.getElementById("scrollListingsBiddingEvents");
	var biddingEvents_x=biddingEvents_z.getElementsByTagName("td");
	if(biddingEvents_x.length>3)
	{
		document.getElementById('carouselRightEvents').className="goRight";
	}
	
}
// Hot Online Bid 
function loadPropertyBidHome(url) 
{
	autoRefresh=true;
	var Full_campainURL=document.location.href;
	var Full_campainURLPartOne=Full_campainURL.split('?');
         if(Full_campainURLPartOne[1]!=null){
	 url=url+"&"+Full_campainURLPartOne[1]+"&hotonlinebids=true";
	}
	document.location.href=url+"&hotonlinebids=true";
}
/*End: Home Page Java Script  */


/*Start: Search Result Page Java Script  */

function loadPropertyBid(url,listingNumber,propertyType,pdpNavigationCount) 
{
	autoRefresh=true;
	if(listingNumber!="{listingNumber}")
	{
		if(propertyType=="")
		{
			document.location.href=url+$.query.remove("utm_source").remove("utm_medium").remove("utm_content").set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCount)+"&propDetailsBySearch=Y";
		}else{
			document.location.href=url+$.query.remove("utm_source").remove("utm_medium").remove("utm_content").set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCount)+"&"+propertyType+"&propDetailsBySearch=Y";
		}
	}
	else if(listingNumber=="{listingNumber}")
	{
		document.location.href=url+$.query.remove("utm_source").remove("utm_medium").remove("utm_content")+"&"+propertyType;
	}
}
function watchListing(oTag,url,listingNumber,propertyType,pdpNavigationCount) 
{
	if(listingNumber!="{listingNumber}")
	{
		document.location.href=url+$.query.remove("utm_source").remove("utm_medium").remove("utm_content").set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCount)+"&"+propertyType+"&propDetailsBySearch=Y";
	}
	else if(listingNumber=="{listingNumber}")
	{
		document.location.href=url+$.query.remove("utm_source").remove("utm_medium").remove("utm_content")+"&"+propertyType;
	}
}
function loadPropertyOfferHours(elementId,divId,mess_txt,url,listingNumber,propertyType)
{
	
	var xpos=getX(elementId);
	var ypos=getY(elementId);
	xpos1=xpos-400;
	ypos1=ypos+0;
	
	document.getElementById(divId).style.left=xpos1+"px";
	document.getElementById(divId).style.top=ypos1+"px";
	document.getElementById(divId).style.display="block";
	
	document.getElementById("offerToolTipOkBtn").href=url+$.query.set("pagenumber", listingNumber)+"&"+propertyType+"&propDetailsBySearch=Y";
	
	document.getElementById("loadPropertyOfferHoursTooltip").innerHTML="Multiple buyers have already placed offers on this home. The seller has asked all buyers to place their highest and best offers within the next "+mess_txt+" hours. Please place your highest and best offer now to maximize the chance the seller will select your offer.";
}
function loadPropertyOfferHoursHid()
{
	document.getElementById("offerTooltipbg").style.display="none";
}

function showTooltip(show_tooltip,inp_id,mess_txt)
{
	
	var xpos=getX(show_tooltip);
	var ypos=getY(show_tooltip);
	xpos1=xpos+40;
	ypos1=ypos+70;
	document.getElementById(inp_id).style.left=xpos1+"px";
	document.getElementById(inp_id).style.top=ypos1+"px";
	document.getElementById(inp_id).style.display="block";
	document.getElementById("name_cus").innerHTML=mess_txt;
}
function getX(obj)
{
	return obj.offsetLeft + (obj.offsetParent ? getX(obj.offsetParent) : obj.x ? obj.x : 0);
}              
function getY(obj)
{
	return (obj.offsetParent ? obj.offsetTop + getY(obj.offsetParent) : obj.y ? obj.y : 0);
}
function hideTooltip()
{
	document.getElementById("name_cus").style.display="none";
}

function hideTooltip_search()
{
	document.getElementById("name_cus_search").style.display="none";
}
function assignPageTitle(pageTitle)
{	
	if(pageTitle!=""){
		var url= document.location.href;
		url=url.split('/');
		var state=url[3];
		
		if(state.length>2){
		  state="";
		   $("#noState").css("display","block");
		   $("#noPropertyFoundTxt").css("display","none");
		   $("#noPropertyFoundTxt1").css("display","none");
		
		}
		if(pageTitle!='CAMPAIGN'){
			document.title = state+pageTitle+state;
		}
	}
	
	document.getElementById("stateName").innerHTML=state;
	try{
	document.getElementById("stateName1").innerHTML=state;
	}catch(e){}

	if(document.getElementById("pageLinks").innerHTML=='<pager id="pager1"></pager>' || document.getElementById("pageLinks").innerHTML=='<PAGER id=pager1 />')
	{
	   if(pageTitle=='CAMPAIGN'){
		document.title ="";
	   }  
	   document.getElementById("noResultFound").style.display="block";
	   document.getElementById("searchPropertyAvailable").style.display="none";
	}
	else
	{
	     document.getElementById("noResultFound").style.display="none";
	     document.getElementById("searchPropertyAvailable").style.display="block";
	}
	
}
function getRefinementSearchItems(){
  var url=document.location.href;
  if(url.indexOf("search-results.htm")!=-1){
  	url=url.replace("search-results.htm","refinement-search.htm");
  }else if(url.indexOf("search-results-coming.htm")!=-1){
  	url=url.replace("search-results-coming.htm","refinement-search.htm");
  }else if(url.indexOf("map-results.htm")!=-1){
  	url=url.replace("map-results.htm","refinement-search.htm");
  }else if(url.indexOf("map-results-coming.htm")!=-1){
  	url=url.replace("map-results-coming.htm","refinement-search.htm");
  }else if(url.indexOf("campaign.htm")!=-1){
  	url=url.replace("campaign.htm","refinement-search.htm");
  }else if(url.indexOf("reo-homes.htm")!=-1){
  	url=url.replace("reo-homes.htm","refinement-search.htm");
  }else if(url.indexOf("event-results.htm")!=-1){
  	url=url.replace("event-results.htm","refinement-search.htm");
  }else if(url.indexOf("event-results-coming.htm")!=-1){
  	url=url.replace("event-results-coming.htm","refinement-search.htm");
  }else if(url.indexOf("stateOccupied.htm")!=-1){
    	url=url.replace("stateOccupied.htm","refinement-search.htm");
    	if(url.indexOf("?")>-1){
		url=url.split("?");
		url=url[0]+"?"+url[1]+"&occlandingpagetype=OCC_STATE&occupancystatus=Y";
    	}else{
    		url=url+"?occlandingpagetype=OCC_STATE&occupancystatus=Y";
    	}
    	
  }else if(url.indexOf("occupied.htm")!=-1){
    	url=url.replace("occupied.htm","refinement-search.htm");
    	if(url.indexOf("?")>-1){
		url=url.split("?");
		url=url[0]+"?"+url[1]+"&occlandingpagetype=OCC_ALL&occupancystatus=Y";
    	}else{
    		url=url+"?occlandingpagetype=OCC_ALL&occupancystatus=Y";
    	}
  }
  $('#availableRefinementBox').load(url);
}

function loadRegistrationPage(page,utm){
	utm=utm.replace("Button","");
	url=page;//+"?"+utm;	
	window.open(url,'open_window','menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=1000, height=700, left=0, top=0');
}

var count_value=0;
function serach_result()
{
	var offerSpanIdentifierArray=new Array('offerSpanIdentifier1','offerSpanIdentifier2','offerSpanIdentifier3','offerSpanIdentifier4','offerSpanIdentifier5','offerSpanIdentifier6','offerSpanIdentifier7','offerSpanIdentifier8','offerSpanIdentifier9','offerSpanIdentifier10');

	for(var i=0;i<offerSpanIdentifierArray.length;i++)
	{	
		if(document.getElementById(offerSpanIdentifierArray[i])!=null)
		{
			if(document.getElementById(offerSpanIdentifierArray[i]).title=="Bid"){
				count_value=1;				    
			}
		}
	}
	if(count_value==1)
	{
		try{document.getElementById("srListingTypeInfo").style.display="block";
		document.getElementById("currentBidSort").style.display="block";
		document.getElementById("srListingTypeInfo_online_offer").style.display="none";
		document.getElementById("currentBidSort_online_offer").style.display="none";
		}catch(e){}
	}
	else{
		try{document.getElementById("srListingTypeInfo").style.display="none";
		document.getElementById("currentBidSort").style.display="none";
		document.getElementById("srListingTypeInfo_online_offer").style.display="block";
		document.getElementById("currentBidSort_online_offer").style.display="block";
		}catch(e){}
	}
}
/*End: Search Result Page Java Script  */

/*Start: PDP  Java Script  */
function previouseProperty(prevURLProperty,listingNumber,pdpNavigationCount,loginStatus)
{
	if(loginStatus=="N")	
	{
		var pdpNavigationCountValue=pdpNavigationCount.charAt(0);
		var pdpNavigationCountChar=pdpNavigationCount.charAt(1);
		if(pdpNavigationCountChar=="N")
		{	if(pdpNavigationCountValue==0){
				pdpNavigationCountValue=0;
			}else {
				pdpNavigationCountValue=1;
			}
			pdpNavigationCountChar="P";
		}
		if(pdpNavigationCountValue == 3)
		{
			pdpNavigationCountValue=0+"P";
			document.location.href=prevURLProperty+$.query.set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCountValue)+"&autopopup=pdpRegistration";
		}
		else
		{
			pdpNavigationCountValue=(parseInt(pdpNavigationCountValue)+1)+"P";
			document.location.href=prevURLProperty+$.query.set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCountValue);
		}
	}
	else if(loginStatus=="Y")
	{
		document.location.href=prevURLProperty+$.query.set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCount);
	}
}

function nextProperty(nextURLProperty,listingNumber,pdpNavigationCount,loginStatus)
{
	if(loginStatus=="N")	
	{	
		var pdpNavigationCountValue=pdpNavigationCount.charAt(0);
		var pdpNavigationCountChar=pdpNavigationCount.charAt(1);
		if(pdpNavigationCountChar=="P")
		{
			if(pdpNavigationCountValue==0){
				pdpNavigationCountValue=0;
			}else {
				pdpNavigationCountValue=1;
			}
			pdpNavigationCountChar="N";
		}
		if(pdpNavigationCountValue == 3)
		{
			pdpNavigationCountValue=0+"N";
			document.location.href=nextURLProperty+$.query.set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCountValue)+"&autopopup=pdpRegistration";
		}
		else{ 
			pdpNavigationCountValue=(parseInt(pdpNavigationCountValue)+1)+"N";
			document.location.href=nextURLProperty+$.query.set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCountValue);
		}
		
		
	}
	else if(loginStatus=="Y")
	{	
		document.location.href=nextURLProperty+$.query.set("pagenumber", listingNumber).set("pdpnavigationcount" ,pdpNavigationCount)
	}
}
// START Reserve Met Tooltip
function reserveMetTooltip(pageName)
{
	if(pageName=="child")
	{
		if(parent.document.getElementById("reservemetTooltipBid").style.display=="none")
		{
			parent.document.getElementById("reservemetTooltipBid").style.display="block";
		}
		else
		{
			parent.document.getElementById("reservemetTooltipBid").style.display="none";
		}
	}
	else if(pageName=="parent"){
		if(document.getElementById("reservemetTooltipBid").style.display=="none")
		{
			document.getElementById("reservemetTooltipBid").style.display="block";
		}
		else
		{
			document.getElementById("reservemetTooltipBid").style.display="none";
		}
	}

	
}
// End Reserve Met Tooltip
// START Financing Tooltip
function financingTooltip()
{
  	if(document.getElementById("financingTooltip").style.display=="none")
  	{
  		$('.financingTooltip').show();
	}
	else
	{
		$('.financingTooltip').hide();
	}

	
}
// End Financing Tooltip


var no_arr=["feat_ad1","feat_ad2","feat_ad3","feat_ad4"];
function tabSelection(centerdiv_id,pathURL)
{
	if(document.getElementById(centerdiv_id).style.display=="none")
	{
		var i;
		for(i=0;i<no_arr.length;i++)
		{
			document.getElementById(no_arr[i]).style.display="none";
			document.getElementById(no_arr[i]+"1").className="unselected";
		}
		fadeeffect(centerdiv_id,pathURL);
	}
}
function fadeeffect(it,pathURL1)
{
	$('#'+it).fadeIn('slow');
	document.getElementById(it).style.display="block";
	document.getElementById(it+"1").className="selected";
}
function bidInfoTab(divId)
{
	if(divId=="whyRegister"){
		$('#bidInfoTab1').attr('class','selected');
		$('#bidInfoTab2').attr('class','unselected');
		$('#propertyFees').hide();
		$('#whyRegister').show();
	}
	else if(divId=="propertyFees"){
		$('#bidInfoTab1').attr('class','unselected');
		$('#bidInfoTab2').attr('class','selected');
		$('#whyRegister').hide();
		$('#propertyFees').show();
	}

}
var walkscore_temp_value=1;
function walkscore_address_pass(global_walkscore_address)
{
	if(walkscore_temp_value=="1")
	{
		var global_walkscore_address1=global_walkscore_address;
		document.getElementById("walkscore_iframeId").name=global_walkscore_address1;
		document.getElementById("walkscore_iframeId").src="/walkscore.htm";
		walkscore_temp_value=0;
	}
}

var noClickArrow=0;
var scrollTop=0;
function slidePhoto(direction) 
{
	var elementId=document.getElementById("thumbImages");
	var elementTagname=elementId.getElementsByTagName("img");
	var onThumbImages=elementTagname.length;
	if(direction=="TOP"){
	
	    if(noClickArrow>0){scrollTop=scrollTop+58;noClickArrow--;$("#downArrowElement").css("display","block");$("#downArrowElementHid").css("display","none");}
	    if(noClickArrow==0){$("#upArrowElement").css("display","none");$("#upArrowElementHid").css("display","block");}
	}
	if(direction=="BOTTOM"){
	
	    if(noClickArrow<onThumbImages-5){scrollTop=scrollTop-58;noClickArrow++;$("#upArrowElement").css("display","block");$("#upArrowElementHid").css("display","none");}
	    if(noClickArrow==onThumbImages-5){$("#downArrowElement").css("display","none");$("#downArrowElementHid").css("display","block");}
	    
	}
	$("#scrollUpDown").animate({top:scrollTop},1000);
}
// HandB 
function loadPropertyOfferHoursOfferPage(elementId,divId,mess_txt)
{
	autoRefresh=true;
	var xpos=getX(elementId);
	var ypos=getY(elementId);
	xpos1=xpos-400;
	ypos1=ypos+0;
	
	document.getElementById(divId).style.left=xpos1+"px";
	document.getElementById(divId).style.top=ypos1+"px";
	document.getElementById(divId).style.display="block";
	
	var sURL = document.location.href;
	sURL = sURL.toLowerCase();
	document.getElementById("offerToolTipOkBtnOfferPage").href=$.query.set("autopopup", "bid");
	document.getElementById("loadPropertyOfferHoursTooltipOfferPage").innerHTML="Multiple buyers have already placed offers on this home. The seller has asked all buyers to place their highest and best offers within the next "+mess_txt+" hours. Please place your highest and best offer now to maximize the chance the seller will select your offer.";
}
function loadPropertyOfferHoursHidOfferPage()
{
	document.getElementById("offerTooltipbgOfferPage").style.display="none";
}
// HandB

// START: Time remaining
function checkTime(i)
{
	if (i<10)
	{i="0" + i}
	return i
}
var flag=1;
function checkdate(timediff,currentTimeDifference_min,days_value,hours_value,mins_valus,secs_valus)
{
	if(currentTimeDifference_min >= 0)
	{ 
		document.getElementById("remainingDays").innerHTML=days_value;
		document.getElementById("remainingHours").innerHTML=hours_value;
		document.getElementById("remainingMinutes").innerHTML=mins_valus;
		document.getElementById("remainingSeconds").innerHTML=secs_valus;
		if(document.getElementById("remainingDays").innerHTML=="00" && flag==1)
		{
			$("#timingCounter").attr("class","eventCounterTimeBGRed")
			flag=0;
		}
		
	}
	else
	{
	try{
		document.getElementById("remainingDays").innerHTML="00";
		document.getElementById("remainingHours").innerHTML="00";
		document.getElementById("remainingMinutes").innerHTML="00";
		document.getElementById("remainingSeconds").innerHTML="00";
		}catch(e){}
	}
}
// End: Time remaining

function openHouse_facebookevents()
{
	try{
		var table_event_id=document.getElementById("openHouse_details_id");
		var table_event_obj=table_event_id.getElementsByTagName("a");
			for(var i=0; i<table_event_obj.length; i++)
			{
				if(table_event_obj[i].name=="-")
				{
					table_event_obj[i].style.display="none";
				}
			}
	}
	catch(e){}
}
/*End: PDP  Java Script  */
/*Start: Bidding Calender  Java Script  */

function bidding_Calendar_NoState()
{
	var element_id=document.getElementById("bidding_Calendar_txt_bg");
	var element_row=element_id.getElementsByTagName("tr");
	var element_td=element_id.getElementsByTagName("td");
	var stateAvailtble=0;
	for(var i=0; i<element_td.length;i++)
	{	
		i=i+3;
		var set_string=document.getElementById("Number_State");
		var Number_State_element_option=set_string.getElementsByTagName("option");
		for(var j=0;j<Number_State_element_option.length;j++)
		{
			
			if(stateAvailtble==0)
			{
				if(Number_State_element_option[j].value!=element_td[i].innerHTML)
				{ 
					stateAvailtble=0;

				}
				if(Number_State_element_option[j].value==element_td[i].innerHTML)
				{  
					stateAvailtble=1;
				}
			}
		}
		
		if(stateAvailtble==0)
		{
			var add_temp="<option value='"+element_td[i].innerHTML+"'>"+element_td[i].innerHTML+"</option>";
			$('#Number_State').append(add_temp);
			
		}
		stateAvailtble=0;
		
	}
	foption = $('#Number_State option:first-child');    	
	soptions = $('#Number_State' + " option:not(':first-child')").sort(function(a, b) {        
	return a.text == b.text ? 0 : a.text < b.text ? -1 : 1   
	})    	
	$('#Number_State' ).html(soptions).prepend(foption);    
	$('#Number_State option')[0].selected = true; 
}

function biddingCalendarDescription(stateCode,searchInitialUrl,zipList,cityList,listingType,eventStartDate,eventEndDate,minPrice,maxPrice,openHouse,bidEventId)
{
	var biddingCalendar_fullURL;	
	biddingCalendar_fullURL="/"+stateCode;

	location.href=biddingCalendar_fullURL+"/event-results.htm?tlbEventId="+bidEventId;
}
//Start Search By State 

function SearchByState(centerdiv_id)
{
	var table_element_id=document.getElementById("bidding_Calendar_txt_bg");
	var row_element_id=table_element_id.getElementsByTagName("tr");
	var td_element_id=table_element_id.getElementsByTagName("td");
	var i;
	var j=0;
	if(centerdiv_id!="All States")
	{
		for(i=0;i<td_element_id.length;i++)
		{	i=i+3;
			if(centerdiv_id==td_element_id[i].innerHTML)
			{
			
				row_element_id[j].style.display="block";
			}
			if(centerdiv_id!=td_element_id[i].innerHTML)
			{
				row_element_id[j].style.display="none";
			}
			j++;
		}
		
	}
	else if(centerdiv_id=="All States")
	{
		for(i=0;i<row_element_id.length;i++)
		{
			row_element_id[i].style.display="block";
		}
	}
//	document.getElmentById("bidding_Calendar_txt_bg_table").style.table-layout="fixed";
}
// Search By State End 

// Search By Date Start 

function searchByDate()
{
	var start_date=document.getElementById("startDate");
	var end_date=document.getElementById("endDate");
	var startConvertDate=new Date(start_date.value);
	var endConvertDate=new Date(end_date.value);
	if(start_date.value=="MM/DD/YYYY" || end_date.value=="MM/DD/YYYY")
	{
	 	alert("Please Enter Starting Date and Ending Date")
	}
	else if(startConvertDate=="NaN" || endConvertDate=="NaN" || startConvertDate=="Invalid Date" || endConvertDate=="Invalid Date")
	{
		alert("Please Enter Date MM/DD/YYYY")
	}
	else
	{
	
		var date_id=document.getElementById("bidding_Calendar_txt_bg");
		var date_element_row=date_id.getElementsByTagName("tr");
		var date_element_td=date_id.getElementsByTagName("td");
		var k=0;
		for(var j=0;j<date_element_row.length;j++)
		{
			date_element_row[j].style.display="none";
		}

		for(var i=0;i<date_element_td.length;i++)
		{

			var startAndDateStringValue=date_element_td[i].innerHTML;
			var twoDateValues=startAndDateStringValue.split("-");

			var tableStartValues=new Date(twoDateValues[0]);
			var tableStartValues1=new Date(twoDateValues[1]);

			if(startConvertDate<=tableStartValues && tableStartValues1<=endConvertDate)
			{
				date_element_row[k].style.display="block";
			}
			i=i+3;k++;
		}
	}

}
// Search By Date End 

/*End: Bidding Calender Java Script  */
function readyMoreLink()
{
	$('#readMoreLink').hide();
	$('#readMoreDataOrg').hide();
	$('#readMoreData').slideDown('fast');	
}
function deepLinking()
{
	var verify = "";
	var count=0;
	var liveURL=document.location;
	var mlsNumber=$.query.get("MlsListID");
	verify = AJAX("get", "/" + mlsNumber + "/verifyMLS.htm", "", "text/html");
	if(verify != "" && verify != "error") {
		  document.location.href = verify;
	}else {
     	 	count++;
     	 }
     	 if(count>0){
     	 	$("#propertyNotAvailable").css("display","block");
     	 }
     	 trackEvent('Deep linking');
}
function pdpRedirection(propertyId)
{
	var verify = "";
	var count=0;
	verify = AJAX("get", "/" + propertyId + "/verifyProperty.htm", "", "text/html");
	if(verify != "" && verify != "error") {
		  document.location.href = verify;
	}else{
     	 	count++;
     	 }
     	 if(count>0){
     	 	$("#propertyNotAvailable").css("display","block");
     	 }
}
function occupiedLink()
{
	document.location.href="occupied.htm";
}
var propFloat=1;
function propFeatures()
{
	$('#propFeatures').slideToggle();
	if(propFloat==1){$('#propFeatImage').attr("class","propFeatPlus");propFloat=0;}
	else{$('#propFeatImage').attr("class","propFeatMins");propFloat=1;}
}
