	/**********************************************
	* diffh is for growing tables
	*/
	function resizeOuter(id,h,diffh,mode) {
		mainArea = getEl(id); // switch between parent and iframe
		
		iframePos = 290; // position of iframe relative to the standard 0/0 left/top position
		relHeight =  70; // relative height of iframe compared to page (323 is the header height and 40 is the footer height)
		
		if(h) {
			c = getEl('content');
			c.style.height = Math.abs(parseInt(h));
			mainArea.style.height = Math.abs(parseInt(h) + iframePos);
			
			if(!is.ie) {
				b = getEl('btag');
				b.style.height = Math.abs(parseInt(h) + (relHeight + iframePos));
			}
			
		}else {
			if(is.ie) {
				h = mainArea.scrollHeight;
				btagH = parseInt(parent.document.body.clientHeight) - (relHeight + iframePos); // difference of top and bottom (91px + 323px - 165) // seee index.php for these values
			}else {
				h = mainArea.offsetHeight;
			
				/** FIX MOZILLA - Bug: PAGE extends past BODY and BODY does not resize to fit entire PAGE **/
				btagH = parseInt(parent.document.body.clientHeight); // window height to fix the mozilla height bug
			
				btagH = btagH - (relHeight + iframePos); // difference of top and bottom (91px + 323px - 165) // seee index.php for these values
			}
		
			
			if(parseInt(h) < btagH) { 
				h = btagH;
			}
			if(diffh) {
				h = diffh + parseInt(h);
			}
			try {
				parent.resizeOuter(id,h);
			}catch(e){}
		}
	}
	
	/**********************************************
	*
	*/
	function changeEnvironment(area) {
		// reset navigations that are on parent page
		for(var i in topNav) {
			if(i != area) {
				hardSwap('images/topNav/' + i + '.jpg',i);
			}else {
				TempImg = area;
				hardSwap('images/topNav/over/' + i + '.jpg',i);
			}
		}		
	}
	
	var loading = false;
	
	function showLoading(targ,text,seg,stop) {
		if(!seg && !stop) {
			loading = true;
			getEl(targ).innerHTML = text;
			text = text + '.';
			self.setTimeout('showLoading(\'' + targ + '\',\'' + text + '\',\'next\');',100);
		}else if(!seg && stop) {
			loading = false;
			self.setTimeout('showLoading(\'' + targ + '\',\'\',\'last\',\'stop\');',100);
		}else if(seg && loading) {
			getEl(targ).innerHTML = text;
			text = text + '.';
			self.setTimeout('showLoading(\'' + targ + '\',\'' + text + '\',\'next\');',100);
		}else {
			getEl(targ).innerHTML = '';
		}
	}
	
	
	/******************************************************************************************
	* Slightly different from function above, this one is a little more universal so you can use floating iframes 
	*	and resize them when necessary
	*
	*/
	function resizeIframe(id,h) {
		alert(id);
		mainArea = getEl(id);
		if(h) {
			mainArea.style.height = h;
			resizeOuter('mainContent');
			
		}else {
			if(is.ie) {
				h = parseInt(mainArea.scrollHeight);
			}else {
				h = parseInt(mainArea.offsetHeight);
			}
			if(h) {
				try {
					parent.resizeIframe(id,h);
				}catch(e){}
			}else {
				//self.setTimeout('parent.resizeIframe(\'' + id + '\',\'' + h + '\');',1000);
			}
		}
	}
