/* *****************************************
//  WebTank javascript File
//  Title: resize.js
//  File updated: 2010-03-30 15:36:28
// 
//  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;
			
		}
		
	}
		
	/*  */
	
	var height = 0;
	
	/* RESET HEIGHT */
	
	if( document.getElementById("content") != null && $j("#content") != null ) {
		
		var position = $j("#flash_photo").position();
		
		height = innerHeight - ( ( parseInt( $j("#flash_photo").height() ) + position.top ) - 66 );
		
		//
		
//		alert( $j("#content").height() + " - " + height );
		
		if( $j("#content").height() < height ) {		
			
			$j("#content").css("height", height);
			
		} else {
			
			if( $j("#content").height() < ( $j("#photo_details").height() + 170 ) ) {
			
				$j("#content").css("height", ( $j("#photo_details").height() + 170 ) );
				
			}
		
		}
		
	}
	
	//
	
//	alert($j(document).height() + " - " + innerHeight);
	
	$j("#flash_background").css("height", $j(document).height());

}

/* */

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