var bTestSite=false;
var sHttpPrefix="http://";

// establish test vs live site
if (window.location.toString().toLowerCase().indexOf("minisage.com") > -1)
{
	bTestSite=true;
}
// establish http vs https
if (window.location.toString().toLowerCase().indexOf("https") > -1)
{
	sHttpPrefix = "https://";
}

var nSubMenuAdditionalWidthMedium = 150;   	//mfindlay
var nSubMenuAdditionalWidthWide = 200;    	//mfindlay
var nTopMenuOffset = 3;						// mfindlay: top menu offset from bottom of associated item

var nMenuWidth=190;				// width of menus to appear. Set to zero to ignore
var sBaseSite="";
var sNonSSLBaseSite="";

// If test site, just use 1 base site
if (bTestSite) 
{
	sBaseSite = sHttpPrefix + "www.minisage.com/perteet/";
	sNonSSLBaseSite = "http://" + "www.minisage.com/perteet/";
}
else
{
	sNonSSLBaseSite = "http://" + "www.perteet.com/";
	
	// live site. If https mode, use safesecureweb address
	if (sHttpPrefix=="https://")
	{
		sBaseSite = sHttpPrefix + "www107.safesecureweb.com/perteet/";
	}
	else
	{
		// non ssl mode, use normal address
		sBaseSite = sHttpPrefix + "www.perteet.com/";
	}
} 

//****************************************************
// reloadCAPTCHA
//****************************************************
function reloadCAPTCHA() 
{
	document.getElementById('CAPTCHA').src=sBaseSite + 'include/CAPTCHA/CAPTCHA_image.asp?'+Date();
}

//********************
// TD Top nav onclick
//********************
function NavigateTo(sTarget)
{
	//window.location.href = sBaseSite + sTarget;
	window.location.href = sNonSSLBaseSite + sTarget;
	return true;
}


//var submenuTopOffset = "offset=5";  see iym for reference use in submenu flyouts
//var submenuLeftOffset = "offset=1";

// milonic
_menuCloseDelay=250;           	// The time delay for menus to remain visible on mouse out
_menuOpenDelay=50;             	// The time delay before menus open on mouse over
_subOffsetTop=4;             	// Sub menu top offset from bottom of image associated with it
_subOffsetLeft=-4;            	// Sub menu left offset

// WHO WE ARE STYLE
with(whoweareMenuStyle=new mm_style()){
onbgcolor="#6790c5";			// hover background color  
offbgcolor="#dce2f1";			// normal (non-hover) background color  
offcolor="#000000";				// normal (non-hover) text color  
oncolor="#000000";				// hover text color  
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#b0bec9";			// border color 
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";				// font / font family
fontsize="10px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
//overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#6790c5"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#000000";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#dce2f1";		// separator color 
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
}
// WHAT WE DO STYLE
with(whatwedoMenuStyle=new mm_style()){
onbgcolor="#97c9e3";			// hover background color  
offbgcolor="#e8f3f9";			// normal (non-hover) background color  
offcolor="#000000";				// normal (non-hover) text color  
oncolor="#000000";				// hover text color 
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#b0bec9";			// border color 
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";				// font / font family
fontsize="10px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
//overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#97c9e3"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#000000";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#e8f3f9";		// separator color 
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
}
// CAREERS STYLE
with(careersMenuStyle=new mm_style()){
onbgcolor="#9fb93a";			// hover background color  
offbgcolor="#e9eed2";			// normal (non-hover) background color  
offcolor="#000000";				// normal (non-hover) text color  
oncolor="#000000";				// hover text color  
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#b0bec9";			// border color 
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";				// font / font family
fontsize="10px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
//overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#9fb93a"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#000000";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#e9eed2";		// separator color 
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
}
// COMMUNITY STYLE
with(communityMenuStyle=new mm_style()){
onbgcolor="#d4d03f";			// hover background color  
offbgcolor="#f5f5d7";			// normal (non-hover) background color  
offcolor="#000000";				// normal (non-hover) text color  
oncolor="#000000";				// hover text color  
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#b0bec9";			// border color 
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";				// font / font family
fontsize="10px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
//overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#d4d03f"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#000000";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#f5f5d7";		// separator color 
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
}
// RESOURCES STYLE
with(resourcesMenuStyle=new mm_style()){
onbgcolor="#ecab1e";			// hover background color  
offbgcolor="#fbebce";			// normal (non-hover) background color  
offcolor="#000000";				// normal (non-hover) text color  
oncolor="#000000";				// hover text color  
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#b0bec9";			// border color 
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";				// font / font family
fontsize="10px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
//overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#ecab1e"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#000000";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#fbebce";		// separator color 
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
}
// CONTACT US STYLE
with(contactusMenuStyle=new mm_style()){
onbgcolor="#ea8022";			// hover background color  
offbgcolor="#fbe0c8";			// normal (non-hover) background color  
offcolor="#000000";				// normal (non-hover) text color  
oncolor="#000000";				// hover text color  
offclass="mmpadding";			// custom style attached to menu
onclass="mmpadding";			// custom style attached to menu
bordercolor="#b0bec9";			// border color 
borderstyle="solid";
borderwidth=1;
fontfamily="Arial";				// font / font family
fontsize="10px";				// font size
fontstyle="normal";				// font style   
fontweight="bold";				// font weight (bold)   
//outfilter="Fade(duration=0.1)";
//overfilter="Fade(duration=0.1);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
padding=3;						// menu item cell padding
pagebgcolor="#ea8022"; 			// this is the (non-hover) background color of the menu item last clicked 
pagecolor="#000000";  			// this is the (non-hover) text color of the menu item last clicked 
separatorcolor="#fbe0c8";		// separator color 
separatorsize="1";
subimage=sBaseSite + "graphics/common/flyoutarrow.gif";
subimagepadding="2";
}

//******************** WHO WE ARE ***********************************
with(milonic=new menuname("mmwhoweare")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=whoweareMenuStyle;
itemwidth=190;  
top=nTopMenuOffset;
//left=0;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=VISION/VALUES;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_vision.asp;");
aI("text=HISTORY;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_history.asp;");
aI("text=LEADERSHIP;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_leadership.asp;");
aI("text=AWARDS;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_awards.asp;");
aI("text=TEAM PHOTOS;url=" + sNonSSLBaseSite + "sections/whoweare/whoweare_team_photos.asp;");
}


//******************** WHAT WE DO ***********************************
with(milonic=new menuname("mmwhatwedo")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=whatwedoMenuStyle;
itemwidth=190;  

top=nTopMenuOffset;
//left=0;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=ENGINEERING;url=" + sNonSSLBaseSite + "sections/whatwedo/whatwedo_engineering_main.asp;");
aI("text=PLANNING;url=" + sNonSSLBaseSite + "sections/whatwedo/whatwedo_planning_main.asp;");
aI("text=SURVEYING;url=" + sNonSSLBaseSite + "sections/whatwedo/whatwedo_surveying_main.asp;");
aI("text=ENVIRONMENTAL;url=" + sNonSSLBaseSite + "sections/whatwedo/whatwedo_environmental_main.asp;");
}

	
//******************** CAREERS ***********************************
with(milonic=new menuname("mmcareers")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=careersMenuStyle;
itemwidth=190;  
top=nTopMenuOffset;
//left=0;
//aI("align=center;pointer=move;text=drag to move menu;type=dragable;url=#;");
aI("text=OPEN POSITIONS;url=" + sNonSSLBaseSite + "sections/careers/careers_positions.asp;");
aI("text=BENEFITS;url=" + sNonSSLBaseSite + "sections/careers/careers_benefits.asp;");
aI("text=LIFE AT PERTEET;url=" + sNonSSLBaseSite + "sections/careers/careers_lifeatperteet.asp;");
aI("text=INTERNSHIPS;url=" + sNonSSLBaseSite + "sections/careers/careers_internships.asp;");
}

//******************** COMMUNITY ***********************************
with(milonic=new menuname("mmcommunity")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=communityMenuStyle;
itemwidth=190;  
top=nTopMenuOffset;
//left=0;
aI("text=PROFESSIONAL ORGANIZATIONS;url=" + sNonSSLBaseSite + "sections/community/community_organizations.asp;");
aI("text=CHARITABLE GIVING;url=" + sNonSSLBaseSite + "sections/community/community_giving.asp;");
aI("text=COMMUNITY INVOLVEMENT;url=" + sNonSSLBaseSite + "sections/community/community_involvement.asp;");
//aI("text=CHAMBER PHOTOS & LINKS;url=" + sNonSSLBaseSite + "sections/community/community_photos_links.asp;");
}

//******************** RESOURCES ***********************************
with(milonic=new menuname("mmresources")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=resourcesMenuStyle;
itemwidth=190;  
top=nTopMenuOffset;
//left=0;
aI("text=PUBLICATIONS;url=" + sNonSSLBaseSite + "sections/resources/resources_publications.asp;");
aI("text=GLOSSARY;url=" + sNonSSLBaseSite + "sections/resources/resources_glossary.asp;");
aI("text=LINKS;url=" + sNonSSLBaseSite + "sections/resources/resources_links.asp;");
aI("text=MEDIA FACT SHEET;url=" + sNonSSLBaseSite + "sections/resources/resources_media_factsheet.asp;");
}

//******************** CONTACT US ***********************************
with(milonic=new menuname("mmcontactus")){
//alwaysvisible=1;
//followscroll=1;
overflow="scroll";
style=contactusMenuStyle;
itemwidth=190;  
top=nTopMenuOffset;
//left=0;
aI("text=HEADQUARTERS;url=" + sNonSSLBaseSite + "sections/contactus/contactus_headquarters.asp;");
//aI("text=SOUTH PUGET SOUND;url=" + sNonSSLBaseSite + "sections/contactus/contactus_sps.asp;");
aI("text=SEATTLE OFFICE;url=" + sNonSSLBaseSite + "sections/contactus/contactus_seattle.asp;");
aI("text=SNOQUALMIE OFFICE;url=" + sNonSSLBaseSite + "sections/contactus/contactus_snoqualmie.asp;");
//aI("text=OLYMPIC PENINSULA;url=" + sNonSSLBaseSite + "sections/contactus/contactus_olympic.asp;");
}

	

//drawMenus();  will do this in main body so we don't lose the page background (milonic bug)

