﻿// JScript File
function morereason(selectedmore){
    var divid = selectedmore.id
    var more0a = "A-1 Homes maintains an inventory of more that 25 new model homes and pre-owned homes.  The selection of homes presented by A-1 Homes represents pricing to meet any budget and a style for any taste.  We believe that you want to walk through, see, and touch the home you like.  At A-1 Homes, you can find a home for as little as $8,500 or a luxury model that goes for $125,000.  Any of the model homes may be purchased, or a home can be custom ordered from one of our 5 nationally known builders.  A-1 Homes represents HUD code builders and Modular code builders.  That means, whatever your zoning requirements, A-1 Homes can meet your needs in housing.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more1a = "The cost of new manufactured homes has risen $2,000 to $4,000 per year over the last 20 years.  You can be certain that every month you put off purchasing your home, you are costing yourself money.  A $4,000 increase in the cost of a $46,000 home financed over 25 years will amount to $10,000 in additional money out of your pocket over the term of your loan.<br/><br/>If your favorite home is sold before you reserve it, another home would have to be ordered from the factory and you know what that means; higher price.  When you reserve your favorite home today, you lock in the price and guarantee yourself protection against any price increase that may be imposed.  Protect your savings now.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more2a = "If you invest in a home now, you won’t have a payment due the first month.  If you invest today, not only will you be able to save that first house payment, you will also be able to save the money you usually pay in rent.  Investing in your home today will put extra money in your pocket.  By taking action now, you can take your favorite home off the market, protect your savings, and put that rent money in your pocket for a change.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more3a = "When one of A-1’s lenders has a small surplus money available for special financing (financing \"credit challenged\" borrowers), the money goes fast.  These funds are available on a first come/first served basis.  To get in on the special financing, only those people that have reserved a home and completed the application process can move quickly enough.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more4a =  "<p>A-1’s professional Housing Consultants will sit with you and show you exactly how much money a lender will loan you.  Learning what you can afford will enable you to decide what you are willing to pay.  A-1’s professional Housing Consultants will also answer your questions about credit reporting and, if you choose, perform a free financial analysis.  A-1’s professional Housing Consultants will explain the home financing process and answer all of your questions.</p>";
    var more4b =  "A-1 Homes has established close working relationships with all of the mainstream manufactured housing lenders and has close working relationships with the best real estate mortgage companies operating in the manufactured housing land and home arena.  With more than 40 financing programs available, A-1 can fit you with the most favorable financing package available today.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more5a = "When you pay for a home, your payments remain the same for the whole term of the loan.  According to the National Association of Realtors, rent increases at a rate of 10% per year.  That means if you pay $800 per month now, your rent is likely to be $880 per month next year.  At this rate, you would pay a total of $165,000 over the next 10 years.<br/><br/>  Think about this.  If you invest in a home today and the monthly payment is $800 per month, 10 years from now, you will have paid only $96,000.  That is a base savings of $69,000.  When you add in the tax benefits that could amount to $13,000 or more, that’s a savings of more than $80,000 over the next 10 years.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more6a = "If you read the information about protecting your purchasing power, then you know that there are tremendous tax benefits available to home buyers.  Many people wait to take the benefits at the end of the year.  They may not know that a home buyer may reduce the amount of tax withheld from their pay check by the amount of savings to be realized off their taxes at the end of the year.  That means that you can collect the benefit with every pay check rather than wait until the end of the year.  If you choose to take the benefits now, you will be able to invest that money and have it grow into a nice rainy day nest egg or save more for retirement.  Consult with your tax advisor to determine how home owner tax advantages may help you. <br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more7a = "You work hard for your money.  As a renter, you may sometimes wonder if you are really getting ahead in life.  Well, most people we look upon as successful or well to do are homeowners.  Many people are afraid to become a homeowner.  Some are afraid of the commitment and others are afraid that they won’t be approved for a home loan.  At A-1 Homes we understand.  Each of our professional housing consultants is fully prepared to personally guide you through the financing process.  When you make the decision to improve your life and the life of your family by investing in a home, you will feel \"rich.\"  You will realize that you have reached a milestone in your life that demonstrates a new and higher status.<br/><br/>Why deny yourself and your family the use and enjoyment of owning your favorite home as soon as possible?  As hard as you have worked, you deserve a home of your own.  Your family deserves to have a home of their own.  The time is right.  You will be proud when you make the decision to give your family a home of their own.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more8a = "Being in business more than 38 years has enabled us to know where all the great locations are.  We can help you find the perfect location for your home.  Once you become an A-1 home buyer, we will introduce you to several home sites that meet your requirements for location and amenities.  Warning:  the best home sites come on the market and are snapped up quickly.  To be ready to claim yours means that you have selected and secured your home and arranged your financing.  Don’t be caught short when the great site pops up, make it yours.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
     var more9a = "<span style='color:green;'>Manufactured homes are built in a controlled factory environment out of the weather (ever notice how site builders leave their materials out in the rain?).  The quality and quantity of materials are closely monitored to eliminate inferior components and eliminate waste (ever notice the big piles of trash around site built homes?)<br/><br/>Factory built homes are more energy efficient than site built homes, too.  Factory built homes utilize energy saving insulation packages, low E or storm windows, and tight construction techniques to create homes that require much less energy to operate than on site constructed homes.  Energy savings translate into more disposable income for you and less impact on our environment.  The sooner you move into your GREEN home, the sooner you start saving and stop throwing money at the utility company.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a></span>";
    var more10a = "All real estate is subject to Ad valorem taxes (property taxes). <u><b>For home owners, the taxes and interest are deductible from Federal Income Tax</b></u>.   This deduction from income tax creates spendable income for the home owner that offsets some of the costs of buying a home.  If the real estate is mortgaged, then the mortgage creates interest.  When you pay your rent, you are paying your Landlord’s taxes and interest on his loan.  You don’t receive any benefit for paying these taxes and interest.  In fact, the Landlord is the only one that benefits.  Think about this; when you rent, the Landlord pays his taxes and his interest with your money and then deducts what he paid from his income taxes.<br/><br/>Purchase a home and stop paying your Landlord’s taxes and interest.  Buy your home now and invest in your financial future.  Tax advantages are different for everyone and you should seek the advice of a tax professional to determine your actual benefit.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more11a = "$800 per month might get you a 970 square foot apartment in Fort Worth.  That same $800 per month would get you a 1200 square foot home and an acre of land.  In addition to more living space and land to call your own, the tax advantages will add about $150-$200 per month to your bank account.  When you rent, you are limited as to what you can do to improve your living environment.  When you own, you are limited only by your own ideas and resources.  When you own, you have the ability to improve your property and increase its value.  As you own the property, it will appreciate in value so that when you get ready to sell, you will not only recover what you have invested but also, be rewarded by the increase in value.  More room, your own land, less money; that’s what home ownership is about.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more12a = "A-1 Homes will never ask you to pay more per month than the amount the lender approves you for.  A-1 Homes will always sell you a home for less money than it will appraise for.  When you move into your A-1 Home you will have an asset that has a greater value than the liability created by the mortgage.  In other words, when you invest in an A-1 Home, you get more than your money’s worth.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    var more13a = "Is the place where you live safe?  Are the neighbors friendly?  Do your children have a safe place to play?  Are parking spaces close to your front door?  If you answered “NO” to just one of these questions, having your own home may save a life or prevent injury to you or a loved one.  With manufactured housing, you have the choice of two types of home location.  The first is the community.  The communities we do business with screen their tenants background and monitor the neighborhood. These communities are safe, family environments where families enjoy the lease community lifestyle.  The second is private property.  You can own an acre or more of Texas land and enjoy the quiet lifestyle of country living.  Our home buyers locate in some of the finest school districts in the state and enjoy the freedom and spacious lifestyle that private property provides.<br/><br/>  Let us know what you are looking for in a home. <a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'><b>Click Here...</b></a>";
    switch(divid){
        case "divmore0a":
            document.getElementById("displaydivmorea").innerHTML = more0a;
        break
        case "divmore1a":
            document.getElementById("displaydivmorea").innerHTML = more1a;
        break
        case "divmore2a":
            document.getElementById("displaydivmorea").innerHTML = more2a;
        break
        case "divmore3a":
            document.getElementById("displaydivmorea").innerHTML = more3a;
        break
        case "divmore4a":
            document.getElementById("displaydivmorea").innerHTML = more4a;
            document.getElementById("displaydivmoreb").innerHTML = "<div id='divmore4b' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>";
        break
        case "divmore4b":
            document.getElementById("displaydivmoreb").innerHTML = more4b;
        break
        case "divmore5a":
            document.getElementById("displaydivmorea").innerHTML = more5a;
        break
        case "divmore6a":
            document.getElementById("displaydivmorea").innerHTML = more6a;
        break
        case "divmore7a":
            document.getElementById("displaydivmorea").innerHTML = more7a;
        break
        case "divmore8a":
            document.getElementById("displaydivmorea").innerHTML = more8a;
        break
        case "divmore9a":
            document.getElementById("displaydivmorea").innerHTML = more9a;
        break
        case "divmore10a":
            document.getElementById("displaydivmorea").innerHTML = more10a;
        break
        case "divmore11a":
            document.getElementById("displaydivmorea").innerHTML = more11a;
        break
        case "divmore12a":
            document.getElementById("displaydivmorea").innerHTML = more12a;
        break
        case "divmore13a":
            document.getElementById("displaydivmorea").innerHTML = more13a;
        break
        default: 
            document.getElementById(divid).innerHTML = "default case";
    }            
}	

function displayinfo(selected_item){
		var idswitch = selected_item.id;
		var itemnum = idswitch.replace("label", "");
		var divitem0 = "<p class='reasonheader'>  Select from more than 25 homes and walk through the models that fit your requirements. – </p>";
		var divitem1 = "<p class='reasonheader'>  By becoming a homeowner now, you can save $5,000 to $10,000 on the cost of your home.  – </p>";	 	
		var divitem2 = "<p class='reasonheader'>  Put next month’s rent money in your pocket.  – </p>";
		var divitem3 = "<p class='reasonheader'>  Surplus funds mean loans instead of \"turn downs.\"  - </p>";
		var divitem4 = "<p class='reasonheader'>  Has anyone shown you what a lender will loan you for a new home on a monthly basis?  – </p>";
		var divitem5 = "<p class='reasonheader'>  Escape from increasing rent.  – </p>"; 
		var divitem6 = "<p class='reasonheader'>  Purchasing a home could increase your take home pay.  – </p>";
		var divitem7 = "<p class='reasonheader'>  Becoming a homeowner will make you feel \"rich.\"  – </p>";
		var divitem8 = "<p class='reasonheader'>  Choice home sites are available now.  – </p>";
		var divitem9 = "<p class='greenreasonheader'>  GREEN means more spending money in your pocket.  – </p>";
		var divitem10 = "<p class='reasonheader'>  The Internal Revenue Service will pay you to own a home.  – </p>";
		var divitem11 = "<p class='reasonheader'>  Owning costs less than renting.  – </p>";
		var divitem12 = "<p class='reasonheader'>  Buy your home for less than it is worth.  – </p>";
		var divitem13 = "<p class='reasonheader'>  Don’t be afraid anymore.  – </p>";
//		var divitem14 = "<p class='reasonheader'>  – </p>";
//		var divitem15 = "<p class='reasonheader'>  – </p>";
//		var divitem16 = "<p class='reasonheader'>  – </p>";
//		var divitem17 = "<p class='reasonheader'>  – </p>";
		var currdivitem = "displaydiv";
	
		document.getElementById("displaydivhead").innerHTML = "";
		document.getElementById("displaydivmorea").innerHTML = "";
		document.getElementById("displaydivmoreb").innerHTML = "";
		document.getElementById("displaydiv").style.backgroundColor = "White";
		
		switch (itemnum)
			{
			case "0":				
			  document.getElementById("displaydivhead").innerHTML = divitem0
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore0a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "1":
			  document.getElementById("displaydivhead").innerHTML = divitem1
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore1a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "2":
			  document.getElementById("displaydivhead").innerHTML = divitem2
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore2a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "3":
			  document.getElementById("displaydivhead").innerHTML = divitem3
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore3a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "4":
			  document.getElementById("displaydivhead").innerHTML = divitem4
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore4a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "5":
			  document.getElementById("displaydivhead").innerHTML = divitem5
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore5a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "6":
			  document.getElementById("displaydivhead").innerHTML = divitem6
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore6a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "7":
			  document.getElementById("displaydivhead").innerHTML = divitem7
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore7a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "8":
			  document.getElementById("displaydivhead").innerHTML = divitem8
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore8a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "9":
			  document.getElementById("displaydivhead").innerHTML = divitem9
			  document.getElementById("displaydivhead").style.color = "Green"
			  document.getElementById("displaydivmorea").innerHTML = "<div class='greenreasonheader' id='divmore9a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>";	  
			  break
			case "10":
			  document.getElementById("displaydivhead").innerHTML = divitem10
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore10a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "11":
			  document.getElementById("displaydivhead").innerHTML = divitem11
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore11a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break    
			case "12":
			  document.getElementById("displaydivhead").innerHTML = divitem12
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore12a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
			case "13":
			  document.getElementById("displaydivhead").innerHTML = divitem13
			  document.getElementById("displaydivmorea").innerHTML = "<div id='divmore13a' onmouseover='javascript:morereason(this)'><b>(MORE)</b></div>"
			  break
//			case "14":
//			  document.getElementById("displaydivhead").innerHTML = divitem14
//			  break
//			case "15":
//			  document.getElementById("displaydivhead").innerHTML = divitem15
//			  break
//			case "16":
//			  document.getElementById("displaydivhead").innerHTML = divitem16
//			  break
//			case "17":
//			  document.getElementById("displaydivhead").innerHTML = divitem17
//			  break
			default:
			  document.getElementById("displaydivhead").innerHTML = "";
			}				
		}
		function clearout(){
		    document.getElementById("displaydiv").innerHTML = "";
		}	
		function replacecenterlogo(){
		    document.getElementById("displaydiv").style.backgroundImage = "url(../images/bigreasons12a1logo.png)";
		}	
		function undline(labelname, action){
		    if (action == "yes"){
		        document.getElementById(labelname).style.textDecoration = "underline";
		    }      
		    else{
		    document.getElementById(labelname).style.textDecoration = "none";
		    }      
		}
		function reasonmouseover(mouseoveritem){			
			document.getElementById(mouseoveritem.id).style.backgroundColor = "White"
			document.getElementById("displaydiv").style.backgroundImage = "none"
			document.getElementById(mouseoveritem.id).style.color = "Navy"
			document.getElementById(mouseoveritem.id).style.cursor = "hand"	
			var tempstr = mouseoveritem.id.replace("cell","label")
			undline(tempstr, "yes")
		//	javascript:displayinfo(mouseoveritem)			
		}
		function reasonmouseout(mouseoveritem){			
			document.getElementById(mouseoveritem.id).style.backgroundColor = "Navy"
			document.getElementById(mouseoveritem.id).style.color = "White"	
			var tempstr = mouseoveritem.id.replace("cell","label")
			undline(tempstr, "no")
//			javascript:clearout()		
//			javascript:replacecenterlogo()
		}
//		function greenreasonmouseover(mouseoveritem){
//			document.getElementById(mouseoveritem.id).style.backgroundColor = "White"
//			document.getElementById("displaydiv").style.backgroundImage = "none"
//			document.getElementById(mouseoveritem.id).style.color = "Green"	
////			javascript:displayinfo(mouseoveritem)		
//		}
//		function greenreasonmouseout(mouseoveritem){
//		var negative = -1
//			document.getElementById(mouseoveritem.id).style.backgroundColor = "Green"
//			document.getElementById(mouseoveritem.id).style.color = "White"	
////			javascript:clearout()		
////			javascript:replacecenterlogo()
//		}
		
		
//*******************************************POP-UP FUNCTIONS*****************************		
    function rentchartpopup(){
			newWindow = window.open('rentchart.aspx','','resizable=0,scrollbars=1,width=550px,height=650px,left=0,top=0');			
			newWindow.focus();
    }
    function reasons12popup(){
	    newWindow = window.open('buytoday.aspx','','resizable=0,scrollbars=1,width=850px,height=650px,left=0,top=0');
	    newWindow.focus();
    }		
    function tdhcapopup(){
	    newWindow = window.open('http://www.tdhca.state.tx.us/mh/index.htm');
	    newWindow.focus();
    }
    function cavcopopup(){
	    newWindow = window.open('http://www.cavco.com');
	    newWindow.focus();
    }
    function championpopup(){
	    newWindow = window.open('http://www.championhomes.net');
	    newWindow.focus();
    }
    function karstenpopup(){
	    newWindow = window.open('http://www.thekarstenco.com');
	    newWindow.focus();
    }
    function fleetpopup(){
	    newWindow = window.open('http://www.fleetwoodhomes.com');
	    newWindow.focus();
    }
    function athenspopup(){
	    newWindow = window.open('http://www.athensparkhomes.com');
	    newWindow.focus();
    }		
    function benefitsownpopup(){
	    newWindow = window.open('benefitsown.aspx','','resizable=0,scrollbars=1,width=550px,height=550px,left=0,top=0');
	    newWindow.focus();
    }
    function prequalifypopup(){
	    newWindow = window.open('https://secure5.m6.net/a1homesfw/disclosure162.aspx','','resizable=1,scrollbars=1,status=1,width=950px,height=650px,left=0,top=0');
	    newWindow.focus();
    }		
    function managerspecialpopup(){
	    newWindow = window.open('managerspecial/managerspecial.htm','','resizable=1,scrollbars=1, menubar=1, toolbar=0, width=550px,height=550px,left=0,top=0');
	    newWindow.focus();
    }		
    function catalogpopup(){
	    newWindow = window.open('catalog/homescatalog.aspx','','resizable=1,scrollbars=1, menubar=0, toolbar=0, width=710px,height=600px,left=0,top=0');
	    newWindow.focus();
    }
    function newsletterpopup(){
	    newWindow = window.open('managerspecial/newsletter.htm','','resizable=1,scrollbars=1, menubar=1, toolbar=0, width=550px,height=550px,left=0,top=0');
	    newWindow.focus();
    }	
    function stepsownershippopup(){
	    newWindow = window.open('stepsownership.aspx','','resizable=0,scrollbars=0,width=800px,height=450px,left=0,top=0');
	    newWindow.focus();
    }
	function careerspopup(){
	    newWindow = window.open('http://www.a1homes.com/insidepages/caropp.htm','','resizable=1,scrollbars=1, menubar=1, toolbar=0, width=800px,height=600px,left=0,top=0');
	    newWindow.focus();
    }	
//***************************************TEST FUNCTIONS*********************				
    function checkfunc(stringpassed){
    var functest = stringpassed.id;
    alert(functest);
}

    function showGmap(){    
        newWindow = window.open('gglmap.aspx','','resizable=0,scrollbars=0, menubar=1, toolbar=0, width=675px,height=625px,left=0,top=0');
	    newWindow.focus();
}

    function initialize() {
      if (GBrowserIsCompatible()) {
        var window_html = "<span style='font-family:Tahoma'><span style='color:Red;'>A-1 Homes Fort Worth</span><br/>(817) 246-6900<br/>1200 W. Loop 820<br/>Fort Worth, TX 76108<br/>Exit@ Silver Creek</span><br/><a href='https://prequalify.c6.ixwebhosting.com/Default2.aspx'>Pre-Qualify Today!</a>"
        var map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(32.77486270272197, -97.47336387634277), 13);
        var marker = new GMarker(new GLatLng(32.77486270272197, -97.47336387634277));
        
//        GEvent.addListener(marker, 'click', function() {
//        marker.openInfoWindowHtml(window_html)});
        map.addOverlay(marker);
        marker.openInfoWindowHtml(window_html);
        
//        map.openInfoWindow(map.getCenter(), document.createTextNode("A-1 Homes FortWorth (817) 246-6900 1200 W. Loop 820 Fort Worth, TX 76108 Exit Silver Creek"));
map.setZoom(15);
      }
    }