// JavaScript Document

//' --------------------------------------------------------------------------
//' BEGIN functions used by, "CustomerInformation.asp":
//' --------------------------------------------------------------------------
function autoFill(o)
{
	with(o)
	{
		FName.value = "David" ;
		LName.value = "Bishop" ;
		WorkPhone.value = "425.482.1057" ;
		HomePhone.value = "425.482.0377" ;
		Email.value = "bio.dizzl@gmail.com" ;
		BestContactMethod.value = "email me at home" ;
		HowReferred.value = "my friend, Joe" ;
		Address1.value = "8902 222 St SE" ;
		Address2.value = "Apartment 4F" ;
		City.value = "Woodinville" ;
		_state.value = "WA" ;
		ZipCode.value = "98077-8049" ;
		County.value = "Snohomish" ;
		_propertyType.value = "Land" ;
		_bedroomType.value = "4+ bedrooms" ;
		_bathroomType.value = "2 bedrooms" ;
		_garageType.value = "3+ car" ;
		_currentlyListed.value = "Yes" ;
		AskingPrice.value = "899,000" ;
		_occupied.value = "Yes" ;
		comments.value = "These are my comments, meaningless as they may be." ;
	}
}

//' this is text code:
function chooseRadio(o, sTarget)
{
	sTarget.value = o.value ;
	alert(sTarget.value) ;
}

function fixNewCustomerInfo(o)
{
	with(o)
	{
/*
		if(FName.value == "") FName.value = "-" ;
		if(LName.value == "") LName.value = "-" ;						
		if(HomePhone.value == "") HomePhone.value = "-" ;
		if(WorkPhone.value == "") WorkPhone.value= "-" ;				
		if(Email.value == "") Email.value= "-" ;					
		if(Address1.value == "") Address1.value= "-" ;
		if(Address2.value == "") Address2.value= "-" ;
		if(City.value == "") City.value= "-" ;
//'		if(_state.value == "") _state.value= "-" ;
		if(ZipCode.value == "") ZipCode.value= "-" ;
		if(BestContact.value == "") BestContact.value= "-" ;
		if(HowReferred.value == "") HowReferred.value= "-" ;
		if(County.value == "") County.value= "-" ;
//'		if(_propertyType.value == "") _propertyType.value= "-" ;
//'		if(_bedroomType.value == "") _bedroomType.value= "-" ;
//'		if(_bathroomType.value == "") _bathroomType.value= "-" ;
//'		if(_garageType.value == "") _garageType.value= "-" ;
//'		if(_currentlyListed.value == "") _currentlyListed.value= "-" ;
		if(AskingPrice.value == "") AskingPrice.value= "-" ;
//'		if(_occupied.value == "") _occupied.value= "-" ;
		if(comments.value == "") comments.value= "-" ;
*/
		submit() ;
		window.close() ;
	}
}

function fixNewVIPInfo(o)
{
	with(o)
	{
/*
		if(FName.value == "") FName.value = "-" ;
		if(LName.value == "") LName.value = "-" ;						
		if(HomePhone.value == "") HomePhone.value = "-" ;
		if(WorkPhone.value == "") WorkPhone.value= "-" ;				
		if(Email.value == "") Email.value= "-" ;					
		if(Address1.value == "") Address1.value= "-" ;
		if(Address2.value == "") Address2.value= "-" ;
		if(City.value == "") City.value= "-" ;
//'		if(_state.value == "") _state.value= "-" ;
		if(ZipCode.value == "") ZipCode.value= "-" ;
		if(BestContact.value == "") BestContact.value= "-" ;
		if(HowReferred.value == "") HowReferred.value= "-" ;
		if(County.value == "") County.value= "-" ;
//'		if(_propertyType.value == "") _propertyType.value= "-" ;
//'		if(_bedroomType.value == "") _bedroomType.value= "-" ;
//'		if(_bathroomType.value == "") _bathroomType.value= "-" ;
//'		if(_garageType.value == "") _garageType.value= "-" ;
//'		if(_currentlyListed.value == "") _currentlyListed.value= "-" ;
		if(AskingPrice.value == "") AskingPrice.value= "-" ;
//'		if(_occupied.value == "") _occupied.value= "-" ;
		if(comments.value == "") comments.value= "-" ;
*/
		submit() ;
		window.close() ;
	}
}

//' --------------------------------------------------------------------------
//' END functions used by, "CustomerInformation.asp":
//' --------------------------------------------------------------------------

function navRollOver(o) 
{
	o.style.cursor = "pointer" ;
	o.style.color = "#F30" ;	
}

function navRollOut(o)
{
	o.style.cursor = "default" ;
	o.style.color = "#CCC" ;	
}

function navGoHere(sLinkName) 
{
	switch( sLinkName.toUpperCase() )
	{
		case "HOME" :
			window.navigate("default.asp") ;
			break ;
		case "ABOUT US" :
			window.navigate("about.asp") ;
			break ;
		case "FAQ" :
			window.navigate("faq.asp") ;
			break ;
		case "CONTACT US" :
			window.navigate("mailto:sales@fastbuyhomes.com") ;
			break ;
		case "JOIN VIP INVESTORS" :
			window.navigate("vip.asp") ;
			break ;
		default :
	}
}

	// ------------------------------------------------------------------------------------
	// openWindow
	// ------------------------------------------------------------------------------------
	// Parameter List:
	//
	//	• sURL			string -- the url of the file whose contents to display in the new window
	//	• nWidth		number -- the width of the new window in pixels
	//	• nHeight		number -- the height of the new window in pixels
	// 	• bResizable	boolean -- 0 or 1, indicates if the window is to be resizable 
	// 	• bStatus		boolean -- 0 or 1, indicates if the window is to have a status bar
	// 	• bMenubar		boolean -- 0 or 1, indicates if the window is to have a menu bar
	// 	• bToolbar		boolean -- 0 or 1, indicates if the window is to have a tool bar 
	// ------------------------------------------------------------------------------------
	// Remarks:
	//
	//	• Creates a new window and puts the contents of the file found at sURL in the window.
	//	• Has options preset regarding the window's menus, toolbars, etc. 
	//	• Centers the new window on the screen.
	// ------------------------------------------------------------------------------------
	// Requirements:
	//
	//	•
	// ------------------------------------------------------------------------------------
	// History:
	//
	//	• 03.06.2002 -- threedeadflies@hotmail.com -- wrote the function
	// ------------------------------------------------------------------------------------
	//
	function openWindow( sURL, nWidth, nHeight, bResizable, bStatus, bMenubar, bToolbar, bScrollbars, nTop, nLeft, sWindowName) 
	{ 
		var n_Left = 0 ;
		var n_Top = 0 ;
		var i = 0 ;
		
		// if a 'LEFT' value is received, apply it to the window location:
		if(nLeft || (nLeft == 0) )
		{
			n_Left = nLeft ;
		}
		else
		{
			n_Left = ( screen.availWidth - ((nWidth)?nWidth:700) ) / 2  ;  
		}
		
		// if a 'TOP' value is received, apply it to the window location:
		if(nTop || (nTop == 0) )
		{
			n_Top = nTop ;
		}
		else
		{
			n_Top = ( screen.availHeight - ((nHeight)?nHeight:600) ) / 2 ; 
		}
		return( window.open( sURL, (sWindowName?sWindowName:"bananahead"), "resizable=" + ((bResizable)?bResizable:0) + ", status=" + ((bStatus)?bStatus:0) + ", menubar=" + ((bMenubar)?bMenubar:0) + ", toolbar=" + ((bToolbar)?bToolbar:0) + ", left=" + n_Left + ", top=" + n_Top + ", width=" + nWidth + ", height=" + nHeight + ", scrollbars=" + ((bScrollbars)?bScrollbars:0), true ) ); 
	} 

	// ------------------------------------------------------------------------------------
	// click()
	// ------------------------------------------------------------------------------------
	// Purpose:
	//
	//	• to post a message to the client when the user right-clicks on the page
	// ------------------------------------------------------------------------------------
	// Parameter List:
	//
	//	• e				string -- this is an optional parameter -- it's a Netscape thing 
	// ------------------------------------------------------------------------------------
	// Remarks:
	//
	//	• This piece of code is used to attempt to fool the client user into believing that 
	//		he can't take the pictures on the page or extract the code on the page. He can. 
	//		But you can use this code to try to convince him that he can't.
	//	• Deliver the header of the page to the client, then insert about 100 hard returns.
	//		This will cause the "Source Code" (usually viewed in Notepad) to "disappear".
	//		It hasn't really disappeared. It's below the 100 hard returns and therefore off
	//		the Notepad window's dimensions. 
	// ------------------------------------------------------------------------------------
	// Requirements:
	//
	//	•
	// ------------------------------------------------------------------------------------
	// Sources:
	//
	//	• www.lasd.org
	// ------------------------------------------------------------------------------------
	// History:
	//
	//	• 03.06.2002 -- threedeadflies@hotmail.com -- wrote the function
	//	• 02.26.2009 -- bio.dizzl@gmail.com -- modified the message for Brown &amp; Tate, Inc.
	// ------------------------------------------------------------------------------------
	//
	function click(e) 
	{
		var sMsg = "All images and content on this page are the exclusive\n" ;
		sMsg += "property of and copyright protected by\n" ;
		sMsg += "Brown &amp; Tate, Inc. and Fast Buy Homes.\n\n" ;
		sMsg += "Use of anything on this page is expressly forbidden\n" ;
		sMsg += "without the express written permission of Brown &amp; Tate, Inc."
		if( document.all ) 
		{
			if( event.button == 2 )  
			{
				alert( sMsg ) ;
				return( false ) ;
			}
		}
		if( document.layers ) 
		{
			if( e.which == 3 ) 
			{
				alert( sMsg ) ;
				return( false ) ;
			}
		}
	}

	if( document.layers ) 
	{
		document.captureEvents( Event.MOUSEDOWN ) ;
	}
	document.onmousedown = click ;
	

