
var popWin
ns4 = (document.layers)? true:false

function popthewin (url, vHeight, vWidth, vScrollBar) {

//popWin = window.open(url,'newWin','toolbar=no,status=no,scrollbars='+vScrollBar+',resizable=no,width=' + vWidth + ',height=' + vHeight + ',left=' + 79 + ',top=' + 320 + ',screeny=' + 320 + ',screenx=' + 79);		

popWin = window.open(url,'newWin','directories=no,location=no,menubar=no,toolbar=no,status=no,scrollbars='+vScrollBar+',resizable=no,width=' + vWidth + ',height=' + vHeight + ',left=' + 79 + ',top=' + 320 + ',screeny=' + 320 + ',screenx=' + 79);		





if (ns4) { // this is a mini-test to see if it is Netscape 4
			// this defines the size (height and width) of the popup for Netscape only
			popWin.innerWidth= vWidth;
			popWin.innerHeight= vHeight;
}

// this brings the popup window to the front if it is already opened

popWin.focus()

}

function popup(url, vHeight, vWidth, vScrollBar)  {
window.name = "main"
theurl = url
theHeight = vHeight
theWidth = vWidth
theScroll = vScrollBar

		// this defines the popup window, the position of it on the screen, and the size (height & width) of it for IE only
		vWin = (popWin)? true:false
		if (vWin) {
			if (!popWin.closed) {
				popWin.close()
            
                setTimeout("popthewin (theurl, theHeight, theWidth, theScroll)",500)		
			} else {
                  setTimeout("popthewin (theurl, theHeight, theWidth, theScroll)",500) 
                    }
		} else {
            setTimeout("popthewin (theurl, theHeight, theWidth, theScroll)",500)
                }


	}


function popthe2win (url, vHeight, vWidth, vScrollBar) {

popWin = window.open(url,'newWin2','toolbar=no,status=no,scrollbars='+vScrollBar+',resizable=no,width=' + vWidth + ',height=' + vHeight + ',left=' + 79 + ',top=' + 320 + ',screeny=' + 320 + ',screenx=' + 79);		

if (ns4) { // this is a mini-test to see if it is Netscape 4
			// this defines the size (height and width) of the popup for Netscape only
			popWin.innerWidth= vWidth;
			popWin.innerHeight= vHeight;
}

// this brings the popup window to the front if it is already opened

popWin.focus()

}
