// JavaScript Document
var stateUrl="http://www.tollbrothers.com/homesearch/servlet/HomeSearch?app="
var communityUrl="http://www.tollbrothers.com/homesearch/servlet/HomeSearch?app=community_description&comm_num=";
var modelUrl="http://www.tollbrothers.com/homesearch/servlet/HomeSearch?app=model_description&plan_id=";


//tests for specified version of flash
//plugin==0 -they don't have latest, plugin==1 -they do have latest.
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
var flashVersionToCheckFor = 8;
if ( plugin ) {
	//put version to test for...
	plugin = parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= flashVersionToCheckFor;
}

else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
	document.write('<SCRIPT LANGUAGE=VBScript> \n');
	document.write('on error resume next \n');
	//put version to test for...
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+flashVersionToCheckFor+'")))\n');
	document.write('</SCRIPT\>\n');
}
//end flash detect
function tollPopup(tollUrlType, code) {
	var theUrl='';
	var x;
	if(tollUrlType=="community"){
		theUrl = communityUrl+code;
	}else if(tollUrlType=="model"){
		theUrl = modelUrl+code;
	}
	x=window.open(theUrl,'windgateRanchPopUp');
	x.focus();
}
function popup(theUrl) {
	var x;
	x=window.open(theUrl,'windgateRanchPopUp');
	x.focus();
}
function statePopUp(stateString){
	var x;
	x=window.open(stateUrl+stateString,'windgateRanchPopUp');
	x.focus();
	
	
}