function popupnewsform(target) {
     window.open(target, 'epinews', 'resizable,scrollbars,menubar,width=770,height=550');
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function menu(type) {
	if(type == "public") {
		document.write('<a class="menu" href="http://www.wise.pitt.edu/index.html">Home</a>');
		document.write('<a class="menu" href="http://www.wise.pitt.edu/about.html">About Us</a>');
		document.write('<a class="menu" href="http://www.wise.pitt.edu/publications.html">Publications</a>');
		document.write('<a class="menu" href="http://www.wise.pitt.edu/contact.html">Contact</a>');
		document.write('<br>');
		document.write('<a class="menu" href="http://www.wise.pitt.edu/research/">For Researchers</a><br><br><br><br><br><br>');
	}
	else if(type == "research") {
		document.write('<a class="menu" href="http://www.wise.pitt.edu/research/index.html">Home</a>');		
		document.write('<a class="menu" href="http://www.wise.pitt.edu/cgi-win/news/news_page.exe">News &amp; Events</a>');
		document.write('<a class="menu" href="http://www.wise.pitt.edu/cgi-win/directory/directory.exe?1">Directory</a>');
		document.write('<a class="menu" href="http://www.wise.pitt.edu/research/Documents/">Document Sharing</a>');
		//document.write('<a class="menu" href="http://www.wise.pitt.edu/research/P&P">P&P</a>');
		document.write('<br>');
		document.write('<a class="menu" href="http://www.wise.pitt.edu">Public Site</a><br><br><br><br><br><br>');
	}
}

function doTop(type) {
	if(type == "public" || type == "research") {
		document.write('<table align="center" bgcolor="#12004C" WIDTH="750" COLS=0 BORDER=0 CELLSPACING=0 CELLPADDING=1>');
		document.write('   <tr>');
		document.write('	   <td valign="top">');
		document.write('			<table bgcolor="#ffffff" WIDTH="750" COLS=0 BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('			   <tr>');
		document.write('				   <td valign="top">');
		document.write('				  ');
		document.write('						<!-- header start -->');
		document.write('						<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=0 WIDTH="750">');
		document.write('							<tr>');
		document.write('								<td><img src="http://www.edc.gsph.pitt.edu/wise/images/header.jpg" border=0></td>');
		document.write('							</tr>');
		document.write('						</table>');
		document.write('						<!-- header end -->  ');
		document.write('						');
		document.write('						<!-- body start --> ');
		document.write('						<TABLE WIDTH="750" COLS=3 BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('							<tr>');
		document.write('								<!-- left portion start--> ');
		document.write('								<td background="http://www.edc.gsph.pitt.edu/wise/images/menuback.jpg" width="199" valign="top"> ');
		document.write('');
		document.write('									<!-- menu start--> ');
		document.write('									<img src="http://www.edc.gsph.pitt.edu/wise/images/menutop.jpg" border="0">');
		document.write('									<table width="199" BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('										<tr>');
		document.write('											<td width="199">');
		menu(type);
		document.write('											</td>');
		document.write('										</tr>');
		document.write('									</table>');
		document.write('									<!-- menu end-->');
		document.write('								</td> ');
		document.write('								<!-- left portion end-->');
		document.write('						');
		document.write('								<!-- middle portion start-->	');
		document.write('								<td width="541" valign="top" id="content">');
	}
	else if(type == "db") {
		document.write('<table align="center" bgcolor="#12004C" WIDTH="750" COLS=0 BORDER=0 CELLSPACING=0 CELLPADDING=1>');
		document.write('   <tr>');
		document.write('	   <td valign="top">');
		document.write('			<table bgcolor="#ffffff" WIDTH="750" COLS=0 BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('			   <tr>');
		document.write('				   <td valign="top">');
		document.write('				  ');
		document.write('						<!-- header start -->');
		document.write('						<table BORDER=0 CELLSPACING=0 CELLPADDING=0 COLS=0 WIDTH="750">');
		document.write('							<tr>');
		document.write('								<td><img src="http://www.edc.gsph.pitt.edu/wise/images/header-db.jpg" border=0></td>');
		document.write('							</tr>');
		document.write('						</table>');
		document.write('						<!-- header end -->  ');
		document.write('						');
		document.write('						<!-- body start --> ');
		document.write('						<TABLE WIDTH="750" COLS=3 BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('							<tr>');
		document.write('								<!-- middle portion start-->	');
		document.write('								<td class="tiny" width="10" valign="top">&nbsp;</td>');
		document.write('								<td width="730" valign="top" id="content">');
	}
	else if(type == "newsadmin") {
		document.write('<table align="center" bgcolor="#ffffff" WIDTH="700" COLS=0 BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('   <tr>');
		document.write('	   <td valign="top">');
		document.write('			<table bgcolor="#ffffff" WIDTH="700" COLS=0 BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('			   <tr>');
		document.write('				   <td valign="top">');
		document.write('						<!-- body start --> ');
		document.write('						<TABLE WIDTH="700" COLS=3 BORDER=0 CELLSPACING=0 CELLPADDING=0>');
		document.write('							<tr>');
		document.write('								<!-- middle portion start-->	');
		document.write('								<td class="tiny" width="10" valign="top">&nbsp;</td>');
		document.write('								<td width="680" valign="top" id="content">');
		document.write('								<br>');
	}
}

function doBottom(type) {
	if(type == "db") {
		document.write('						<br><br>');
		document.write('								</td>');
		document.write('								<td class="tiny" width="10" valign="top">&nbsp;</td>');
		document.write('								<!-- middle portion end--> ');
		document.write('				</tr>');
		document.write('			</table>');
		document.write('			<!-- body end -->  ');
		document.write('			');
		document.write('			<!-- footer start -->');
		document.write('			<table border="0" cellpadding="0" cellspacing="0" width="750">');
		document.write('			   <tr>');
		document.write('				   <td valign="center" class="footer" background="http://www.edc.gsph.pitt.edu/wise/images/footer.jpg" height="22" border=0>');
		document.write('				   &nbsp;<a href="http://www.edc.gsph.pitt.edu" target="_blank"><img src="http://www.edc.gsph.pitt.edu/wise/images/edclogo2.jpg" border="0"></a>&nbsp;<span class="footer"><a class="footer" href="http://www.edc.gsph.pitt.edu" target="_blank">Epidemiology Data Center</a>, <A class="footer" href="http://www.pitt.edu" target="_blank">University of Pittsburgh</A> &nbsp;&nbsp;&nbsp;&copy; <Script Language="JavaScript">var now = new Date; document.write(now.getYear() < 1000 ? now.getYear() + 1900 : now.getYear());</Script>');
		document.write('				');
		document.write('					All rights reserved</span>');
		document.write('				   </td>');
		document.write('			   </tr>');
		document.write('			</table>');
		document.write('			<!-- footer start -->');
		document.write('				');
		document.write('					</td>');
		document.write('				</tr>');
		document.write('			</table> ');
		document.write('		</td>');
		document.write('	</tr>');
		document.write('</table> ');		
		document.write('</body>');		
		document.write('</html>');
	}
	else if(type == "newsadmin") {
		document.write('						<br><br>');
		document.write('								</td>');
		document.write('								<td class="tiny" width="10" valign="top">&nbsp;</td>');
		document.write('								<!-- middle portion end--> ');
		document.write('				</tr>');
		document.write('			</table>');
		document.write('			<!-- body end -->  ');
		document.write('					</td>');
		document.write('				</tr>');
		document.write('			</table> ');
		document.write('		</td>');
		document.write('	</tr>');
		document.write('</table> ');
		document.write('</body>');
		document.write('</html>');
	}
	else {
		document.write('						<br><br>');
		document.write('								</td>');
		document.write('								<td class="tiny" width="10" valign="top">&nbsp;</td>');
		document.write('								<!-- middle portion end--> ');
		document.write('				</tr>');
		document.write('			</table>');
		document.write('			<!-- body end -->  ');
		document.write('			');
		document.write('			<!-- footer start -->');
		document.write('			<table border="0" cellpadding="0" cellspacing="0" width="750">');
		document.write('			   <tr>');
		document.write('				   <td valign="center" class="footer" background="http://www.edc.gsph.pitt.edu/wise/images/footer.jpg" height="22" border=0>');
		document.write('				   &nbsp;<a href="http://www.edc.gsph.pitt.edu" target="_blank"><img src="http://www.edc.gsph.pitt.edu/wise/images/edclogo2.jpg" border="0"></a>&nbsp;<span class="footer"><a class="footer" href="http://www.edc.gsph.pitt.edu" target="_blank">Epidemiology Data Center</a>, <A class="footer" href="http://www.pitt.edu" target="_blank">University of Pittsburgh</A> &nbsp;&nbsp;&nbsp;&copy; <Script Language="JavaScript">var now = new Date; document.write(now.getYear() < 1000 ? now.getYear() + 1900 : now.getYear());</Script>');
		document.write('				');
		document.write('					All rights reserved</span>');
		document.write('				   </td>');
		document.write('			   </tr>');
		document.write('			</table>');
		document.write('			<!-- footer start -->');
		document.write('				');
		document.write('					</td>');
		document.write('				</tr>');
		document.write('			</table> ');
		document.write('		</td>');
		document.write('	</tr>');
		document.write('</table> ');
		document.write('</body>');
		document.write('</html>');
	}
}
