// *************************************************************
//  CLIENT_SIDE SNIFFER CODE
// *************************************************************
// convert all characters to lowercase to simplify testing 


var cssDir = "css/";
var stylePrefix = "";

var winNSCSS = "global.css";
var winIECSS = "global.css";
var macCSS = "global.css";
var unixCSS = "global.css";

var agt=navigator.userAgent.toLowerCase(); 

// *** BROWSER VERSION *** 
// Note: On IE5, these return 4, so use is_ie5up to detect IE5. 
var is_major = parseInt(navigator.appVersion); 
var is_minor = parseFloat(navigator.appVersion); 

// *** BROWSER TYPE *** 
var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
            && (agt.indexOf('webtv')==-1));
var is_nav4up = (is_nav && (is_major >= 4));  
var is_ie   = (agt.indexOf("msie") != -1); 
var is_ie3  = (is_ie && (is_major < 4)); 
var is_ie4  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")==-1) );
var is_ie4up  = (is_ie  && (is_major >= 4));
var is_ie5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );  
var is_ie5up  = (is_ie  && !is_ie3 && !is_ie4);  

// *** PLATFORM ***
var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_mac    = (agt.indexOf("mac")!=-1);
var is_sun   = (agt.indexOf("sunos")!=-1);
var is_irix  = (agt.indexOf("irix") !=-1);    // SGI
var is_hpux  = (agt.indexOf("hp-ux")!=-1);
var is_aix   = (agt.indexOf("aix") !=-1);      // IBM
var is_linux = (agt.indexOf("inux")!=-1);
var is_sco   = (agt.indexOf("sco")!=-1) || (agt.indexOf("unix_sv")!=-1);
var is_unixware = (agt.indexOf("unix_system_v")!=-1); 
var is_mpras    = (agt.indexOf("ncr")!=-1); 
var is_reliant  = (agt.indexOf("reliantunix")!=-1);
var is_dec   = ((agt.indexOf("dec")!=-1) || (agt.indexOf("osf1")!=-1) || 
       (agt.indexOf("dec_alpha")!=-1) || (agt.indexOf("alphaserver")!=-1) || 
       (agt.indexOf("ultrix")!=-1) || (agt.indexOf("alphastation")!=-1)); 
var is_sinix = (agt.indexOf("sinix")!=-1);
var is_freebsd = (agt.indexOf("freebsd")!=-1);
var is_bsd = (agt.indexOf("bsd")!=-1);
var is_unix  = ((agt.indexOf("x11")!=-1) || is_sun || is_irix || is_hpux || 
             is_sco ||is_unixware || is_mpras || is_reliant || 
             is_dec || is_sinix || is_aix || is_linux || is_bsd || is_freebsd);

			 
//  Select the appropriate stylesheet
if ((is_nav4up || is_ie4up) || (!is_nav && !is_ie)) {
  ChooseStyleSheet();
}

// Function to choose the style sheet for use based on the platform
// and browser version
function ChooseStyleSheet() {
  var fileHead = cssDir + stylePrefix;
  var styles;
  if (is_win) {
	if (is_nav) {
      styles = fileHead + winNSCSS;
	} else {
	  // Windows Netscape fonts need to be larger than those for IE
	  styles = fileHead + winIECSS;
	}
  } else if (is_mac) {
      if (is_ie5up) {
	    // Default font settings for Mac IE5 match PC IE fonts
        styles = fileHead + winIECSS;
	  } else {
	    styles = fileHead + macCSS;
	  }
  } else if (is_unix) {
    styles = fileHead + unixCSS;
  } else {
    // Default style = macCSS
	// Macintosh stylesheets have the largest font sizes, which
	// will ensure readability
	styles = fileHead + macCSS;
  }
  document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + styles + "\">");
  return true;
}


// *************************************************************
//  MENU SYSTEM ARRAY/CONFIG
// *************************************************************
// 


	var NoOffFirstLineMenus=5;			// Number of first level items
	var LowBgColor='#DC9627';			// Background color when mouse is not over
	var LowSubBgColor='#DC9627';		// Background color when mouse is not over on subs
	var HighBgColor='#933C06';			// Background color when mouse is over
	var HighSubBgColor='#933C06';		// Background color when mouse is over on subs
	var FontLowColor='#933C06';			// Font color when mouse is not over
	var FontSubLowColor='#933C06';		// Font color subs when mouse is not over
	var FontHighColor='white';			// Font color when mouse is over
	var FontSubHighColor='white';			// Font color subs when mouse is over
	var BorderColor='#933C06';			// Border color
	var BorderSubColor='#933C06';		// Border color for subs
	var BorderWidth=1;				// Border width
	var BorderBtwnElmnts=1;			// Border between elements 1 or 0
	var FontFamily="arial,comic sans ms,technical"	// Font family menu items
	var FontSize=8;				// Font size menu items
	var FontBold=0;				// Bold menu items 1 or 0
	var FontItalic=0;				// Italic menu items 1 or 0
	var MenuTextCentered='left';			// Item text position 'left', 'center' or 'right'
	var MenuCentered='left';			// Menu horizontal position 'left', 'center' or 'right'
	var MenuVerticalCentered='top';		// Menu vertical position 'top', 'middle','bottom' or static
	var ChildOverlap=.2;				// horizontal overlap child/ parent
	var ChildVerticalOverlap=.2;			// vertical overlap child/ parent
	var StartTop=0;				// Menu offset x coordinate
	var StartLeft=325;				// Menu offset y coordinate
	var VerCorrect=0;				// Multiple frames y correction
	var HorCorrect=0;				// Multiple frames x correction
	var LeftPaddng=4;				// Left padding
	var TopPaddng=2;				// Top padding
	var FirstLineHorizontal=1;			// SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
	var MenuFramesVertical=0;			// Frames in cols or rows 1 or 0
	var DissapearDelay=1000;			// delay before menu folds in
	var TakeOverBgColor=1;			// Menu frame takes over background color subitem frame
	var FirstLineFrame='navig';			// Frame where first level appears
	var SecLineFrame='space';			// Frame where sub levels appear
	var DocTargetFrame='space';			// Frame where target documents appear
	var TargetLoc='';				// span id for relative positioning
	var HideTop=0;				// Hide first level when loading new document 1 or 0
	var MenuWrap=1;				// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;				// enables/ disables right to left unfold 1 or 0
	var UnfoldsOnClick=0;			// Level 1 unfolds onclick/ onmouseover
	var WebMasterCheck=1;			// menu tree checking on or off 1 or 0
	var ShowArrow=1;				// Uses arrow gifs when 1
	var KeepHilite=1;				// Keep selected path highligthed
	var Arrws=['images/arrow-menu.gif',13,11,'images/spacer.gif',1,1,'trileft.gif',5,10];	// Arrow source, width and height

function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}


// Menu tree
//	MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
//	For rollover images set "Text to show" to:  "rollover:Image1.jpg:Image2.jpg"

Menu1=new Array("rollover:images/menu-bar_01.gif:images/menu-bar2_01.gif","application.php","",2,47,87);
	Menu1_1=new Array("Rental Application (Long)","application-long.php","",0,20,140,"","","","","");
	Menu1_2=new Array("Rental Application (Fast)","application-fast.php","",0,20,120,"","","","","");

Menu2=new Array("rollover:images/menu-bar_02.gif:images/menu-bar2_02.gif","services.php","",4,47,66);
	Menu2_1=new Array("Property Managment","services-property-management.php","",0,20,170,"","","","","");
	Menu2_2=new Array("Short Term Housing","services-short-term-housing.php","",0,20,120,"","","","","");
	Menu2_3=new Array("Furnished Apartments","services-furnished.php","",0,20,120,"","","","","");
	Menu2_4=new Array("Tenant Service","services-tenant-service.php","",0,20,120,"","","","","");

Menu3=new Array("rollover:images/menu-bar_03.gif:images/menu-bar2_03.gif","our-company.php","",4,47,100);
	Menu3_1=new Array("About Us","our-company-about-us.php","",0,20,170);
	Menu3_2=new Array("Our Mission","our-company-mission.php","",0,20);
	Menu3_3=new Array("Our Staff","our-company-staff.php","",0,20);
	Menu3_4=new Array("Press & Awards","our-company-press.php","",0,20);

Menu4=new Array("rollover:images/menu-bar_04.gif:images/menu-bar2_04.gif","our-community.php","",1,47,112);
	Menu4_1=new Array("About Lowell","our-community.php","",0,20,112);
	
Menu5=new Array("rollover:images/menu-bar_05.gif:images/menu-bar2_05.gif","contact.php","",1,47,85);
	Menu5_1=new Array("Contact Info / Directions","contact.php","",0,20,130);