		winLeft = 100 ;
		winTop = 100;
		masterProps =   "location=no,menubar=yes,scrollbars=yes,toolbar=no,resizable=yes,status=yes,left="
		scrollNoSatus = "location=no,menubar=no,scrollbars=yes,toolbar=no,resizable=yes,status=no,left="
		noTrim =        "location=no,menubar=no,scrollbars=no,toolbar=no,resizable=yes,status=no,left="
		
		if(screen) {
			var screenHeight=screen.availHeight; 
			var screenWidth=screen.availWidth;
		} else {
			screenWidth = 800;
			screenHeight = 600;
		}
		

		function centerWin(thisWinWidth,thisWinHeight) {
			// for centering new window, if browser supports it.
			winLeft = ((screenWidth - thisWinWidth)/2 - 5); 
			winTop = ((screenHeight - thisWinHeight)/2  - 80);
			if (screenHeight-104 < thisWinHeight) {
				thisWinHeight = screenHeight - 140;
				winTop = winTop + 40 
			}
		}

		function popupWin(URL,winWidth,winHeight) {
		   	winURL = "/ExternalWindowFS.html?" + URL;
		   	if(arguments.length != 3) {
				winWidth = 780;
				winHeight = 500;
		   	}
			centerWin(winWidth,winHeight);
			
			var windowprops = masterProps;
			windowprops += winLeft + ",top=" + winTop + ",width=" + winWidth + ",height=" + winHeight;
			popup = window.open(winURL,"External",windowprops);
			popup.focus();
		}

		function popupCoBrandedWin(URL,winWidth,winHeight) {
		   	if(arguments.length != 3) {
				winWidth = 780;
				winHeight = 500;
		   	}
			centerWin(winWidth,winHeight);
			
			var windowprops = scrollNoSatus;
			windowprops += winLeft + ",top=" + winTop + ",width=" + winWidth + ",height=" + winHeight;
			popup = window.open(URL,"External",windowprops);
				popup.focus();
		}

		function popupEscapableWin(URL,winWidth,winHeight) {
			winURL = "/ExternalWindowEscFrameFS.html?" + URL;
		   	if(arguments.length != 3) {
				winWidth = 800;
				winHeight = 500;
		   	}
			centerWin(winWidth,winHeight);
			
			var windowprops = masterProps;
			windowprops += winLeft + ",top=" + winTop + ",width=" + winWidth + ",height=" + winHeight;
			popup = window.open(winURL,"External",windowprops);
				popup.focus();
		}
		
		function popupBrandedWin(URL,winWidth,winHeight) {
		   	winURL = "/ExternalBrandedWindowFS.html?" + URL;
		   	if(arguments.length != 3) {
				winWidth = 780;
				winHeight = 500;
		   	}
			centerWin(winWidth,winHeight);
			
			var windowprops = masterProps;
			windowprops += winLeft + ",top=" + winTop + ",width=" + winWidth + ",height=" + winHeight;
			popup = window.open(winURL,"External",windowprops);
				popup.focus();
		}
		
		function popupCoBrandedWin(URL,winWidth,winHeight) {
		   	winURL = "/ExternalBrandedEscFrameFS.html?" + URL;
		   	if(arguments.length != 3) {
				winWidth = 780;
				winHeight = 500;
		   	}
			centerWin(winWidth,winHeight);
			
			var windowprops = masterProps;
			windowprops += winLeft + ",top=" + winTop + ",width=" + winWidth + ",height=" + winHeight;
			popup4 = window.open(winURL,"External",windowprops);
		}

		function popupProvWin(URL,winWidth,winHeight) {
		   	if(arguments.length != 3) {
				winWidth = 780;
				winHeight = 500;
		   	}
			centerWin(winWidth,winHeight);
			
			var windowprops = scrollNoSatus;
			windowprops += winLeft + ",top=" + winTop + ",width=" + winWidth + ",height=" + winHeight;
			popup4 = window.open(URL,"SizedExternal",windowprops);
		}

		function changePage(ref) {
		  if (ref.options[ref.selectedIndex].value != ' ') {
		  	selectedValue = ref.options[ref.selectedIndex].value;
			ref.options.selectedIndex = 0;
		  	window.location.href = selectedValue;
		  }
		}

		function efaq(faqID,winWidth,winHeight){
			centerWin(winWidth,winHeight);
			
			var windowprops = scrollNoSatus + winLeft + ",top=" + winTop + ",width=" + winWidth + ",height=" + winHeight;
			//efaqPopup = window.open("/AFrames/Directory/EMail/newResultpageSmall.html","Answer",windowprops);
			efaqPopup = window.open("https://efaq.providentcu.org/eFAQ/ASPtemplates/newResultpageSmall.asp?FAQList=2;&GRADE=3.5&Question=" + faqID,"Answer",windowprops);
			efaqPopup.focus();
		}		
		
		function toDOM(HTMLstring) {
			var d = document.createElement('div');
			d.innerHTML = HTMLstring;
			var docFrag = document.createDocumentFragment();
			
			while (d.firstChild) {
				docFrag.appendChild(d.firstChild)
			}
			return docFrag;
		}
		
		function winlessWin(which,w,h,clickTitle) {
			hideDark();
			w = parseInt(w);
			h = parseInt(h);
			
			var popUpText = "";
			popUpText += eval("document.pops." + which + ".value");
		
			w = w + 40;
			h = h + 40;
			
			objPP_FAQ_window = document.getElementById('PP_FAQ_wrap');
			objPP_FAQ_DIV = objPP_FAQ_window.getElementsByTagName("div")[0]
			
			var faqButton = '<p class="buttons" id="faqButton2" style="margin:2em 0 0 0; line-height:.5em;"><a href="#" onclick="hideDark(); return false;" class="button default" title="' + clickTitle + '"><span> OK <"+"/span><'+'/a><'+'/p>'
			objInnerDiv = objPP_FAQ_DIV.getElementsByTagName("div")[0]
			if ( objInnerDiv.hasChildNodes() ) while ( objInnerDiv.childNodes.length >= 1 ) objInnerDiv.removeChild( objInnerDiv.firstChild );       
			objInnerDiv.appendChild(toDOM(popUpText + faqButton))
			
			//objPP_FAQ_DIV.getElementsByTagName("div")[0].innerHTML = popUpText + faqButton;
						
			
			objPP_FAQ_DIV.style.width = w + "px";
			if(!document.all) objPP_FAQ_DIV.style.maxHeight = h + "px";
			else objPP_FAQ_DIV.style.setExpression("height",'this.scrollHeight > ' + h + ' ? ' + h + ' + "px" : "auto"') // h + "px";
			objPP_FAQ_DIV.style.top = "-" + (h/2) + "px";
			
			showDark(objPP_FAQ_window)
			
		}

