// JavaScript Document


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 preloadFloorNav() {
	
}

function preloadGalleryNav() {
	MM_preloadImages('images/_buttons/_gallery/btn_courtyard_over.gif', 'images/_buttons/_gallery/btn_lobby_over.gif', 'images/_buttons/_gallery/btn_loft_over.gif', 'images/_buttons/_gallery/btn_lounge_over.gif', 'images/_buttons/_gallery/btn_mail_over.gif', 'images/_buttons/_gallery/btn_pool_over.gif', 'images/_buttons/_gallery/btn_screening_over.gif', 'images/_buttons/_gallery/btn_sloft_over.gif', 'images/_buttons/_gallery/btn_facade_over.gif', 'images/_buttons/_gallery/btn_mascot_over.gif')
}

function loadSettings() {
	
MM_preloadImages('images/_buttons/_navbarmain/btnOver_Home.gif', 'images/_buttons/_navbarmain/btnOver_Amenities.gif', 'images/_buttons/_navbarmain/btnOver_Residences.gif', 'images/_buttons/_navbarmain/btnOver_Location.gif', 'images/_buttons/_navbarmain/btnOver_Leasing.gif', 'images/_buttons/_navbarmain/btnOver_Contact.gif', 'images/_buttons/_navbarmain/btnOver_Gallery.gif', 'images/_buttons/_navbarmain/btnOver_Back.gif', 'images/_buttons/_navbarmain/btnOver_FC.gif', 'images/aboutArt_over.gif')

var cat1 = document.getElementById('hidCategory1').value;
var cat2 = document.getElementById('hidCategory2').value;

//alert(document.frmHidValues.hidCategory1.value);
if (cat1=='Home') {
	document.getElementById('btnHome').src="images/_buttons/_navbarmain/btnOver_Home.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#400099';
	document.getElementById('tdRightColorCell1').style.backgroundImage = '';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#400099';
	document.getElementById('tdRightColorCell2').style.backgroundImage = '';
	}
else if (cat1=='Amenities') {
	
	document.getElementById('btnAmenities').src="images/_buttons/_navbarmain/btnOver_Amenities.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#bc3a0d';
	document.getElementById('tdRightColorCell1').style.backgroundImage = '';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#bc3a0d';
	document.getElementById('tdRightColorCell2').style.backgroundImage = '';
	}
else if (cat1=='Residences') {
	document.getElementById('btnFloorplans').src="images/_buttons/_navbarmain/btnOver_Floorplans.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#E86E00';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#E86E00';
	document.getElementById('tdRightColorCell1').style.backgroundImage = 'url(images/bgFl_Nav.gif)';
	document.getElementById('tdRightColorCell1').style.backgroundRepeat = 'repeat-y';
	document.getElementById('tdRightColorCell2').style.backgroundImage = 'url(images/bgFl_Nav.gif)';
	document.getElementById('tdRightColorCell2').style.backgroundRepeat = 'repeat-y';
	if (cat2=='fp1'){
		document.getElementById('imgFP1').src = 'images/_buttons/_floorplans/btnOver_Fl1.gif';
		//document.getElementById('divSelectArrow').style.top = '343px;'
	}
	else if (cat2=='fp2'){
		document.getElementById('imgFP2').src = 'images/_buttons/_floorplans/btnOver_Fl2.gif';
		//document.getElementById('divSelectArrow').style.top = '294px';
	}
	else if (cat2=='fp3'){
		document.getElementById('imgFP3').src = 'images/_buttons/_floorplans/btnOver_Fl3.gif';
		//document.getElementById('divSelectArrow').style.top = '245px';
	}
	else if (cat2=='fp4'){
		document.getElementById('imgFP4').src = 'images/_buttons/_floorplans/btnOver_Fl4.gif';
		//document.getElementById('divSelectArrow').style.top = '196px';
	}
	else if (cat2=='fp5'){
		document.getElementById('imgFP5').src = 'images/_buttons/_floorplans/btnOver_Fl5.gif';
		//document.getElementById('divSelectArrow').style.top = '147px';
	}
	else if (cat2=='fp6'){
		document.getElementById('imgFP6').src = 'images/_buttons/_floorplans/btnOver_Fl6.gif';
		//document.getElementById('divSelectArrow').style.top = '98px';
	}
	else if (cat2=='fp7'){
		document.getElementById('imgFP7').src = 'images/_buttons/_floorplans/btnOver_Fl7.gif';
		//document.getElementById('divSelectArrow').style.top = '49px';
	}
	else if (cat2=='fp8'){
		document.getElementById('imgFP8').src = 'images/_buttons/_floorplans/btnOver_Fl8.gif';
		//document.getElementById('divSelectArrow').style.top = '0px';
	}
	
	}
else if (cat1=='Location') {
	document.getElementById('btnLocation').src="images/_buttons/_navbarmain/btnOver_Location.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#AFA017';
	document.getElementById('tdRightColorCell1').style.backgroundImage = '';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#AFA017';
	document.getElementById('tdRightColorCell2').style.backgroundImage = '';
	}
else if (cat1=='Leasing') {
	document.getElementById('btnLeasing').src="images/_buttons/_navbarmain/btnOver_Leasing.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#0B98AF';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#0B98AF';
	document.getElementById('tdRightColorCell1').style.backgroundImage = '';
	document.getElementById('tdRightColorCell2').style.backgroundImage = '';
	}
else if (cat1=='Contact') {
	document.getElementById('btnContact').src="images/_buttons/_navbarmain/btnOver_Contact.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#ff1100';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#ff1100';
	}
else if (cat1=='Gallery') {
	document.getElementById('btnGallery').src="images/_buttons/_navbarmain/btnOver_Gallery.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#E5A222';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#E5A222';
	document.getElementById('tdRightColorCell1').style.backgroundImage = 'url(images/bgFl_Nav2.gif)';
	document.getElementById('tdRightColorCell1').style.backgroundRepeat = 'repeat-y';
	document.getElementById('tdRightColorCell2').style.backgroundImage = 'url(images/bgFl_Nav.gif)';
	document.getElementById('tdRightColorCell2').style.backgroundRepeat = 'repeat-y';
	
		if (cat2=='loft'){
			document.getElementById('btn_loft').src = 'images/_buttons/_gallery/btn_loft_over2.gif';
			document.getElementById('divSelectArrow').style.top = '320px;'
		}
		else if (cat2=='sloft'){
			document.getElementById('btn_sloft').src = 'images/_buttons/_gallery/btn_sloft_over2.gif';
			document.getElementById('divSelectArrow').style.top = '280px';
		}
		else if (cat2=='mailroom'){
			document.getElementById('btn_mailroom').src = 'images/_buttons/_gallery/btn_mail_over2.gif';
			document.getElementById('divSelectArrow').style.top = '240px';
		}
		else if (cat2=='screeningroom'){
			document.getElementById('btn_screeningroom').src = 'images/_buttons/_gallery/btn_screening_over2.gif';
			document.getElementById('divSelectArrow').style.top = '200px';
		}
		else if (cat2=='pool'){
			document.getElementById('btn_pool').src = 'images/_buttons/_gallery/btn_pool_over2.gif';
			document.getElementById('divSelectArrow').style.top = '160px';
		}
		else if (cat2=='lobby'){
			document.getElementById('btn_lobby').src = 'images/_buttons/_gallery/btn_lobby_over2.gif';
			document.getElementById('divSelectArrow').style.top = '120px';
		}
		else if (cat2=='courtyard'){
			document.getElementById('btn_courtyard').src = 'images/_buttons/_gallery/btn_courtyard_over2.gif';
			document.getElementById('divSelectArrow').style.top = '80px';
		}
		else if (cat2=='lounge'){
			document.getElementById('btn_lounge').src = 'images/_buttons/_gallery/btn_lounge_over2.gif';
			document.getElementById('divSelectArrow').style.top = '40px';
		}
		else if (cat2=='facade'){
			document.getElementById('btn_facade').src = 'images/_buttons/_gallery/btn_facade_over2.gif';
			document.getElementById('divSelectArrow').style.top = '0px';
		}
		else if (cat2=='mascot'){
			document.getElementById('btn_mascot').src = 'images/_buttons/_gallery/btn_mascot_over2.gif';
			document.getElementById('divSelectArrow').style.top = '360px';
		}
		else if (cat2=='tour'){
			document.getElementById('btn_tour').src = 'images/_buttons/_gallery/btn_tour_on2.gif';
			document.getElementById('divSelectArrow').style.top = '360px';
		}
	}
else if (cat1=='Residents') {
	document.getElementById('btnResidents').src="images/_buttons/_navbarmain/btnOver_Residents.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#ff1100';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#ff1100';
	}
else {
	document.getElementById('btnFacts').src="images/_buttons/_navbarmain/btnUp_Facts.gif";
	document.getElementById('tdRightColorCell1').style.backgroundColor = '#af9f16';
	document.getElementById('tdRightColorCell2').style.backgroundColor = '#af9f16';
	}
}

function mOverFloor(imgSrcName, imgFile, posText) {
	MM_swapImage(imgSrcName,'',imgFile,1);
	document.getElementById('divSelectArrow').style.top = posText;
		
}

function mOffFloor() {
	var arrowLocation = '0px';
	if ((document.getElementById('hidCategory3').value!='')){
		arrowLocation = document.getElementById('hidCategory3').value;		
	}
	
	MM_swapImgRestore();
	document.getElementById('divSelectArrow').style.top = arrowLocation;
	
}

function openFloorPlanWindow(whichOne) {
	fpwindow = window.open(whichOne, 'window1', 'left=20,top=20,width=640,height=585,toolbar=0,resizable=0,scrollbars=0');
	fpwindow.focus();
}

function openArtWindow() {
	artwindow = window.open('electronicArt1.asp', 'artWindow', 'left=20,top=20,width=640,height=460,toolbar=0,resizable=0,scrollbars=0');	
	artwindow.focus();
}

function highlightFPLink(txtLink) {
	txtLink.style.color='white';
}

function unhighlightFPLink(txtLink) {
	txtLink.style.color='#dddddd';
}

function highlightMap(divTag){
	divTag.style.backgroundColor='#FFc211';
	divTag.style.color='black';
}

function highlightMapRed(divTag){
	divTag.style.backgroundColor='#ff0000';
	divTag.style.color='white';
}

function unhighlightMap(divTag){
	divTag.style.backgroundColor='#AFA017';
	divTag.style.color='white';
}

function playMusic() {
	if (!window.screenLeft) {
		windowCoordinatesLeft = '200px';
		windowCoordinatesTop = '200px';
	}
	else {
		windowCoordinatesLeft = window.screenLeft;
		windowCoordinatesTop = window.screenTop;
	}
	mpwindow = window.open('musicPlayer.html', 'mpwindow', 'left='+windowCoordinatesLeft+', top='+windowCoordinatesTop+', width=180,height=60,toolbar=0,scrollbars=0');
	self.focus();
}

function stopMusic() {
	if (!window.screenLeft) {
		windowCoordinatesLeft = '200px';
		windowCoordinatesTop = '200px';
	}
	else {
		windowCoordinatesLeft = window.screenLeft;
		windowCoordinatesTop = window.screenTop;		
	}
	mpwindow = window.open('musicPlayer.html', 'mpwindow', 'left='+windowCoordinatesLeft+', top='+windowCoordinatesTop+', width=180,height=60,toolbar=0,scrollbars=0');
	mpwindow.close();
	mpwindow="";
	self.focus();
}

function dogBark() {
 	if (!window.screenLeft) {
		windowCoordinatesLeft = '200px';
		windowCoordinatesTop = '200px';
	}
	else {
		windowCoordinatesLeft = window.screenLeft;
		windowCoordinatesTop = window.screenTop;		
	}
	mpwindowBark = window.open('barkPlayer.html', 'mpwindowBark', 'left='+windowCoordinatesLeft+', top='+windowCoordinatesTop+', width=180,height=60,toolbar=0,scrollbars=0');
	self.focus();
	
}

