/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var ImageInfo = new Array();

    //ImageInfo.push({name:'menu',ImageOn:'#ADAA89',ImageOff:'#ADAA89', Header:'Default HEADER',DescText:'blah blah'});
    //ImageInfo.push({name:'I1',ImageOn:'Images/on1.jpg',ImageOff:'Images/off1.jpg', MainImage:'Images/main1.jpg', Header:'Broken Feather',DescText:'This is text for the first image.  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer.'});
    //ImageInfo.push({name:'I2',ImageOn:'Images/on2.jpg',ImageOff:'Images/off2.jpg', MainImage:'Images/main2.jpg', Header:'HEADER 2',DescText:'This is text for the second image.  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer.'});
    //ImageInfo.push({name:'I3',ImageOn:'Images/on3.jpg',ImageOff:'Images/off3.jpg', MainImage:'Images/main3.jpg', Header:'HEADER 3',DescText:'This is text for the third image.  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer.'});
    //ImageInfo.push({name:'I4',ImageOn:'Images/on4.jpg',ImageOff:'Images/off4.jpg', MainImage:'Images/main4.jpg', Header:'HEADER 4',DescText:'This is text for the fourth image.  Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id pulvinar odio lorem non turpis. Nullam sit amet enim. Suspendisse id velit vitae ligula volutpat condimentum. Aliquam erat volutpat. Sed quis velit. Nulla facilisi. Nulla libero. Vivamus pharetra posuere sapien. Nam consectetuer.'});

var TeamInfo = new Array();
var imageonnum = 1;
var onTM = 1;

var CommunityInfo = new Array();
var onCM = 1;

/*//Contents for menu 1
var menu1=new Array();
menu1[0]='<span><img src="Assets/subnavspacer.jpg" height="5px"></span>';
menu1[1]='<a href="http://www.freewarejava.com" nowrap>Company Overview</a>';
menu1[2]='<a href="http://codingforums.com" nowrap>The Team</a>';
menu1[3]='<a href="http://www.cssdrive.com" nowrap>Strategic Partners</a>';
menu1[4]='<a href="http://www.cssdrive.com" nowrap>Testimonials</a>';
menu1[5]='<a href="http://www.cssdrive.com" nowrap>Employment</a>';
menu1[6]='<img src="Assets/subnavbottom.gif" height="20">';

var menu2=new Array();
menu2[0]='<span><img src="Assets/subnavspacer.jpg" height="5px"></span>';
menu2[1]='<a href="http://www.freewarejava.com" nowrap>Overview</a>';
menu2[2]='<a href="http://codingforums.com" nowrap>News & Info</a>';
menu2[3]='<a href="http://www.cssdrive.com" nowrap>Our Communities</a>';
menu2[4]='<a href="http://www.cssdrive.com" nowrap>Financing</a>';
menu2[5]='<a href="http://www.cssdrive.com" nowrap>FAQs</a>';
menu2[6]='<a href="http://www.cssdrive.com" nowrap>Customer Service</a>';
menu2[7]='<img src="Assets/subnavbottom.gif" height="20">';

var menu3=new Array();
menu3[0]='<span><img src="Assets/subnavspacer.jpg" height="5px"></span>';
menu3[1]='<a href="http://www.cssdrive.com" nowrap>The Process</a>';
menu3[2]='<a href="http://www.cssdrive.com" nowrap>Portfolio</a>';
menu3[3]='<a href="http://www.cssdrive.com" nowrap>Testimonials/Awards</a>';
menu3[4]='<a href="http://www.cssdrive.com" nowrap>Customer Service</a>';
menu3[5]='<a href="http://www.cssdrive.com" nowrap>Financing</a>';
menu3[6]='<a href="http://www.cssdrive.com" nowrap>FAQs</a>';
menu3[7]='<a href="http://www.freewarejava.com" nowrap>Client Login</a>';
menu3[8]='<img src="Assets/subnavbottom.gif" height="20">';

//Contents for menu 2, and so on
var menu4=new Array();
menu4[0]='<span><img src="Assets/subnavspacer.jpg" height="5px"></span>';
menu4[1]='<a href="http://cnn.com" nowrap>Overview</a>';
menu4[2]='<a href="http://msnbc.com" nowrap>We buy Land</a>';
menu4[3]='<img src="Assets/subnavbottom.gif" height="20">';

//Contents for menu 2, and so on
var menu5=new Array();
menu5[0]='<span><img src="Assets/subnavspacer.jpg" height="5px"></span>';
menu5[1]='<a href="http://cnn.com" nowrap>Inquiry Form</a>';
menu5[2]='<a href="http://msnbc.com" nowrap>Customer Service</a>';
menu5[3]='<a href="http://msnbc.com" nowrap>Location</a>';
menu5[4]='<img src="Assets/subnavbottom.gif" height="20">';
*/
		
var menuwidth='180px'; //default menu width
var menubgcolor='lightyellow';  //menu bgcolor
var disappeardelay=1250;  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes"; //hide menu when user clicks within menu?
var SelMenuNum;
var SelSubMenuNum;/////No further editting needed

var ie4=document.all;
var ns6=document.getElementById&&!document.all;
if (ie4||ns6)
    document.write('<div id="dropmenudiv" nowrap style="visibility:hidden;width:'+menuwidth+';height:22;" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
    var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
    var parentEl=what.offsetParent;
    while (parentEl!=null){
        totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
        parentEl=parentEl.offsetParent;
    }
    return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
    if (ie4||ns6)
        dropmenuobj.style.left=dropmenuobj.style.top=-500;
    if (menuwidth!=""){
        dropmenuobj.widthobj=dropmenuobj.style;
        dropmenuobj.widthobj.width=menuwidth;
    }
    if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
        obj.visibility=visible;
    else if (e.type=="click")
        obj.visibility=hidden;
}

function iecompattest(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function clearbrowseredge(obj, whichedge){
    var edgeoffset=0;
    if (whichedge=="rightedge"){
        var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15;
        dropmenuobj.contentmeasure=dropmenuobj.offsetWidth;
        if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
            edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth;
    }
    else{
    var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset;
    var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
    dropmenuobj.contentmeasure=dropmenuobj.offsetHeight;
    if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
        edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight;
    if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
        edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge;
    }
}
return edgeoffset;
}

function populatemenu(what){
    if (ie4||ns6)
        dropmenuobj.innerHTML=what.join("");
}

function dropdownmenudelay(obj, e, menucontents, menuwidth){
    hidemenu();
    dropdownmenu(obj, e, menucontents, menuwidth);
   // setTimeout("dropdownmenu(" + obj + ", " + e + ", " + menucontents + ", " + menuwidth +")",1);
}
function dropdownmenu(obj, e, menucontents, menuwidth){
    if (typeof mainmenuobj!="undefined")
    {
        if (mainmenuobj.id.toString()==SelMenuNum){
            mainmenuobj.className='navcellsel';
        }    
        else{
            mainmenuobj.className='navcelloff';
        }
    }
    menuwidth = obj.clientWidth.toString()+'px';
    if (window.event) event.cancelBubble=true
    else if (e.stopPropagation) e.stopPropagation()
        clearhidemenu();
    dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv;
    populatemenu(menucontents);

    if (ie4||ns6){
        showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth);
        dropmenuobj.x=getposOffset(obj, "left");
        dropmenuobj.y=getposOffset(obj, "top");
        dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px";
        dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px";
}

return clickreturnvalue()
}

function clickreturnvalue(){
    if (ie4||ns6) return false
    else return true
}

function contains_ns6(a, b) {
    while (b.parentNode)
        if ((b = b.parentNode) == a)
            return true;
    return false;
}

function dynamichide(e){
    if (ie4&&!dropmenuobj.contains(e.toElement))
        delayhidemenu();
    else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
        delayhidemenu();

}

function hidemenu(e){
    if (typeof dropmenuobj!="undefined"){
        if (ie4||ns6){
            dropmenuobj.style.visibility="hidden";
        }
    }
    if (typeof mainmenuobj!="undefined"){
        if (mainmenuobj.id.toString()==SelMenuNum){
            mainmenuobj.className='navcellsel';
        }    
        else{
            mainmenuobj.className='navcelloff';
        }
    }
}

function delayhidemenu(){
        //m1.style.className='navcelloff';
    if (ie4||ns6)
        delayhide=setTimeout("hidemenu()",disappeardelay);
        //m1.className='navcelloff';

}

function clearhidemenu(){
    if (typeof delayhide!="undefined")
        clearTimeout(delayhide);
}

function setmenu(obj){
    mainmenuobj=obj;

}

function onMenu(numobj){
    SelMenuNum = numobj;
}


if (hidemenu_onclick=="yes")
    document.onclick=hidemenu;

 
function ImageOver(num)
{
    if(num!=imageonnum)
    {
        var myobj=document.getElementById(ImageInfo[num].name);
        var myOnImage=ImageInfo[num].ImageOn;
        myobj.src=myOnImage;
    }
}

function ImageOff(num)
{
    if(num!=imageonnum)
    {
        var myobj=document.getElementById(ImageInfo[num].name);
        var myOffImage=ImageInfo[num].ImageOff;
        myobj.src=myOffImage;
    }
}
   
function SetImage(num){
    var mybigobj=document.getElementById('portfolioimage');
    var myobj=document.getElementById(ImageInfo[num].name);
    var myoldobj=document.getElementById(ImageInfo[imageonnum].name);
    var myHeaderObj=document.getElementById('pheader');
    var myDescriptionObj=document.getElementById('pdescr');
    var myOnImage=ImageInfo[num].ImageOn;
    var myOldOnImage=ImageInfo[imageonnum].ImageOff;
    var myMainImage=ImageInfo[num].MainImage;
    var myHeader=ImageInfo[num].Header;
    var myDescription=ImageInfo[num].DescText;
    myoldobj.src=myOldOnImage;
    myoldobj.className='imagemenu';
    mybigobj.src=myMainImage;
    myobj.src=myOnImage;
    imageonnum = num;
    myobj.className='imagemenuon';
    myHeaderObj.innerHTML=myHeader;
    myDescriptionObj.innerHTML=myDescription;
}

function SetTeamMember(num){
    var myTM=document.getElementById(TeamInfo[onTM].id);
    var myImgobj=document.getElementById('MImage');
    var myNameObj = document.getElementById('MName');
    var myTitleObj = document.getElementById('MTitle');
    var myDescObj = document.getElementById('MDescription');
    var myEmailObj = document.getElementById('MEmail');
    var myName=TeamInfo[num].name;
    var myTitle=TeamInfo[num].title;
    var myImg=TeamInfo[num].image;
    var myDesc=TeamInfo[num].description;
    var tempemail=TeamInfo[num].email;
    var myEmail="<a href='mailto:" + tempemail + "' class='link'>" + tempemail + "</a>";
    myTM.className='Biglink';
    onTM = num
    myTM=document.getElementById(TeamInfo[num].id);
    myTM.className='Biglinkon';
    myNameObj.innerHTML=myName;
    myTitleObj.innerHTML=myTitle;
    myImgobj.src=myImg;
    myDescObj.innerHTML=myDesc;
    myEmailObj.innerHTML=myEmail;
}

function initCommunity()
{

    
    CommunityInfo.push({id:'member0',name:'name',title:'sir',description:'blah blah',image:'assets/spacer.gif',email:'me@me.com'});

    CommunityInfo.push({id:'member1',name:'Highland Place - Now Open!',title:'Northwest Reno', description:'1442 SF to 1858 SF<br />For more information please contact the Community Sales Manager at 775-746-0730<br /><a href="downloads/OurStory.pdf" target="_blank" class="link">Our Story</a><br /><a href="downloads/Features.pdf" target="_blank" class="link">Features</a><br /><a href="downloads/floorPlans&Elev.pdf" target="_blank" class="link">Floor Plans & Elevations</a><br /><br />Click <a href="location.aspx#highlandPlace" class="link">[Here]</a> for directions', image:'Images/HighlandPlaceLogo.gif'}); 

    CommunityInfo.push({id:'member2',name:'The Ledges at Somersett',title:'Now Open!', description:'Approximately 3052 SF - 3588 SF<br />For more information please contact the Community Sales Manager at 775-747-4915<br /><a href="downloads/ledgesFeatures.pdf" target="_blank" class="link">Features</a><br /><a href="downloads/ledgesBuilder.pdf" target="_blank" class="link">Builder\'s Story</a><br /><a href="downloads/ledgesResidence1.pdf" target="_blank" class="link">Residence 1</a><br /><a href="downloads/ledgesResidence2.pdf" target="_blank" class="link">Residence 2</a><br /><a href="downloads/ledgesResidence3.pdf" target="_blank" class="link">Residence 3</a><br /><br />Click <a href="location.aspx#theLedges" class="link">[Here]</a> for directions', image:'Images/ledges_logo.gif'}); 

    CommunityInfo.push({id:'member3',name:'Bella Terra',title:'Built by West Haven Development Group', description:'From the mid $900,000\'s<br /><a href="downloads/Bellaterra_residence1.pdf" target="_blank" class="link">Bella Terra Residence 1</a><br /><a href="downloads/Bellaterra_residence2.pdf" target="_blank" class="link">Bella Terra Residence 2</a><br /><a href="downloads/Bellaterra_residence3.pdf" target="_blank" class="link">Bella Terra Residence 3</a><br />Click <a href="location.aspx#bellaTerra" class="link">[Here]</a> for directions<br>For more information please call the sales office at 775-852-9100', image:'Images/BellaterraLogoNew.gif'});

    CommunityInfo.push({id:'member4',name:'Cantabria',title:'Coming Soon Summer 2007!', description:'1245 SF to 1722 SF <br />For more information please call 775.850.7999 <br /> <a href="downloads/Cantabria_elevations.pdf" target="_blank" class="link">Cantabria Plan Color Elevations</a><br />Click <a href="http://64.4.51.249/att/GetAttachment.aspx?file=28229b19-a7f3-42f7-b888-5819b789bfa8.mht&ct=YXBwbGljYXRpb24vb2N0ZXQtc3RyZWFt&name=TWFwIG9mIFNpZXJyYSBIaWdobGFuZHMgRHIgJiBXIDd0aCBTdCBSZW5vLCBOViBieSBNYXBRdWVzdC5taHQ_3d&inline=0&rfc=0&empty=False&hm__login=ryan&hm__domain=ryantahoerealtor.com&ip=10.1.106.204&d=d815&mf=20&hm__ts=Thu%2c%2022%20Mar%202007%2021%3a35%3a45%20GMT&hm__ha=fa50f926cda0cd832ab54d1a0093f32be21dfd94&oneredir=1" target="_blank" class="link">[Here]</a> for directions', image:'Images/Cantabria_Logo_Stacked.gif'}); 

    CommunityInfo.push({id:'member5',name:'Creekwood Estates - Coming Soon!',title:'Fernley', description:' 1852 SF to 2456 SF<br />From the low $200,000\'s<br /><a href="downloads/Creekwood_1831elevation.pdf" target="_blank" class="link">Creekwood Plan 1831 Elevations</a><br /><a href="downloads/Creekwood_2180elevation.pdf" target="_blank" class="link">Creekwood Plan 2180 Elevations</a><br /><a href="downloads/Creekwood_2496elevation.pdf" target="_blank" class="link">Creekwood Plan 2496 Elevations</a><br />Click <a href="location.aspx#creekwood"link">[Here]</a> for directions', image:'Images/CreekwoodLogo.gif'}); 

    CommunityInfo.push({id:'member6',name:'Royal Ridge - Coming Soon!',title:'Truckee', description:'From the low $400,000\'s<br /> <a href="downloads/RoyalRidgeConceptual.pdf" target="_blank" class="link">Royal Ridge Conceptual</a><br /> Click <a href="location.aspx#royalRidge" class="link">[Here]</a> for directions', image:'Images/RoyalRidgeLogo.gif'}); 
    
    SetCommunityMember(1);
}

function SetCommunityMember(num){
    var myCM=document.getElementById(CommunityInfo[onCM].id);
    var myImgobj=document.getElementById('CImage');
    var myNameObj = document.getElementById('CName');
    var myTitleObj = document.getElementById('CTitle');
    var myDescObj = document.getElementById('CDescription');
    //var myLinkObj = document.getElementById('CLink');
    var myName=CommunityInfo[num].name;
    var myTitle=CommunityInfo[num].title;
    var myImg=CommunityInfo[num].image;
    var myDesc=CommunityInfo[num].description;
    //var tempLink=CommunityInfo[num].link;
    //var myLink="Click <a href="" + tempLink + "" target="_blank" class="link">[Here]</a> for directions";
    myCM.className='Biglink';
    onCM = num
    myCM=document.getElementById(CommunityInfo[num].id);
    myCM.className='Biglinkon';
    myNameObj.innerHTML=myName;
    myTitleObj.innerHTML=myTitle;
    myImgobj.src=myImg;
    myDescObj.innerHTML=myDesc;
    //myLinkObj.innerHTML=myLink;
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function closeme() {
	window.close();
}