var slide_10 = new Image();
slide_10.src = "./img/slide-1.png";
var slide_11 = new Image();
slide_11.src = "./img/slide-1.jpg";


var slide_20 = new Image();
slide_20.src = "./img/slide-2.png";
var slide_21 = new Image();
slide_21.src = "./img/slide-2.jpg";



var slide_30 = new Image();
slide_30.src = "./img/slide-3.png";
var slide_31 = new Image();
slide_31.src = "./img/slide-3.jpg";







var slide_40 = new Image();
slide_40.src = "./img/slide-4.png";
var slide_41 = new Image();
slide_41.src = "./img/slide-4.jpg";



var slide_5l0 = new Image();
slide_5l0.src = "./img/slide-5.png";
var slide_5l1 = new Image();
slide_5l1.src = "./img/slide-5.jpg";





var startList = function() {
	if (document.all&&document.getElementById){
		navRoot = document.getElementById("topmenu");
		for (i=0; i<navRoot.childNodes.length; i++){
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI"){
				node.onmouseover=function(){
					this.className+=" over";
				}
				node.onmouseout=function(){
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function imgSwap(el, on){
	var id = el.getAttribute('id');
	var img = el.getElementsByTagName('img')[0];
	if(on == 1){
		img.src = eval(id + '1').src;
	}
	else{
		img.src = eval(id + '0').src;
	}
}

function showTitle(el, on){
	var t, n;
	if(on == 1){
		t = el.getElementsByTagName('img')[0].getAttribute('title');
	}
	else{
		t = '';
	}
	n = document.createTextNode(t);
	document.getElementById('label').childNodes[0].nodeValue = n.nodeValue;
}

function showFS(on){
	if(on == 1){
		v = 'visible';
	}
	else{
		v = 'hidden';
	}
	document.getElementById('fashionshow').style.visibility = v;
}

var start = new Array(64,55,51);
var end = new Array(191,171,144);

var diff = new Array(end[0] - start[0], end[1] - start[1], end[2] - start[2]);

var steps = 10;

var inc = new Array(parseInt(diff[0] / steps), parseInt(diff[1] / steps), parseInt(diff[2] / steps));

var colors = new Array();
var divcolor = new Array();
	
function divColors(){
	colors[0] = start[0].toString(16) + start[1].toString(16) + start[2].toString(16);
	
	for(var i = 1; i < steps; i++){
		var temp = new Array();
		for(var j = 0; j <= 2; j++){
			if(diff[j] > 0){
				temp[j] = start[j] + (inc[j] * i);
			}
			else{
				temp[j] = start[j] - (inc[j] * i);
			}
		}
		colors[i] = temp[0].toString(16) + temp[1].toString(16) + temp[2].toString(16);
	}
	
	colors[colors.length] = end[0].toString(16) + end[1].toString(16) + end[2].toString(16);
	
	for(c in colors){
		var bg = '#' + colors[c].toString(); //.replace(/,/g, '');
		divcolor[c] = bg;
	}
}

var currFade = 0;
var fadePos = new Boolean(false);
var fadeI = null;
var fadeO = null;
var canFade = new Boolean(true);
var delay = 50;

function fadeIn() {
	fadeO = null;
	if (currFade < (steps)) {
		currFade++;
		setFade(currFade);
	}
	else {
		if (currFade == (steps)) {
			window.clearInterval(fadeI);
			fadeI = null;
		}
	}
}
	
function fadeOut() {
	fadeI = null;
	if (currFade > 0) {
		currFade--;
		setFade(currFade);
	}
	else {
		if (currFade == 0) {
			window.clearInterval(fadeO);
			fadeO = null;
		}
	}
}

function ckFade(b){
	if(canFade) {
		if(b){
			if(fadeO != null){window.clearInterval(fadeO);}
			fadePos = b;
			fadeI = window.setInterval('fadeIn()', delay);
		}
		else{
			if(fadeI != null){window.clearInterval(fadeI);}
			fadePos=false;
			fadeO = window.setInterval('fadeOut()', delay);
		}
	}
	else{
		c = b ? 0 : divcolor.length - 1;
		setFade(c);
	}
}

function setFade(currFade){
	document.getElementById('fashionshow').style.visibility = (currFade == 0 ? 'hidden' : 'visible');
	document.getElementById('fashionshow').style.backgroundColor = divcolor[currFade];
	return true;
}


function fade(el, on){
	for(i = 0; i < window.divcolor.length; i++){
		f = window.setInterval("setBG(i)", 100);
	}
}
function setBG(c){
	document.getElementById('fashionshow').style.backgroundColor = window.divcolor[c];
}

function menu_Init(){
	startList();
	divColors();
}

window.onload = menu_Init; 











/////////////////////////


function MENU()
{
    document.open();


 document.writeln("<DIV id=topmenuwrap>");
 document.writeln("<UL id=topmenu>");        
    

  document.writeln("<LI><A href=#>Listings</A>");
  document.writeln("<UL>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/filterarmlsresi_54503.cfm>[+] Our Featured Listings</A></LI>");
  
    document.writeln("<LI><A target='frame_search' href=http://www.mlsfinder.com/az_mls/brianculhane/index.cfm?action=newsearchsession&searchtype=zip_code&zip_code=85001,85002,85003,85004,85005,85006,85007,85008,85009,85010,85011,85012,85013,85014,85015,85016,85017,85018,85019,85020,85021,85022,85023,85024,85025,85026,85027,85028,85029,85030,85031,85032,85033,85034,85035,85036,85037,85038,85039,85040,85041,85042,85043,85044,85045,85046,85048,85050,85051,85053,85054,85055,85060,85061,85062,85063,85064,85065,85066,85067,85068,85069,85070,85071,85072,85073,85074,85075,85076,85077,85078,85079,85080,85082,85085,85086,85098,85099&max_price=999999>[+] Other Listings</A></LI>");  

  document.writeln("<LI><A  target='frame_search' href=http://armls1069.vstone.com/searcharmlsresi_54491.cfm>[+] Residential Search</A></LI>");

  
  document.writeln("<LI><A  target='frame_search' href=http://armls1069.vstone.com/searcharmlsland_54494.cfm>[+] Land & Lots Search</A></LI>");  
  
  
  document.writeln("<LI><A  target='frame_search' href=http://armls1069.vstone.com/searcharmlsrent_54497.cfm>[+] Rental Property Search</A></LI>");  
    
  
  document.writeln("<LI><A  target='frame_search' href=http://www.mlsfinder.com/az_mls/brianculhane/index.cfm?map_tl_lat=33.689405&map_tl_lng=-112.354344&map_br_lat=33.270778&map_br_lng=-111.688899>[+] Phoenix MLS MAP Search</A></LI>");


  
  document.writeln("</UL></LI>");



 document.writeln("<LI><A href=#>Properties</A>");
  document.writeln("<UL><small>");
  document.writeln("<LI> <A target='frame_search' href=http://armls1069.vstone.com/anthem_54468.cfm>[+] Anthem</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/carefreehomes_54469.cfm>[+] Carefree</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/cavecreekhomes_54470.cfm>[+] Cave Creek</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/chandlerhomes_54471.cfm>[+] Chandler</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/fountainhillsho_54472.cfm>[+] Fountain Hills</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/gilberthomes_54473.cfm>[+] Gilbert</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/glendalehomes_54474.cfm>[+] Glendale</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/goodyear_54467.cfm>[+] Goodyear</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/mesahomes_54475.cfm>[+] Mesa</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/paradisevalleyh_54476.cfm>[+] Paradise Valley</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/peoria_54466.cfm>[+] Peoria</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/phoenixhomes_54477.cfm>[+] Phoenix</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/queencreek_54465.cfm>[+] Queen Creek</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/scottsdalehomes_54478.cfm>[+] Scottsdale</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/suncity_54464.cfm>[+] Sun City</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/surprise_54463.cfm>[+] Surprise</A></LI>");
  document.writeln("<LI><A target='frame_search' href=http://armls1069.vstone.com/tempehomes_54479.cfm>[+] Tempe</A></LI>");

  document.writeln("</small></UL></LI>");
    









 document.writeln("<LI><A href=#>Resources</A>");
  document.writeln("<UL>");
  document.writeln("<LI><A target='_blank'  href=http://www.propertyassessmentsystem.com>» Mortgage & Home Equity News</A></LI>");
  document.writeln("<LI><A target='_blank'  href=http://www.realestatehottopics.com>» Real Estate News</A></LI>");
  document.writeln("<LI  style='BORDER-BOTTOM: #9d080d 1px solid'><A target='_blank'  href=http://www.allianceinternationale.net>» International Real Estate News</A></LI>");
 document.writeln("<LI><A   target='frame_search' href=rp.htm>[+] Relocation Package</A> </LI>");

   document.writeln("<LI><A   target='frame_search' href=hv.htm>[+] Value of your Home? </A> </LI>");

  
 document.writeln("<LI style='BORDER-BOTTOM: #9d080d 1px solid'><A   target='frame_search' href=http://www.phoenixpowersearch.com/newhomeprogram.html  >[+] Home Buyer Incentives </A> </LI>");

  
  document.writeln("<LI><A  target='frame_search' href=http://www.phoenixpowersearch.com/mortgage_calc.htm>[+] Simple Mortgage Calculator</A></LI>");
  document.writeln("<LI><A  target='frame_search' href=http://www.propertyassessmentsystem.com/calculator/>[+] Advanced Mortgage Calculator</A></LI>");


  
  
  document.writeln("</UL></LI>");




 document.writeln("<LI><A href=# >Contact Us</A>");
  document.writeln("<UL>");
 document.writeln("<LI style='BORDER-BOTTOM: #9d080d 1px solid'><STRONG>Team Leader / Partner</STRONG></LI>");
 document.writeln("<LI><A href=mailto:bculhane@phoenixpowersearch.com>» Brian Culhane</A></LI>");
  document.writeln("<LI><small><p align=right><font color=#611106><b>Tel:</b> 480-650-7712</font> <br><br></p></small></LI>");


 document.writeln("<LI style='BORDER-BOTTOM: #9d080d 1px solid'><STRONG>Buyer Agent / VP Investments</STRONG></LI>");
 document.writeln("<LI><A href=mailto:james@phoenixpowersearch.com>» James Gaulke</A></LI>");
  document.writeln("<LI><small><p align=right><font color=#611106><b>Tel:</b> 602-663-1411 </font>  <br><br></p></small></LI>");
 
 
 document.writeln("<LI style='BORDER-BOTTOM: #9d080d 1px solid'><STRONG>Realtor® / Partner</STRONG></LI>");
  document.writeln("<LI><A href=mailto:kristi@phoenixpowersearch.com>» Kristi Hecht</A></LI>");
  document.writeln("<LI><small><p align=right><font color=#611106><b>Tel:</b> 480-206-5966 </font> <br><br></p></small></LI>");
 
 document.writeln("</UL></LI>");



 document.writeln("<LI><A href='about.htm' target='frame_search'   onclick=return _preview('pps',-1,0) id=_show-pps   >About Us</A></LI>");



       



 document.writeln("<LI   style=BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px> <A  href='http://www.longituderealty.com'   >HOME</A></LI>      ");


 document.writeln("</UL>");
 document.writeln("</DIV>");        

  
  


}











function get_element(id) {  
  return document.getElementById ? document.getElementById(id) :  
           (document.all ? document.all[id] : 0);  
}  
  
function toggle(id, show) {  
  var _element_ = get_element(id);  
  if (! _element_) return;  
  if (show > 0 || (! show && _element_.style.display == 'none')) {  
    _element_.style.display = '';  
    toggled = displayed = id;  
  } else {  
    _element_.style.display = 'none';  
    toggled = displayed = 0;  
  }  
}  
  

  
  
  
  
  
function _previewall(show) {  
  toggle('pv-all', - show);  
  toggle('pvc-all', show);  
  var as = document.body.getElementsByTagName("a");  
  for (i = 0; i < as.length; i++) {  
    if (as[i].id &&   
        ((show > 0 && as[i].id.search(/^_open-/) >= 0) ||   
         (show < 0 && as[i].id.search(/^_show-/) >= 0))) {  
      as[i].onclick();  
    }  
  }  
}  
  
function _preview(id, show, _openst) {  
  var _frame_ = get_element('_open-' + id);  
  var fr = get_element('_view-' + id);  
  if (! _frame_ || ! fr) return false;  
  toggle('_view-' + id, show);  
  toggle('_open-' + id, - show);  
  toggle('_show-' + id, show);  
  if (! show) return;  
  if (fr.src) ;  
  else if (_openst) _openstlink(_frame_, '_view-'+id);  
  else fr.src = _frame_.href;  
  return false;  
}



























