/* *****************************************
//  WebTank javascript File
//  Title: resize.js
//  File updated: 2009-08-27 12:01:27
// 
//  Do NOT manually edit this generated file
// **************************************** */


var $j = jQuery.noConflict();

function resize() {

	var browser = navigator.appName;
	var b_version = navigator.appVersion;
	var version = parseFloat( b_version );
	
	/* SET HEIGHT */
	
	var innerHeight = 0;
	
	if( browser == "Netscape" ) {
		
		innerHeight = window.innerHeight;
		
	}  else {
		
		if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			
			innerHeight = document.documentElement.clientHeight;
			
		} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			
			innerHeight = document.body.clientHeight;
			
		}
		
	}
		
	/* RESET HEIGHT */
	
	var height = 0;
	var top = 0;
	
	if( document.getElementById("content") != null && document.getElementById("footer") != null ) {
		
		if( document.getElementById("product_details") != null ) {
		
			height = $j("#product_details").height();
			
			top = ( height + $j("#content").position().top ) + 80;
			
			//
			
			$j("#footer").css("top", top);
			
			$j("#content").css("padding-bottom", "15px");
			$j("#content").css("height", height);
			
		} else if( document.getElementById("product_list") != null ) {
			
			height = $j("#product_list").height();
			
			if( height < 300 ) height = 300;
			
			top = ( height + $j("#content").position().top ) + 80;
			
			//
			
			$j("#footer").css("top", top);
			
			$j("#content").css("padding-bottom", "15px");
			$j("#content").css("height", height);
						
		}  else if( document.getElementById("projects") != null ) {
		
			height = $j("#projects").height();
			
			if( height < 300 ) height = 300;
			
			top = ( height + $j("#content").position().top ) + 80;
			
			//
			
			$j("#footer").css("top", top);
			
			$j("#content").css("padding-bottom", "15px");
			$j("#content").css("height", height);
	
		}
		
	}
	
}

/* */

window.onResize = function() {
	
	resize();
	
}
