function displayBreadCrumb(BUcalledRoutine,pagePath,level3display,level3link,level2display,level2link,level1display,level1link)

{

newfolderpath = "";

//convert all to lower case for display

displayPath = pagePath.toLowerCase();



offset = displayPath.indexOf("_");



// remove any underscores and replace with spaces

while (offset > 0)

   {

     first = displayPath.substr(0,offset);

     second = displayPath.substr(offset + 1,displayPath.length);

     displayPath = first + " " + second;

     offset = displayPath.indexOf("_");

   }



offset = pagePath.indexOf("/");



pagePath = pagePath.substr(offset + 1,pagePath.length);

displayPath = displayPath.substr(offset +1,displayPath.length);



counter=0;

offset = pagePath.indexOf("/");



// write home out to page

document.write("<A class='leftnavactive' HREF='" + newfolderpath + "/index.asp'>home</a> > ");



if (BUcalledRoutine)

{

while (offset > 0)

	{

	folderlink = pagePath.substr(0,offset);

	dfolderlink = displayPath.substr(0,offset);

	pagePath = pagePath.substr(offset + 1,pagePath.length);

	displayPath = displayPath.substr(offset + 1,displayPath.length);



	newfolderpath = newfolderpath  + "/" + folderlink;



	offset = pagePath.indexOf("/");



	if (counter < 1)

		{

		switch(dfolderlink)

			{

			case "main":

			case "Corning":

				break;



			case "products services":

				document.write("<A class='leftnavactive' HREF='" + newfolderpath + "/index.asp'>products + services</a> > ");

				break;



			default:

				document.write("<A class='leftnavactive' HREF='" + newfolderpath + "/index.asp'>" + dfolderlink + "</a> > ");

				break;

			}

		counter++;

		}

	}

}

if (level1display.length > 0)

    {document.write("<A class='leftnavactive' HREF='" + level1link + "'>" + level1display +

"</a>");

    }



if (level2display.length > 0)

    {document.write(" > <A class='leftnavactive' HREF='" + level2link + "'>" + level2display +

"</a>");

    }



if (level3display.length > 0)

    {document.write(" > <A class='leftnavactive' HREF='" + level3link + "'>" + level3display +

"</a>");

    }

}



function goPage(selectName)

{

if (selectName.selectedIndex > 0)

  {

   document.location = selectName[selectName.selectedIndex].value;

  }

}



// --------------------------------------------------\\

// !!!!!!!!!!
// DEPRECATED AS OF 4/23/04
// USE LinkPopup FOR POPUPS
// !!!!!!!!!!

// PopWindow is a generic Pop-Up Window function.
// Parameters are passed to the function instead of including them in the function.
// Problems? Direct them to Tom Patros.

// Revisions
// 6.15.01 - created --- "url" + "name" parameters must be in single quotes during function call
	// "width" + "height" = size of window (in pixels) to be opened
	// "xdistance" + "ydistance" = distance (in pixels) of window from top left corner of browser window
// 7.7.01 - Added "resize" + "scroll" parameters --- use 1 and 0 in function call to denote "on" + "off" value

function PopWindow(url,name,width,height,xdistance,ydistance,resize,scroll) {
	// OpenString stores all of the parameters to make life a little easier
	var OpenString = "'" + 'toolbar=0,'
	+ 'location=0,'
	+ 'directories=0,'
	+ 'status=0,'
	+ 'menubar=0,'
	+ 'scrollbars=' + scroll + ','
	+ 'resizable=' + resize + ','
	+ 'width=' + width + ','
	+ 'height=' + height + ','
	+ 'left=' + xdistance + ','
	+ 'top=' + ydistance + ','
	+ 'screenX=' + xdistance + ','
	+ 'screenY=' + ydistance + "'";

	// open the window
	window.open(url,name,OpenString);
}

// --------------------------------------------------\\
// LinkPopup is a generic Pop-Up Window function, replacing PopWindow for accessiblity concerns and cleaning code
// Parameters are passed to the function instead of including them in the function.
// URL parameter is replaced with "src", which references the link in the DOM, and uses the specified URL
// Problems? Direct them to Tom Patros.

function LinkPopup(src,width,height,xdistance,ydistance,resize,scroll) {

	var OpenString = "'" + 'toolbar=0,'
	+ 'location=0,'
	+ 'directories=0,'
	+ 'status=0,'
	+ 'menubar=0,'
	+ 'scrollbars=' + scroll + ','
	+ 'resizable=' + resize + ','
	+ 'width=' + width + ','
	+ 'height=' + height + ','
	+ 'left=' + xdistance + ','
	+ 'top=' + ydistance + ','
	+ 'screenX=' + xdistance + ','
	+ 'screenY=' + ydistance + "'";
	
	var theWindow = window.open(src.getAttribute('href'),"_blank",OpenString)
	theWindow.focus();
	return theWindow;

}

// Controls the visibility of the associated div tag as per
// supplied dropdown widget and value.
// 2005/03/10 SD
function togglevisibility(dropdown, value, divid) {
    if (dropdown != null) {
	    if(dropdown.value == value) {
	    	document.getElementById("div_" + divid).style.display="block";
	    } else {
		    document.getElementById("div_" + divid).style.display="none";
	    }
	}
}


//the following function launches the eRecruit window containing a frameset housing the PeopleSoft eRecruit servlet.			
function openRecruit(lnFlag) {
	var targetPage
	var recruitWindow
	targetPage = "http://www.corning.com/utility/recruitingSolutions.aspx?languageFlag=" + lnFlag
	recruitWindow = window.open(targetPage,'eRecruit',"width=668,height=400,top=185,left=40,screenX=0,screenY=0,resizable=1,menubar=0,scrollbars=1,status=1");

}