<!--
/* Function that handles new window display */
function newWindow(URL,winwidth,winheight) {
	if (winwidth=='' || winwidth == null) {
		winwidth=650;
	}
	if (winheight == '' || winheight == null) {
		winheight =450;
	}
        strFeatures = "resizable=yes,toolbar=0,scrollbars=1,location=0,status=0,menubar=1,width="+winwidth+",height="+winheight+",left=20,top=30,dependent,alwaysRaised";
	glossindex=URL.indexOf("glossary");
	if (glossindex >0 ){
	  var pos=URL.indexOf("#")
	  if (pos > 0) {
	    glossary_term = URL.substr(pos+1,(URL.length,URL.length-pos-1));
	    firstletter = glossary_term.substr(0,1);
    	    switch (firstletter) {
             	case "a":
		case "b":
		case "c":
            	winvar = "course_files/glossary_a-c.htm#" + glossary_term;
         	break;
		case "d":
		case "e":
         	case "f":
		case "g":
		case "h":
		case "i":
            	winvar = "course_files/glossary_d-i.htm#" + glossary_term;
         	break;
		case "j":
         	case "k": 
		case "l": 
		case "m": 
		case "n":
         	case "o":
            	winvar = "course_files/glossary_j-o.htm#" + glossary_term;
         	break;
		case "p":
		case "q":
		case "r":
		case "s":
            	winvar = "course_files/glossary_p-s.htm#" + glossary_term;
         	break;
         	case "t":
		case "u":
		case "v":
		case "w":
		case "x":
		case "y":
		case "z":
            	winvar = "course_files/glossary_t-z.htm#" + glossary_term;
         	break;
		default:
            	winvar = "course_files/glossary_a-c.htm#" + glossary_term;
         	break;
    	    
	    }
	  }
	  /* The string did not have a # in it, so just go to first glossary*/ 
	  else {
            	winvar = "course_files/glossary_a-c.htm#" + glossary_term;
	  }
	}
	/* The string did not contain glossary, so another type of window
	   is being displayed
	*/
	else {
		winvar = URL;
	}
		
        var objNewWindow = window.open(winvar, "newwin", strFeatures);
        objNewWindow.focus();
        returnValue = false;
}

/* Function that handles new window display with all options. You
   can pass in a name for the window. If not, it defaults to win1 */
function newFullWindow(URL,winwidth,winheight,name) {
	if (winwidth=='' || winwidth == null) {
		winwidth=700;
	}
	if (winheight == '' || winheight == null) {
		winheight =500;
	}
	if (name== '' || name== null) {
		name='win1';
	}
        strFeatures = "resizable=yes,toolbar=1,scrollbars=1,location=0,status=0,menubar=1,width="+winwidth+",height="+winheight+",left=30,top=40,dependent,alwaysRaised";
var objNewWindow = window.open(URL, name, strFeatures);
        objNewWindow.focus();
        returnValue = false;
}
//-->
