//*-- ======================================================================= --*/
//*--      Site Name: Pickering, Corts & Summerson, Inc. Web Site             --*/
//*--     Page Title: PCS Web JavaScripts                                     --*/
//*--     Web Master: W. V. Wilson                                            --*/
//*--      Copyright: Pickering, Corts & Summerson, Inc.                      --*/
//*-- ----------------------------------------------------------------------- --*/
//*--           File: pcs-web.js                                              --*/
//*--       Web Site: PCS-Inc.biz                                             --*/
//*-- E-Mail Address: webmaster@pcs-inc.biz                                   --*/
//*-- Origional Date: 5/22/02                                                 --*/
//*--  Revision Date: 5/22/05                                                 --*/
//*-- ======================================================================= --*/

//================ [ Global Vars ] =============
var CurrentDropDown="None";
var PreviousDropDown="None";
var CurrentDropDownSub="None";
var PreviousDropDownSub="None";
var HideMenuTimer;
var HideSubMenuTimer;
var SpecialAnnouncementTimer;
var AnnouncementLayer="";
var OK2Hide;
var OpacityState;
var SlideShowTimer;
var SlideShowSpeed;	
var SlideArray;
var CaptionArray;
var SlideArraySize;
var SlideArrayIndex;
var DomName="pcs-civil.com";
var Mlink1="mai";
var Mlink2="lto:";


//=============== [ Nothing ] ==============
function Nothing()
{

}


function AdjustPageHeight()
{
var a = document.getElementById('PageContentTable').style.height;
var b = document.getElementById('InteroirSideBarLayer').style.height;
var c = document.getElementById('InteroirNewsLayer').style.height;
a = a.split('p');
b = b.split('p');
c = c.split('p') + 25;
if (a < b){a = b;}
if (a < c){a = c;} 

document.getElementById('PageContentTable').style.height = a.toString() + 'px';

}


//=============== [ Show & Hide Special Announcement ] ============
function ShowHideAnnouncement(LayerID)
{
  AnnouncementLayer = LayerID;
	SpecialAnnouncemenTimer=setTimeout("ShowAnnouncement(AnnouncementLayer)",1500); // 1.5 second show
	SpecialAnnouncemenTimer=setTimeout("HideAnnouncement(AnnouncementLayer)",11000); // 9 seconds open

}

function ShowAnnouncement(LayerID)
{
  AnnouncementLayer = LayerID;
  OK2Hide = true;
	document.getElementById(AnnouncementLayer).style.visibility="visible";
}

function KeepOpen()
{
  OK2Hide = false;
}


function HideAnnouncement(LayerID)
{
  AnnouncementLayer = LayerID;
	if (OK2Hide == true)
	  {
	  document.getElementById(AnnouncementLayer).style.visibility="hidden";
		}
}

function HideAnnouncementIn1(LayerID)
{
  OK2Hide = true;
	SpecialAnnouncemenTimer=setTimeout("HideAnnouncement('LayerID')",1000);
}





//=============== [ Show DropDown ] ============
function ShowDropDown(ddm)
{
    CurrentDropDown = ddm;
    if (PreviousDropDown != "None")
        {
        if (PreviousDropDown != CurrentDropDown)
            {
            document.getElementById(PreviousDropDown).style.visibility="hidden";
            PreviousDropDown = "None";
            }
        else { PreviousDropDown = "None"; }
        }

    document.getElementById(CurrentDropDown).style.visibility="visible";
}


//=============== [ Hide Previous DropDown ] ============
function HidePreviousDropDown()
{
    if (PreviousDropDown != "None")
        {
        document.getElementById(PreviousDropDown).style.visibility="hidden";
        PreviousDropDown = "None";
        }
}


//=============== [ Hide DropDown ] ============
function HideDropDown(ddm)
{
  PreviousDropDown = ddm;
  HidePreviousDropDown();
}


//=============== [ Hide DropDown in 2 seconds] ============
function HideDropDownIn2(ddm)
{
  PreviousDropDown = ddm;
  HideMenuTimer=setTimeout("HidePreviousDropDown()",1000);
}


//=============== [ Show Drop Down Sub ] ============
function ShowDropDownSub(ddm,ddsm)
{
    CurrentDropDown = ddm;
    CurrentDropDownSub = ddsm;

    if (PreviousDropDown != "None")
        {
        if (PreviousDropDown != CurrentDropDown)
            {
            document.getElementById(PreviousDropDown).style.visibility="hidden";
            PreviousDropDown = "None";
            }
        else { PreviousDropDown = "None"; }
        }

    document.getElementById(CurrentDropDown).style.visibility="visible";

    if (PreviousDropDownSub != "None")
        {
        if (PreviousDropDownSub != CurrentDropDownSub)
            {
            document.getElementById(PreviousDropDownSub).style.visibility="hidden";
            PreviousDropDownSub = "None";
            }
        else { PreviousDropDownSub = "None"; }
        }
 
    document.getElementById(CurrentDropDownSub).style.visibility="visible";

}


//=============== [ Hide Drop Down Sub ] ============
function HideDropDownSub()
{

   document.getElementById(PreviousDropDownSub).style.visibility="hidden";
   PreviousDropDownSub = "None";
}


//=============== [ Hide Drop Down Sub in 1 seconds] ============
function HideDropDownSubIn1(ddm,ddsm)
{
  PreviousDropDown = ddm;
  PreviousDropDownSub = ddsm;

  HideMenuTimer=setTimeout("HideDropDown()",1000);
  HideSubMwnuTimer=setTimeout("HideDropDownSub()",500);

}


//=============== [ Slide Show ] ============

function ShowSlideArrayCVO(AI)  // Slide Show from CVO Open House
{
var SlideArraySize = 9;
var ArrayIndex = AI;

var SlideArray = new Array(SlideArraySize);
  SlideArray[0]="/Slideshow/OpenHouseWeb2.jpg";
  SlideArray[1]="/Slideshow/OpenHouseWeb3.jpg";
  SlideArray[2]="/Slideshow/OpenHouseWeb4.jpg";
  SlideArray[3]="/Slideshow/OpenHouseWeb5.jpg";
  SlideArray[4]="/Slideshow/OpenHouseWeb6.jpg"; 
  SlideArray[5]="/Slideshow/OpenHouseWeb7.jpg";
  SlideArray[6]="/Slideshow/OpenHouseWeb8.jpg";
  SlideArray[7]="/Slideshow/OpenHouseWeb9.jpg";
  SlideArray[8]="/Slideshow/OpenHouseWeb1.jpg";


document.getElementById("SlideShow").src = SlideArray[ArrayIndex];

if (ArrayIndex == (SlideArraySize - 1))
  {ArrayIndex = 0;}
else 
  {ArrayIndex = ArrayIndex + 1;}

SlideShowTimer=setTimeout("ShowSlideArray(" + ArrayIndex + ")", 4000); // 5 seconds

}


function ShowPCSWorkSlideArray()
{
  SlideArraySize = 21;
  SlideArrayIndex = 0;
	SlideShowSpeed = 7;

  SlideArray = new Array(SlideArraySize);
  SlideArray[0]="/Slideshow/Icecreamday1.jpg";
  SlideArray[1]="/Slideshow/IceCream_Jenna.jpg";
  SlideArray[2]="/Slideshow/MaryellenInterview.jpg";
  SlideArray[3]="/Slideshow/1-PennDOT-BridgeInspection.jpg";
  SlideArray[4]="/Slideshow/Kids2009.jpg";
  SlideArray[5]="/Slideshow/3-Newtown-Survey.jpg";
  SlideArray[6]="/Slideshow/Palooza2.jpg"; 
  SlideArray[7]="/Slideshow/Palooza_AaronD-JoeC-JohnP.JPG";
  SlideArray[8]="/Slideshow/Palooza_MarkM- MikeW-AlJ.JPG";
  SlideArray[9]="/Slideshow/5-MarkM-Transportation.jpg"; 
  SlideArray[10]="/Slideshow/Softball_TeamBlack.JPG";
  SlideArray[11]="/Slideshow/Softball_TeamRed.JPG";
  SlideArray[12]="/Slideshow/MikeW-and-KevinH.jpg";
  SlideArray[13]="/Slideshow/TrentonThunder_Mark-Morgan.JPG";	
  SlideArray[14]="/Slideshow/4-HerbH-Municipal.JPG";
  SlideArray[15]="/Slideshow/CareerFair2009.jpg";
  SlideArray[16]="/Slideshow/6-PlymouthM-Survey.jpg";
  SlideArray[17]="/Slideshow/DoutsenAward.jpg";
  SlideArray[18]="/Slideshow/ExtremeMakeover2.jpg";
  SlideArray[19]="/Slideshow/BringYourKid2.JPG";
  SlideArray[20]="/Slideshow/BringYourKid3.JPG";
	

	
  CaptionArray = new Array(SlideArraySize);
  CaptionArray[0]="John Prybella, President, and Robert Snyder, Survey Division Manager, scoop out ice cream for employees on PC&amp;S's annual ice cream day.";
  CaptionArray[1]="Jenna Ockford, Transportation Engineer-in-Training, chooses ice cream toppings for her sundae at PC&S's Annual Ice Cream Social.";
  CaptionArray[2]="Maryellen Saylor, P.E., gets interviewed by a Pennsbury High School student at their annual career fair for their campus television station.";	
  CaptionArray[3]="Jim White, Bill Huehn (PennDOT Schedule Coordinator), and Doutsen Hettema are shown (left to right) as they inspect a concrete bridge pier on the Interstate 95 southbound span over Neshaminy Creek in lower Bucks County.";
  CaptionArray[4]="A few of our \"extended PCS family members\" partake in our annual Bring Your Children to work day held at our Corporate Headquarters.";
  CaptionArray[5]="Shown left to right are Phil Mosby, PLS, Tim Newton, Ryan Guay, and Todd Eichner. They are reviewing architectural drawings and foundation plans for the Belmont Ridge Subdivision in Bensalem Township, Bucks County.";
  CaptionArray[6]="Our chefs, Don Rife, Senior Survey Manager, and Bob Snyder, Survey Division Manager, grilling delicious burgers and hot dogs for employees at the annual Pickering Palooza."; 
  CaptionArray[7]="Aaron Detwiler, Joe Chairmonte, and John Prybella  (shown left to right) relax at our baseball themed Pickering Palooza.";
  CaptionArray[8]="Mark Monkoski, Senior Highway/Traffic Engineer, Mike Wintermute, Manager of Highway Engineering, and Al Jackson, Underwater Inspection Manager, take a minute to smile for the camera at the annual Pickering Palooza.";
  CaptionArray[9]="Mark Monkoski, PE, reviews highway design plans for State Route 23 in Radnor Township, Delaware County, PA."; 
  CaptionArray[10]="PC&S \"Team Black\" gets ready to play in our first annual softball tournament.";
  CaptionArray[11]="Team Red poses for a group shot after defeating the black team in the PC&S softball tournament.";
  CaptionArray[12]="Mike Willey, Junior Bridge Inspector, and Kevin Haraschak, Bridge Inspection Team Leader, smile for the camera during our annual Pickering Palooza.";
  CaptionArray[13]="Mark Havers, Director of Site Engineering, enjoys the PC&S Trenton Thunder outing with daughter, Morgan.";	
  CaptionArray[14]="Herb Hale performs a construction inspection on the Basin 1, Sediment Basin at the Toll Brothers Varga Subdivision in Wrightstown Township, Bucks County, PA.";
  CaptionArray[15]="(left to right) Maryellen Saylor, P.E., and Patricia Bunn, ASLA, RLA, with one of our recent Pennsbury High School job shadow students."; 
  CaptionArray[16]="Dave Alexander, PLS, (left) and Sean Pharr (right) review the topographic survey plans for the Fairmount Water Works South Garden, Fairmount Park, Philadelphia.";
  CaptionArray[17]="H. Doutsen Hettema receives her 10 years of service award from her supervisor, John Wilhelm, at our Service Award Luncheon.";
  CaptionArray[18]="Pickering, Corts &amp; Summerson's Philip Mosby, P.L.S., and Ryan Guay staking out the lot for Extreme Makeover Home Edition.";
  CaptionArray[19]="Maryellen Saylor, P.E., PC&S Project Manager, conducts an interactive demonstration with the children at our annual Bring Your Children to work day.";
  CaptionArray[20]="Phillip Mosby and Nick Schwartz, PC&S Surveyors, show our \"Extended PC&S Family members\" how to use our survey equipment.";	

	
  document.getElementById("SlideShowSpeedText").innerHTML = SlideShowSpeed;
  PlaySlideshow(0); 

}


function ShowEMHESlideArray(AI)
{
var SlideArraySize = 17;
var ArrayIndex = AI;

var SlideArray = new Array(SlideArraySize);
  SlideArray[0]="/Slideshow/EMHE-photo1.jpg";
  SlideArray[1]="/Slideshow/EMHE-photo2.jpg";
  SlideArray[2]="/Slideshow/EMHE-photo3.jpg";
  SlideArray[3]="/Slideshow/EMHE-photo4.jpg";
  SlideArray[4]="/Slideshow/EMHE-photo5.jpg"; 
  SlideArray[5]="/Slideshow/EMHE-photo6.jpg";
  SlideArray[6]="/Slideshow/EMHE-photo7.jpg";
  SlideArray[7]="/Slideshow/EMHE-photo14.jpg";
  SlideArray[8]="/Slideshow/EMHE-photo13.jpg";
  SlideArray[9]="/Slideshow/EMHE-photo15.jpg";
  SlideArray[10]="/Slideshow/EMHE-photo16.jpg";
  SlideArray[11]="/Slideshow/EMHE-photo17.jpg";
  SlideArray[12]="/Slideshow/EMHE-photo8.jpg";
	SlideArray[13]="/Slideshow/EMHE-photo9.jpg";
	SlideArray[14]="/Slideshow/EMHE-photo10.jpg";
	SlideArray[15]="/Slideshow/EMHE-photo11.jpg";
	SlideArray[16]="/Slideshow/EMHE-photo12.jpg";

var CaptionArray = new Array(SlideArraySize);
  CaptionArray[0]="Robert J. Snyder, P.L.S, PC&S Survey Division Manager, standing in front of the Kilgallon's original home.";
  CaptionArray[1]="Tom Wilson, Philip Mosby, P.L.S., and Ryan Guay (left to right) of Pickering's Land Survey Division at the volunteer check-in center.";
  CaptionArray[2]="Pickering, Corts & Summerson's Philip Mosby, P.L.S., and Ryan Guay staking out the lot.";
  CaptionArray[3]="Community volunteers are pictured here hard at work trying to get the house finished in time for the Kilgallon family's home coming.";
  CaptionArray[4]="Paul DiMeo and other members of Extreme Makeover: Home Edition Team take a minute to smile for camera in the interior design tent."; 
  CaptionArray[5]="A look at the Kilgallon's home being worked on in the late evening hours";
  CaptionArray[6]="(left to right) Vice President of McGrath Homes, Patrick Flanagan, with a construction worker  looking over the job site to make sure everything is going according to plan.";
  CaptionArray[7]="(left to right) Daniel Chieco, PC&S Senior Landscape Architect, and Turning Leaf Landscape employee look over the landscape plan before getting started.";
  CaptionArray[8]="An aerial view of volunteers hard at work on the property's landscape.";
  CaptionArray[9]="Evan Stone, PC&S Director of Landscape Architecture, and Daniel Chieco, PC&S Senior Landscape Architect, are pictured here with Extreme Makeover volunteers working on the property's hardscape.";
  CaptionArray[10]="Volunteers are pictured here working through the late evening hours.";
  CaptionArray[11]="(left to right) Daniel Chieco, PC&S Senior Landscape Architect, and Evan Stone, PC&S Director of Landscape Architecture, take a minute to smile for the camera.";
  CaptionArray[12]="A sneak preview of the Kilgallon Family's new back yard.";
  CaptionArray[13]="Maryknoel 	Kilgallon and her oldest son with Ty getting the first glimpse of their brand new home.";
  CaptionArray[14]="The Kilgallon Family getting ready to enter their new home with Ty.";
  CaptionArray[15]="(left to right) PC&S employees Phil Mosby, P.L.S., Catherine Snyder, Ryan Guay, and Colleen Fairman  taking a minute for a quick picture in front of the Kilgallon family's finished home.";
  CaptionArray[16]="(left to right) Patrick Flanagan, Vice President of McGrath Homes, Catherine Snyder and Colleen Fairman of Pickering, Corts & Summerson, Inc., and John McGrath Jr., President of McGrath Homes.";


document.getElementById("SlideShow").src = SlideArray[ArrayIndex];
document.getElementById("SlideShowCaption").innerHTML = CaptionArray[ArrayIndex];

if (ArrayIndex == (SlideArraySize - 1))
  {ArrayIndex = 0;}
else 
  {ArrayIndex = ArrayIndex + 1;}

SlideShowTimer=setTimeout("ShowEMHESlideArray(" + ArrayIndex + ")", 7000); // 7 seconds

}


//=============== [ DRBC Slide Show ] ==============

function ShowDRBCSlideArray()
{
  SlideArraySize = 6;
  SlideArrayIndex = 0;
	SlideShowSpeed = 7;

  SlideArray = new Array(SlideArraySize);
  SlideArray[0]="/SlideShow/DRBCpicture1.jpg";
  SlideArray[1]="/SlideShow/DRBCpicture2.jpg";
  SlideArray[2]="/SlideShow/DRBCpicture3.jpg";
  SlideArray[3]="/SlideShow/DRBCpicture4.jpg";
  SlideArray[4]="/SlideShow/DRBCpicture5.jpg"; 
  SlideArray[5]="/SlideShow/DRBCpicture6.jpg";

  CaptionArray = new Array(SlideArraySize);
  CaptionArray[0]="(left to right) Evan Stone, PC&S; Dan Chieco, PC&S; Mark Shablin, project landscape contractor; and John Miller, P.E., Princeton Hydro, in front of the new DRBC sign.";
  CaptionArray[1]="(left to right) Participating in the ribbon-cutting ceremony are Cathy Curran Myers, Pennsylvania Commissioner; Dr. Harry Otto, Delaware Commissioner; Michele Putnam, New Jersey Commissioner; Mark Klotz, New York Commissioner, Lt. Col. Gwen Baker, U.S. Army, Federal Liason, Army Corps of Engineers; Dan Chieco, PC&S; Evan Stone, PC&S; Mark Shablin, project landscape contractor; and John Miller, P.E., Princeton Hydro. ";
  CaptionArray[2]="(left to right) Ken Najjar, DRBC; Chad Pindar, DRBC; Mark Shablin, project landscape contractor; Dan Chieco, PC&S; Evan Stone, PC&S; John Miller, P.E., Princeton Hydro; and Geoffrey M.Goll, P.E., Vice President of Princeton Hydro.";
  CaptionArray[3]="Dan Chieco of PC&S giving a tour of the DRBC site to Dr. Harry Otto, Delaware Commissioner.";
  CaptionArray[4]="Evan Stone of PC&S giving a tour of the DRBC site to Lt. Col. Gwen Baker, U.S. Army, Federal Liaison, U.S. Army Corps of Engineers."; 
  CaptionArray[5]="(Back row, left to right) Chad Pindar, DRBC; Mark Shablin, project landscape contractor; Dan Chieco, PC&S; Ken Najjar, DRBC;  Mike Beuke, PC&S. (front row, left to right) Evan Stone, PC&S; Rich Gore,  DRBC Chief Administrative Officer; Joel Totten, PC&S; and Josh Kanaplue, PC&S, at the DRBC Luncheon following the ribbon cutting ceremony.";

  document.getElementById("SlideShowSpeedText").innerHTML = SlideShowSpeed;
  PlaySlideshow(0); 

}


//=============== [ Churchville Slide Show ] ==============

function ShowChurchvilleSlideArray()
{
  SlideArraySize = 3;
  SlideArrayIndex = 0;
	SlideShowSpeed = 7;

  SlideArray = new Array(SlideArraySize);
  SlideArray[0]="/SlideShow/ChurchvillePhoto1.jpg";
  SlideArray[1]="/SlideShow/ChurchvillePhoto3.jpg";
  SlideArray[2]="/SlideShow/ChurchvillePhoto4.jpg";
	

  CaptionArray = new Array(SlideArraySize);
  CaptionArray[0]="PC&S Landscape plan for the Center ";
  CaptionArray[1]="Bucks County Commissioners accepting a check from Churchville Nature Center for the project";
	CaptionArray[2]="A photograph of the existing Churchville Nature Center building and landscape."; 

  document.getElementById("SlideShowSpeedText").innerHTML = SlideShowSpeed;
  PlaySlideshow(0); 

}




function PlaySlideshow(AI)
{
SlideArrayIndex = AI;

document.getElementById("SlidePicture").src = SlideArray[SlideArrayIndex];
document.getElementById("SlideCaption").innerHTML = CaptionArray[SlideArrayIndex];

if (SlideArrayIndex == (SlideArraySize - 1))
  {SlideArrayIndex = 0;}
else 
  {SlideArrayIndex = SlideArrayIndex + 1;}

SlideShowTimer=setTimeout("PlaySlideshow(" + SlideArrayIndex + ")", (SlideShowSpeed*1000)); 
}


function StopSlideshow()
{
  clearTimeout(SlideShowTimer);
}


function ShowPreviousSlide(AI)
{
var today = new Date();
  clearTimeout(SlideShowTimer);

if (SlideArrayIndex == 0)
  {SlideArrayIndex = (SlideArraySize - 1);} 
else 
  {SlideArrayIndex = SlideArrayIndex - 1;}

document.getElementById("SlidePicture").src = SlideArray[SlideArrayIndex]+"?s="+today.getSeconds();
document.getElementById("SlideCaption").innerHTML = CaptionArray[SlideArrayIndex];
	
}


function ShowNextSlide(AI)
{
var today = new Date();
  clearTimeout(SlideShowTimer);

if (SlideArrayIndex == (SlideArraySize - 1))
  {SlideArrayIndex = 0;}
else 
  {SlideArrayIndex = SlideArrayIndex + 1;}

document.getElementById("SlidePicture").src = SlideArray[SlideArrayIndex]+"?s="+today.getSeconds();
document.getElementById("SlideCaption").innerHTML = CaptionArray[SlideArrayIndex];
	
}


function SlideShowFaster()
{
if (SlideShowSpeed > 3)
  {SlideShowSpeed = SlideShowSpeed - 1;}

  document.getElementById("SlideShowSpeedText").innerHTML = SlideShowSpeed;
}


function SlideShowSlower()
{
if (SlideShowSpeed < 9)
  {SlideShowSpeed = SlideShowSpeed + 1;}

  document.getElementById("SlideShowSpeedText").innerHTML = SlideShowSpeed;
}


function HighlightSSB(SBB)
{
  document.getElementById(SBB).style.backgroundColor="#ccffff";
	document.getElementById(SBB).style.border="solid #bbbbbb 1px";
}


function ResetSSB(SBB)
{
  document.getElementById(SBB).style.backgroundColor="white";
	document.getElementById(SBB).style.border="solid white 1px";
}





//=========  Contact Link ========
function SetMlink(ID)
{
var person;
var account;
if (ID == "presLink") {person = "John Prybella, P.E. - President "; account = ID.substring(0,ID.length-4)+"01@";}
if (ID == "marketLink") {person = "Laura DePaul - Marketing "; account = ID.substring(0,ID.length-4)+"01@";}
if (ID == "hrLink") {person = "Tanya Swartz "; account = ID.substring(0,ID.length-4)+"01@";}
if (ID == "ForensicLink") {person = "Don Rife, P.L.S. - Froensic Surveys "; account = ID.substring(0,ID.length-4)+"01@";}
if (ID == "RJSnyderLink") {person = "Robert J. Snyder, P.L.S - Survey Department Manager "; account = ID.substring(0,ID.length-4)+"@";}
if (ID == "MHaversLink") {person = "Mark Havers, P.E. - Site Development Department Manager "; account = ID.substring(0,ID.length-4)+"@";}
document.getElementById(ID).href=Mlink1+Mlink2+person+account+DomName+"?Subject=INFORMATION REQUEST FROM WEB SITE";
}




//=============[ Change Opacity ]===================



function SolutionsLayerFadeOut()
{
var step = 100;

while (step > 0)
  {
	step = step - 10;
	setTimeout("ChangeOpacity('" + step + "');",500);
	}
}

function SolutionsLayerFadeIn()
{
var step = 0;

while (step < 100)
  {
	step = step + 10;
	setTimeout("ChangeOpacity('" + step + "');",500);
	}
}


function ChangeOpacity(OL)
{
var object = document.getElementById("SolutionsBannerLayer").style;

    object.opacity = (OL / 100);
    object.MozOpacity = (OL / 100);
    object.KhtmlOpacity = (OL / 100);
    object.filter = "alpha(opacity=" + OL + ")";
		
		object.display = "none";
		object.display = "block";
		
}










//=============== [ Bookmark Page ] ============
function BookmarkPage()
{

}


