// set the image counter
var count = 0;

function suppressErrors() {return true}


function EM(name,user,addr) {
        if (name == null) alert("must specify at least the name!");
        if (user == null) user = name;
        if (addr == null) addr = "neurovia.umn.edu";
        return("<a HREF=mailto:" + user + "@" + addr + ">" + name + "</a>");
}
function PR(str) {
        window.document.writeln(str);
}



function print_inc_header() {
	window.document.writeln(
		"<table cellpadding=0 cellspacing=0 border=0 width=820 align=left>",
		"<tr><td align=left><a href=/INC/><img src=/INC/images/button_inc_trans.gif width=45 height=30></a></td>",
		"<tr><td align=center><img src=/INC/images/transparent.gif width=45 height=15></td></tr>",		
		"<tr><td align=left><a href=http://www.nimh.nih.gov/neuroinformatics/index.cfm target=new>",
		"<img src=/INC/images/button_koz_trans.gif width=45 height=30></a></td>",
		"</tr></table>",
		"<table cellpadding=0 cellspacing=0 border=0 width=45 height=90 align=left>",
		"<tr><td rowspan=3 valign=middle><a href=/nva.php><img src=/INC/images/nva_logo.png width=45 height=30></td></tr>",
		"</table>");
}





function print_marquee() {
        window.document.writeln(
    		"<table CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=90%><tr>",
                	"<td WIDTH=90% VALIGN=top>",
				"<marquee behavior=slide><font COLOR=maroon SIZE=-1>***** ",
				"<a href=/INC/About/news.php>INC news</a>  ... ",
				"<a href=/INC/Resources/Downloads/download_parcelman.php target=new>ParcelMan V1.0Download</a> ... ",
       				"<a href=/INC/Resources/Downloads/download_mcstrip.php target=new>McStrip V1.0Download</a> ... ", 
       				"<a href=/INC/Resources/Services/service_bee.php target=new>Brain Extraction Evaluation Web Service</a> ... ",
       				"<a href=/INC/Resources/Downloads/download_npairs.php target=new>NPAIRS data analysis package</a> ... ", 
       				"<a href=/incweb/circlepack target=new>Flat Mapping Demo</a></font>",
       				"</marquee>",
    			"</td>",
    		"</tr>",
		"</table>");
}

function print_inc_footer() {
	window.document.writeln(
		 "<table CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=90% ALIGN=center><tr>",
                	"<td WIDTH=90% VALIGN=top ALIGN=center NOWRAP>",
				"<font COLOR=white><a href=/INC/About/News/index.php style=><b>What's New</a> | ",
				"<a href=/INC/contact.php>Contact INC</a> | ",
				"<a href=/INC/privacy.php>Privacy Statement</a> | ",
				"<a href=/INC/sitemap.php>Site Map</a></b></font>",
			"</td>",
    		"</tr>",
		"</table>");
}

function print_postscript() {
	var now = new Date();
	var mod = new Date(document.lastModified);
	var modDate = (mod.getMonth() + 1) + "/" + mod.getDate() + "/" + mod.getFullYear();
	var thisYear = now.getFullYear();

	var aceDate=new Date()
	var aceYear=aceDate.getYear()
	if (aceYear < 1000)
	aceYear+=1900
	var aceDay=aceDate.getDay()
	var aceMonth=aceDate.getMonth()+1
	if (aceMonth<10)
	aceMonth="0"+aceMonth
	var aceDayMonth=aceDate.getDate()
	if (aceDayMonth<10)
	aceDayMonth="0"+aceDayMonth

	window.document.writeln(
		"<table CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=90% ALIGN=center><tr>",
			"<br>",
                	"<td WIDTH=90% VALIGN=top ALIGN=center NOWRAP>",
			"<br><font COLOR=white SIZE=-1>&copy; ",thisYear," by the ",
			"International Neuroimaging Consortium</a><br>",
			"with funding from the ",
			"<a href=http://www.nimh.nih.gov/neuroinformatics/index.cfm TARGET=_new>Human Brain Project</a> ",
 			"and the Regents of the ",
			"<a href=http://www.umn.edu TARGET=_new>University of Minnesota</a>.<br>",
			"The University of Minnesota is an equal opportunity educator and employer.<br>",
			"Last Modified: ",aceMonth,"/",aceDayMonth,"/",aceYear," ",
			"by the INC <a HREF=mailto:webmaster@neurovia.umn.edu>Webmaster</a>.",
			"</font></td>",
		"</tr>",
		"</table>");
}

// BEE Web form	
// identify browser and version number
var bflag=0;
var sf=1;
bName=navigator.appName;
bVer=parseInt(navigator.appVersion);
if (bName == "Netscape") {
        bflag=1;
        sf=2;
        }
if (bName == "Netscape" && bVer >= 5) br="n6";
else if (bName == "Microsoft Internet Explorer" && bVer >= 4) br="e4";
else br="neither";

function rowSpacer(npix) {
        var npix;
        document.write("<tr> <td> <img SRC=/INC/images/transparent.gif HEIGHT=",npix*sf,"> </td> </tr>");
        }



function showimage(imgName,xs,ys,title,caption) {
        var imgName,xs,ys,title,caption;
        options = "WIDTH="+(xs+30)+",HEIGHT="+(ys+60)+",STATUS=yes,TOOLBAR=no,SCROLLBARS=no,RESIZABLE=yes,MENUBAR=no";
        awindow = window.open("",title,options);
        awindow.document.write(
                "<html><head><title>",title,"</title></head>",
                "<body><table CELLPADDING=0 CELLSPACING=0,BORDER=0>",
                "<tr><td> <img SRC=" + imgName + " ALIGN=bottom> </td></tr>",
                "<tr><td HEIGHT=10>&nbsp;</td></tr>",
                "<tr><td>",caption,"</td></tr>",
                "</table></body></html>\n");
        awindow.defaultStatus=title;
        }
function makeLink(name,xs,ys,title,caption) {
        var name,xs,ys,title,caption;
        str = '<a HREF="javascript:showimage(\'' + name + "'," + xs + ',' + ys + ",'" + title + "','" + caption + "'"+')">';
        return(str);
        }
function galleryCell(name,suff,xs,ys,title,caption) {
        var name,suff,xs,ys,title,caption, dir,thumb;
        dir = '/INC/images/gallery/';
        thumb = '/INC/images/thumbnails/';
        document.write(
                '<td VALIGN=bottom ALIGN=center>',
                makeLink(dir+name+'.'+suff, xs,ys, title,caption),
                "<img SRC='",thumb,name,'_th.',suff,"'>",
                '</a><br>',title,'</td>');
        }
function galleryCell_page(name,suff,xs,ys,title,caption) {
        var name,suff,xs,ys,title,caption, dir,thumb;
        dir = '/INC/images/gallery/';
        thumb = '/INC/images/thumbnails/';
        document.write(
                '<td VALIGN=bottom ALIGN=center>',
                makeLink(dir+name+'.'+suff, xs,ys, title,caption),
                "<img SRC='",thumb,name,'_th.',suff,"'>",
                '</a><br><b>',title,'</b><br>Click image for larger view and more information.</td>');
        }






