// These  are utility functions for indexpages.

/*****************************************************************
write_ir_index(intropath,tocpath)

This function will build the frames and adjust them for the users scvreen size.

Inputs:
intropath -  this is the url for the starting introduction page.  If this is an emty string,
the default is intro.html.

intropath -  this is the url for the starting table of contents page.  If this is an emty string,
the default is toc.html.


****************************************************************/

//function write_ir_index(uhpath,intropath,tocpath,ftpath,vpath,vtrack){
function write_ir_index(uhpath,intropath,tocpath,vpath,vtrack){
var docstr;
var rw1 = 0;
var rw2 = 0;

var sheight = screen.height;

if(sheight >= 768){
	rw1 = 135;
	rw2 = 93;
}else if(sheight >= 600){
	rw1 = 147;
	rw2 = 128;
}else{
	rw1 = 162;
	rw2 = 128;
}

if ((intropath == null)||(intropath == "")){
	intropath = "intro.html";
}

if ((tocpath == null)||(tocpath == "")){
	tocpath = "toc.html";
}


docstr = "";
//docstr = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Frameset//EN' 'http://www.w3.org/TR/html4/frameset.dtd'>";
//docstr = '\n' + docstr + "<html lang='en'>
//docstr = '\n' + docstr + "<head>
//docstr = '\n' + docstr + "   <title>Office of Institutional Research 
//docstr = '\n' + docstr + " </title >
//docstr = '\n' + docstr + " <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' ></head>";
//docstr = '\n' + docstr + "<frameset rows='" + String(rw1) + "px,*," + String(rw2) + "px,1px,1px'> ";
docstr = '\n' + docstr + "<frameset rows='" + String(rw1) + "px,*,1px,1px'> ";
//docstr = '\n' + docstr + "<frameset rows='125px,*,100px,1px'> ";
docstr = '\n' + docstr + "<frame src='" + String(uhpath) + "' name='uheader' marginwidth='0' marginheight='0' frameborder='0' title='University Header Template' >";
docstr = '\n' + docstr + "  <frameset cols='200px,*'>";
docstr = '\n' + docstr + "     <frame src='" + String(tocpath) + "' name='irtoc' marginwidth='0' marginheight='0' frameborder='0' title='Instutitional Research Menu' >";
docstr = '\n' + docstr + "     <frame src='" + String(intropath) + "' name='irdisp' marginwidth='0' marginheight='0' frameborder='0' title='Instutitional Data Display' >";
docstr = '\n' + docstr + "  </frameset>";
//docstr = '\n' + docstr + "<frame src='" + String(ftpath) + "' name='ufooter' marginwidth='0' marginheight='0' frameborder='0' title='University Footer Template' >";
docstr = '\n' + docstr + "<frame src='" + String(vpath) + "' name='vstor' marginwidth='0' marginheight='0' frameborder='0' title='variable storage' >";
docstr = '\n' + docstr + "<frame src='" + String(vtrack) + "' name='wbtrack' marginwidth='0' marginheight='0' frameborder='0' title='stat tracking' >";
docstr = '\n' + docstr + "<noframes>";
docstr = '\n' + docstr + "<body>";
docstr = '\n' + docstr + "<p>Netscape 4 or Internet Exporer 4 or greater must be used </p>";
docstr = '\n' + docstr + "</body>";
docstr = '\n' + docstr + "</noframes>";
docstr = '\n' + docstr + "</frameset>";
//docstr =  '\n' +docstr + "</html>";
return docstr;	
}
