// JavaScript Document
// based on core.js function from 703 Food Safety Toolbox
//-------------------------------
//Example
//<a href="../xx.htm" target="_blank" onclick="popUp(this.href, 'toolkit');return false;" title="Who's responsibility is OHS">

function popUp(newPage,popMode,pX,pY,pW,pH,pScroll,pResize,pTool,pLoc,pMenu)  {
if(!pX){
//default settings
pX=0
pY=0
pW=10 //set to this size to test for errors in calling popup function.
pH=10 //
pScroll = "AUTO"
pResize = "NO"
pTool= 0
pLoc=0
pMenu=1
}	
//------popup settings------
	if(popMode=="popupPage"){
		pW = 615
		pH = 600
		pScroll = "yes"
		pResize = "yes"
	}
	if(popMode=="popupPage2"){
		pW = 615
		pH = 600
		pScroll = "yes"
		pResize = "yes"
	}
	if(popMode=="popupBox"){
		pW = 300
		pH = 200
		pScroll = "yes"
		pResize = "yes"
	}
	if(popMode=="popupGlossary"){
		pW = 550
		pH = 600
		pScroll = "yes"
		pResize = "yes"
	}
	if(popMode=="popupIntranet"){
		pW = 830
		pH = 600
		pScroll = "yes"
		pResize = "yes"
	}
//--------------------------
	var popProperties = "width=" + pW + ", height=" + pH + ", left="+pX+", top="+pY+", scrollbars="+pScroll+" ,resizable="+pResize+",toolbar="+pTool+", location="+pLoc+", menubar="+pMenu+"";
	newWindow = window.open(newPage, popMode, popProperties);
	newWindow.focus();
}

function closeWin() {
	window.close();
}