<!--

/*
* showNoOpener function
* Description - tests if window.opener is present (Is this a pop-up window?)
* If window.opener is not NULL - prints out a close window link
* If window.opener is NULL - prints footer to navigate to LEOS Homepage.
* intended for glossary pop-ups
* Usage: <body><!-- VIPINCLUDE:societies:3049 --> ....  html stuff ...  <script language="JavaScript">showNoOpener();</script> <!-- /VIPINCLUDE:societies:3049 --></BODY>
*/
function showNoOpener(){
	if(window.opener) {
		document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="javascript:self.close()">Close this Window</A>');
	} else {
		document.write('<BR><BR><BR><P CLASS="inner">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thank you for visiting www.i-LEOS.org, your source for Lasers and Electro-Optics. <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;You can find us at: <A HREF="http://www.i-leos.org/" TARGET="_top">http://www.i-leos.org</A></P>');
		document.write('</BLOCKQUOTE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%"');
		document.write('<TR ><TD COLSPAN="2" WIDTH="100%" BGCOLOR="#FFFFDE">&nbsp;<BR><BR><BR><BR><BR><BR></TD></TR>');
		document.write('</TABLE>');
	}
}



/*
* getGlossary  and getGlossary2 pop-up window functions
* getGlossary function is called from normal browser windows.
* getGlossary2 function is called within a pop-up window that was called from getGlossary
* Usage <A HREF="javascript:getGlossary('file.html',windowHeight);">glossary term</A>
*		- where windowHeight = height in pixels
*/
var glossHandle = null;
function getGlossary(HTMLpage,windowHeight) {
	closePopUps();
    var glossURL = "/portal/cms_docs_societies/leos/subpages/glossary/"+HTMLpage;
		glossHandle = window.open(glossURL,'glossWindow','width=425,height='+windowHeight+',left=10,top=10,status=no,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no,resizable=no');
		if(!glossHandle.opener)	{
			glossHandle.opener = self;
		}
 		if (window.focus) {
			setTimeout('glossHandle.focus()',1000);
		}
	
	glossURL = null;
}

var glossHandle2 = null;
function getGlossary2(HTMLpage,windowHeight) {
	closePopUps();
    var glossURL2 = "/portal/cms_docs_societies/leos/subpages/glossary/"+HTMLpage;
	if(!glossHandle2 || glossHandle2.closed) 	{
		glossHandle2 = window.open(glossURL2,'glossWindow2','width=425,height='+windowHeight+',left=30,top=30,status=no,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no,resizable=no');
		if(!glossHandle2.opener) {
			glossHandle2.opener = self;
		}
 		if (window.focus) {
			setTimeout('glossHandle2.focus()',1000);
		}
	}else{ 
      if(glossHandle2) {
		glossHandle2.focus();
      	setTimeout("glossHandle2.location.href='" + glossURL2 + "'", 0000);
	  }
	}
	glossURL2 = null;
}

var glossHandle3 = null;
function getGlossary3(HTMLpage,windowHeight) {
	closePopUps();
    var glossURL3 = "/portal/cms_docs_societies/leos/subpages/glossary/"+HTMLpage;
	if(!glossHandle3 || glossHandle3.closed) 	{
		glossHandle3 = window.open(glossURL3,'glossWindow3','width=425,height='+windowHeight+',left=50,top=50,status=no,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no,resizable=no');
		if(!glossHandle3.opener) {
			glossHandle3.opener = self;
		}
 		if (window.focus) {
			setTimeout('glossHandle3.focus()',1000);
		}
	}else{ 
      if(glossHandle3) {
		glossHandle3.focus();
      	setTimeout("glossHandle3.location.href='" + glossURL3 + "'", 0000);
	  }
	}
	glossURL3 = null;
}

var glossHandle4 = null;
function getGlossary3(HTMLpage,windowHeight) {
	closePopUps();
    var glossURL4 = "/portal/cms_docs_societies/leos/subpages/glossary/"+HTMLpage;
	if(!glossHandle4 || glossHandle4.closed) 	{
		glossHandle4 = window.open(glossURL4,'glossWindow4','width=425,height='+windowHeight+',left=70,top=70,status=no,toolbar=no,menubar=no,scrollbars=no,location=no,directories=no,resizable=no');
		if(!glossHandle4.opener) {
			glossHandle4.opener = self;
		}
 		if (window.focus) {
			setTimeout('glossHandle4.focus()',1000);
		}
	}else{ 
      if(glossHandle4) {
		glossHandle4.focus();
      	setTimeout("glossHandle4.location.href='" + glossURL4 + "'", 0000);
	  }
	}
	glossURL4 = null;
}

/*
* closePopUps function
* closes pop-up windows on window.opener's  onUnLoad event of the BODY element
* Usage - <body onUnLoad="closePopUps()"><!-- VIPINCLUDE:societies:3049 -->
* Intended for the glossary pop-up windows etc...
* Add other window app handlers if needed.
*/
function closePopUps() {
	if (glossHandle) {
		if(!glossHandle.closed) {
			glossHandle.close();
		}
		glossHandle = null;
	}
	if (glossHandle2) {
		if(!glossHandle2.closed) {
			glossHandle2.close();
		}
		glossHandle2 = null;
	}
	if (glossHandle3) {
		if(!glossHandle3.closed) {
			glossHandle3.close();
		}
		glossHandle3 = null;
	}
	if (glossHandle4) {
		if(!glossHandle4.closed) {
			glossHandle4.close();
		}
		glossHandle4 = null;
	}
}


// --> 
