/* *****************************************
//  WebTank javascript File
//  Title: resize.js
//  File updated: 2010-05-13 18:59:23
// 
//  Do NOT manually edit this generated file
// **************************************** */


// FUNCTIONS

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;
			
		}
		
	}
		
	/*  */
	
	var height = 0;
	
	/* RESET HEIGHT */
	
	if( $j("#footer").length > 0 ) {
	
		if( $j("#middle").height() > 600 ) {
			
			$j("#footer").css("top", ( $j("#middle").height() + 225 ) + "px");
			
		} else {
			
			if( $j(".photobook_list").length > 0 ) {
			
				if( $j(".photobook_list").height() > 600 ) {
			
					$j("#footer").css("top", ( $j(".photobook_list").height() + 225 ) + "px");
					
				} else {
				
					$j("#footer").css("top", ( innerHeight - 100 ) + "px");
				
				}
				
			} else {
			
				$j("#footer").css("top", ( innerHeight - 100 ) + "px");
			
			}
			
		}
		
	}
	
}

/* */

$j(window).load( function () {

	$j("#footer").css("visibility", "visible");

} );

$j(window).resize( function() {

	resize();
	
} );

$j(document).ready( function() {
	
	$j("#footer").css("visibility", "hidden");

	resize();
	
} );
