var site_root = '/';var cursor_type = (document.all) ? 'hand' : 'pointer';var content_div;var banner_div;var body_tag;var mother_div;//	Browser detectionvar w3c = (document.getElementById) ? true : false;var ie = (document.all && !w3c) ? true : false;function init () {	content_div = document.getElementById('content');	banner_div = document.getElementById('banner');	body_tag = document.getElementsByTagName('BODY')[0];	mother_div = document.getElementById('mother');			var font_size = getFontCookie();	if (font_size != null) {		setFontClassName(font_size);	}		if (typeof document.body.style.maxHeight == "undefined") {		emulateMinWidth();	}createFontResizer();}if (w3c) { 		document.write('<style type="text/css">#content { visibility: hidden; }</style>');	window.onload=init;	}function showContentDiv() {	if (content_div) {		content_div.style.visibility = 'visible';	}	}function emulateMinWidth() {	var mother_div_contents = body_tag.removeChild(mother_div);	var the_table = document.createElement('TABLE');	the_table.cellPadding = '0';	the_table.cellSpacing = '0';	the_table.border = '0';	the_table.width = '100%';		var the_tbody = document.createElement('TBODY');	var the_tr = document.createElement('TR');	var the_td = document.createElement('TD');	var min_div = document.createElement('DIV');	min_div.style.width = '1000px';		the_table.appendChild(the_tbody);	the_tbody.appendChild(the_tr);	the_tr.appendChild(the_td);	the_td.appendChild(mother_div_contents);	the_td.appendChild(min_div);		body_tag.appendChild(the_table);}function createFontResizer() {	var fontPrint_ul = document.getElementById('fontPrintLinks');	var size_imgs = new Array (3);	var fontResizer_li;	var default_size = 1;		if (fontPrint_ul) {		fontResizer_li = document.createElement('LI');		fontResizer_li.id = 'fontResizer';				//fontsize_img = document.createElement('IMG');		//fontsize_img.src = site_root + 'images/font_size.gif';		//fontResizer_li.appendChild(fontsize_img);				fontsize_text = document.createTextNode('Font Size: ');		fontResizer_li.appendChild(fontsize_text);				for (var aa=0; aa<size_imgs.length; aa++) {			size_imgs[aa] = document.createElement('IMG');			if (aa == 0) {				// alt for small				size_imgs[aa].alt = 'Font Size Small';				size_imgs[aa].title = 'Font Size Small';			} else if (aa == 1) {				// alt for medium				size_imgs[aa].alt = 'Font Size Medium';				size_imgs[aa].title = 'Font Size Medium';			} else if (aa == 2) {				// alt for large				size_imgs[aa].alt = 'Font Size Large';				size_imgs[aa].title = 'Font Size Large';			}			size_imgs[aa].assoc_num = aa+1;			if (getFontCookie() == ('larger'+size_imgs[aa].assoc_num) || (getFontCookie() == null && size_imgs[aa].assoc_num == default_size)) {				size_imgs[aa].src = site_root + 'images/font_size_' + size_imgs[aa].assoc_num + '_sel.gif ';			} else {				size_imgs[aa].src = site_root + 'images/font_size_' + size_imgs[aa].assoc_num + '.gif';			}			size_imgs[aa].assoc_classname = 'larger' + size_imgs[aa].assoc_num;			size_imgs[aa].onclick = function () {				setFontClassName(this.assoc_classname); 				setFontCookie(this.assoc_classname);				for (var bb=0; bb<size_imgs.length; bb++) {					size_imgs[bb].src = site_root + 'images/font_size_' + (bb+1) + '.gif';				}				this.src = site_root + 'images/font_size_' + this.assoc_num + '_sel.gif';			}			size_imgs[aa].onmouseover = function () {				this.style.cursor = cursor_type;			}			fontResizer_li.appendChild(size_imgs[aa]);		}		fontPrint_ul.insertBefore(fontResizer_li,fontPrint_ul.getElementsByTagName('LI')[0]);	}	showContentDiv();}function setFontClassName(new_font_class) {	var current_body_classname = body_tag.className;	if (current_body_classname.length > 0) { // Then there is a class on the body tag		var replaceable = false;		for (var cc=1; cc<4; cc++) {			var class_search = 'larger'+cc;			if (current_body_classname.indexOf(class_search) != -1) {				replaceable = true;				body_tag.className = current_body_classname.replace(class_search,new_font_class);				break;			}		}		if (replaceable == false) { // body has a classname, add to it			body_tag.className = current_body_classname+' '+new_font_class;		}	} else {		body_tag.className = new_font_class;	}}function setFontCookie(class_name) {		//format expiry date	font_date = new Date();	font_date.setTime(font_date.getTime() + ( 365 *24*60*60*1000));	document.cookie = 'fontSize=' + class_name		+ '; expires=' + font_date.toGMTString() 		+ '; path=/';}function getFontCookie() {	font_cookie = null;			if (document.cookie && document.cookie.indexOf('fontSize')!=-1) {		font_cookie = document.cookie.split('fontSize=');		font_cookie = font_cookie[1].split(';');		font_cookie = font_cookie[0];	}	//alert(font_cookie);		return font_cookie;}/* From print.js */if(self.opener) { 	window.onload=opener.appSty; }function winBuild() { 	newWin=window.open(window.location,'','height=800,width=800,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'); } function appSty() { 	var win_style=newWin.document.createElement('link'); 	win_style.href="/main/niams.css"; 	win_style.rel="stylesheet"; 	win_style.type="text/css"; 	newWin.document.getElementsByTagName('head')[0].appendChild(win_style); 	newWin.focus(); } 