 function fixNN() {
 	if (document.layers) {
 		location.reload();	
 	} else {
 		return;	
 	}
 }
 
 window.onresize = fixNN;
 
  function buildSpacer(difference,depth) {
	//set default depth if none given
	if (!depth) {
		depth = '';
	}
	if (document.layers) {
		var windowWidth = window.innerWidth;
		var width = windowWidth - difference;
		var spacer = '<img src="'+ depth +'images/spacer.gif" alt=" " width="' + width +'" height="1" class="spacer" />';
		return spacer;
	} else {
		var spacer = '<img src="'+ depth +'images/spacer.gif" alt=" " width="1" height="1" class="tcImage" />';
		return spacer;
	}
}

function imgOn(imgName) {
	if (document.images) {
     		 onImage = eval(imgName + "on.src");
     		 document[imgName].src = onImage;
    	}
 }

function imgOff(imgName) {
   	if (document.images) {
    		  offImage = eval(imgName + "off.src");
     		  document[imgName].src = offImage;
   	 }
 }
 
 function buildVerticalSpacer() {
 	if (document.layers) {
 		var image = '<img src="../images/spacer.gif" alt=" " width="84" height="225" class="spacer" />';
 		return image;
 	} else {
 		return '&nbsp;';	
 	}
 }

 function rPop(type,loc,w,h) {
	var stat = 'no';
	var reSize = 'yes';
	var scroll = 'yes';
	var tools = 'yes';
	var locvar = 'no';
	if (type == "letter") {
		reSize = 'no';
		if (!w) {
			w = 440;
		}
		if (!h) {
			h= 500;
		}
	} else if (type == "image") {
		reSize = 'yes';
		if (!w) {
			w = 470;
		}
		if (!h) {
			h= 380;
		}
	} else if (type == "interactive") {
		reSize = 'yes';
		scroll = 'yes';
		if (!w) {
			w = 605;
		}
		if (!h) {
			h= 520;
		}
	} else {
		if (!w) {
			w = 440;
		}
		if (!h) {
			h= 500;
		}
	}
	
	if (document.layers) {
		w = w + 10;
	}
	 var rwindow = window.open(loc,type,'width='+w+',height='+h+',toolbar='+tools+',status='+stat+',scrollbars='+scroll+',resizable='+reSize+',location='+locvar+',menubar=no,directories=no');
	rwindow.focus();
}

