

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 goTo(url) {
 	if (!url || url == ' ') {
 		return;
 	}
 	location.href = url;
 }
 
 function fixNN() {
 	if (document.layers) {
 		location.reload();	
 	} else {
 		return;	
 	}
 }
 
 window.onresize = fixNN;

 function show(object) {
 	     if (document.getElementById && document.getElementById(object) != null) {
 	     	document.getElementById(object).style.visibility = 'visible';
 	     } else if (document.layers && document.layers[object] != null) {
   	     	document.layers[object].visibility = 'visible';
 	     } else if (document.all) {
 	         document.all[object].style.visibility = 'visible';
 	     }
 }

 function hide(object) {
  	    if (document.getElementById && document.getElementById(object) != null) {
   	        document.getElementById(object).style.visibility = 'hidden';
  	    } else if (document.layers && document.layers[object] != null) {
  	        document.layers[object].visibility = 'hidden';
  	    } else if (document.all) {
    	       document.all[object].style.visibility = 'hidden';
    	    }
}
 
 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 ssPop(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 (!w) {
			w = 440;
		}
		if (!h) {
			h= 500;
		}
	}
	
	if (document.layers) {
		w = w + 10;
	}
	 var sswindow = window.open(loc,type,'width='+w+',height='+h+',toolbar='+tools+',status='+stat+',scrollbars='+scroll+',resizable='+reSize+',location='+locvar+',menubar=no,directories=no');
	sswindow.focus();
}


 
 