<!--		

function branchlocater() {
	window.location=document.branchform.branchlinks.options[document.branchform.branchlinks.selectedIndex].value;
}

function quickLink() {
	window.location=document.quickLinksForm.quickLinks.options[document.quickLinksForm.quickLinks.selectedIndex].value;
}

function otherLogin() {
	window.location=document.otherLogin_form.otherService.options[document.otherLogin_form.otherService.selectedIndex].value;
}

/* This function is used when you want to have browsers that do not 
have flash player installed write an image file instead */

function writeFlashOrImage(FlashName,ImageName,Width,Height,Alt,FlashVersion) {
	// first, write the opening object tag  

	strObjectTag = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
	strObjectTag = strObjectTag + ' width="' + Width + '" height="' + Height + '" ';
	strObjectTag = strObjectTag + 'codebase="https://active.macromedia.com/flash5/cabs/swflash.cab#version=';
	strObjectTag = strObjectTag + FlashVersion + '">';
	strMovieParam = '<param name="movie" value="' + FlashName + '">';
	document.write(strObjectTag);
	document.write(strMovieParam);
	document.write('<param name="play" value="true">');
	document.write('<param name="loop" value="true">');
	document.write('<param name="quality" value="high">');

	// if the Flash Plug-in is installed and a browser than user plug-ins is the browser, write an embed tag
	plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
		strImageTag = '<image src="' + ImageName + '" width="' + Width + '" height="' + Height + '" ';
		strImageTag = strImageTag + ' border="0" alt="' + Alt + '">';
	if ( plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 4 )
		{
		strEmbedTag = '<embed src="' + FlashName + '" width="' + Width + '" height="' + Height + '" ';
		strEmbedTag = strEmbedTag + 'play="true" loop="true" quality="high" ';
		strEmbedTag = strEmbedTag + 'pluginspace="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">';
		document.write(strEmbedTag);
		document.write('</embed>');
		}
	// otherwise, then write an image tag.
	else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write(strImageTag);
		}
	
	//finally, write the closing object tag
	document.write('</object>');
}

/* Use this function to open new windows in a browser */

function openNewWindow(URL,windowName,optionList) {
	/* Opens a new window based on following parameters
		URL: A full URL to the site or file you wish to open
		windowName: The name of the Window that JS assigns when creating
		optionList: (Optional)--list of options for the pop-up window
	*/
	optionListValue = optionList;
	// Assign a Default Set of Parameters if the optionList does not exist
	if ((optionListValue == '') || (optionList == null)) {
		optionListValue = 'scrollbars=yes,location=yes,menubar=yes,toolbar=yes,resizable=yes,status=yes,locationbar=yes';
	}
	winOpener = window.open(URL,windowName,optionListValue);
	winOpener.focus();
}

function loadTopFrame(URL) {
	top.document.location = URL
}

function popupWindow(URL,windowName,optionList) {
	/* Opens a new window based on following parameters
		URL: A full URL to the site or file you wish to open
		windowName: The name of the Window that JS assigns when creating
		optionList: (Optional)--list of options for the pop-up window
	*/
	optionListValue = optionList;
	// Assign a Default Set of Parameters if the optionList does not exist
	if ((optionListValue == '') || (optionList == null)) {
		optionListValue = 'height=300,width=270,scrollbars,location=no,menubar,toolbar=no,resizable=no,status=no,locationbar=no';
	}
	winOpener = window.open(URL,windowName,optionListValue);
	winOpener.focus();
}

function PBvalidateZip(zForm) { //v1.0
	var zipCode = zForm.zip_code.value;	 
	var validNum = "0123456789";
	if (zipCode.length != 5) {
		alert("Please enter your 5 digit zip code.");
		return false;
	}
	for (var i=0; i < zipCode.length; i++) {
		temp = "" + zipCode.substring(i, i+1);
		if (validNum.indexOf(temp) == "-1") {
			alert("There are invalid characters in your zip code.  Please correct and try again.");
			return false;
		}
	}
return true;	
}
	function PBCookiesEnabledChk(){
	/*Check if cookies are disabled and display an error page*/
	if (navigator.appName.indexOf("Microsoft") != -1) {
	        if (!navigator.cookieEnabled){
			document.location.href = "/siterequirements";
			return false;
		} else {
			return true;
		}
	}
	if (navigator.appName.indexOf("Netscape") != -1) {
		/*Sinse there is no property in Netscape to check if cookies are enabled,*/
		/*we try to create a cookie and then retrieve it.*/
		/*If it is not there, then that means that cookies are disabled.*/
   		document.cookie = "PBTestCookie=yes";
   		var allcookies = document.cookie;

   		if (allcookies.indexOf("PBTestCookie=") != -1) {
			return true;
		}else{
			document.location.href = "/siterequirements";
			return false;
      	}
	}
}

//HOMEPAGE.JS COMBINED

function openScript(url, width, height) {
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=yes,scrollbars=yes,menubar=yes,status=yes,toolbar=yes');
}

function newWinNoResize(url, width, height) {
	var w = 480, h = 340;
	if (document.all) {
		/* the following is only available after onLoad */
   		w = document.body.clientWidth;h = document.body.clientHeight;
	} else if (window.innerWidth) {
		w = window.innerWidth;h = window.innerHeight;
	}
	var popW = width, popH = height;
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,left='+ leftPos + ',top=' + topPos +',menubar=no,status=no,toolbar=no');
}
function gotoURL() {
	var Current = document.formName.selectName.selectedIndex;window.location.href = document.formName.selectName.options[Current].value;return false;
}
/* OLD V6 FUNCTIONS NOT USED
function print_win() {
	window.open('/print/0,8427,1,00.html','mywindow','width=624,height=400,toolbar=yes,location=no,directories=no,scrollbars=yes,status=no,menubar=yes,resizable=yes');
}
function print_pbct_win() {
	window.open('/pbct/print_pbct/0,,1,00.html','mywindow','width=624,height=400,toolbar=yes,location=no,directories=no,scrollbars=yes,status=no,menubar=yes,resizable=yes');
}
*/
function MM_validateForm() {
 var alertsayheader = "The following error(s) occurred:\n";       
 var alertsay = ""; 
 var minLength = 6; /*Minimum username length*/
 var uminLength = 6; /*Minimum password length*/
 var uname = document.myform1.txtUsername.value;
 var pword = document.myform1.txtPassword.value;
 document.myform1.action = 'https://pcb.peoples.com/peoples/login.aspx'; 
 
 if (uname.length < uminLength) {
  alertsay += ' - Please enter a valid username.\n';
  document.myform1.txtUsername.focus();
 }
 if (pword.length < minLength) {
  alertsay += ' - Please enter a valid password.\n';
  document.myform1.txtPassword.focus();
 }
 if (alertsay != "") {
   alert(alertsayheader + alertsay);
   return false;    
 } else {
 	cmCreateConversionEventTag("LOGIN TO POL",2,"LOGIN",null);
	cmCreatePageviewTag('POL-HOME','1001',null,null,cm_customer_id);
 }
}
/*endfunc*/

function checkCookiesEnabled(){
	if (navigator.appName.indexOf("Microsoft") != -1) {
		if (!navigator.cookieEnabled){
			document.location.href = "/siterequirements";
			return false;
		} else {
			return true;
		}
	} else {
		/*Check if cookies are disabled and display an error page*/
		var cookieName = 'PBTestCookie' + (new Date().getTime());
		document.cookie = cookieName + '=yes';
		var cookiesEnabled = document.cookie.indexOf(cookieName) != -1;
		if (cookiesEnabled) {
			return true;			
		} else {			
			document.location.href = "/siterequirements";
			return false;
		}
	}
}
/*endfunc*/
function readCookieName(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") 
    return "";
	var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
	document.myform1.txtUsername.value = unescape(theCookie.substring(ind+cookieName.length+1,ind1));	
}

/*endfunc*/
function changeImage(imageName,newImageSource) {
	if (document.images) {
		document.images[imageName].src = newImageSource;
	}
}
	
//-->

