var scrollbar = 15;
if (is_mac && is_safari) {
	var scrollbar = 0;	
} else if (is_mac && is_gecko) {
	var scrollbar = 15;
}
function showImgs() {
	if (document.getElementById('hold_thumbnails')) {
		if (document.getElementById('newBanner'))
		document.getElementById('hold_thumbnails').style.display='none';
		else document.getElementById('hold_thumbnails').style.display='block';
	}
}
function resize_header() {
	var windowWidth = getWindowWidth()-scrollbar;
	Element.setStyle('header', {width:(windowWidth)+"px"} );
	var contentWidth = (parseInt(Element.getStyle('all', 'width')));
	if (is_mac && is_safari) {
		Element.setStyle('top_menu', {margin:"19px 0 0 121px"} );
		Element.setStyle('logo', {left:((windowWidth/2)-7)+"px"} );
	}
}
function resize_color_box() {
	var contentHeight = $('all').offsetHeight+parseInt(Element.getStyle('all', 'top'));
	var windowHeight = getWindowHeight();
	var windowWidth = getWindowWidth()-scrollbar;
	if (contentHeight > windowHeight) windowHeight = contentHeight;
	var offset_top = 0;
	var offset_left = 0;
	offset_top = (parseInt(Element.getStyle('bottom_color', 'top')));
	Element.setStyle('bottom_color', {height:(windowHeight-offset_top)+"px"} );
	Element.setStyle('bottom_color', {width:(windowWidth)+"px"} );
}
function move_content() {
	var windowWidth = getWindowWidth();
	var contentWidth = (parseInt(Element.getStyle('all', 'width')));
	var contentHeight = $('all').offsetHeight;
	if ($('port_img')) {
		p_img = ($('port_img'));
		contentHeight+=parseInt(p_img.change_amt);
	}
	var windowHeight = getWindowHeight()-parseInt(Element.getStyle('all', 'top'));
	var new_x = (parseInt(windowWidth/2 - contentWidth/2));
	Element.setStyle('all', {left:(new_x)+"px"} );
	if (contentHeight > windowHeight) windowHeight = contentHeight;
	Element.setStyle('all', {height:(windowHeight)+"px"} );
}
function move_markings() {
	var windowWidth = getWindowWidth();
	var contentWidth = (parseInt(Element.getStyle('all', 'width')));
	var new_x = (parseInt(windowWidth/2 - contentWidth/2 - (parseInt(Element.getStyle('markings_left', 'width')))));
	if (is_mac && is_safari) {
		var new_x = (parseInt((windowWidth/2) - (contentWidth/2) - 103));
	}
	var new_x2 = (parseInt(windowWidth/2 + contentWidth/2));
	Element.setStyle('markings_left', {left:(new_x)+"px"} );
	Element.setStyle('markings_right', {left:(new_x2)+"px"} );
	Element.setStyle('markings_left', {display:"block"} );
	Element.setStyle('markings_right', {display:"block"} );
}
function resize_bg() {
	var windowWidth = getWindowWidth()-scrollbar;
	var windowHeight = getWindowHeight();
	var contentHeight = Element.getHeight('all')+parseInt(Element.getStyle('all', 'top'));
	if (contentHeight > windowHeight) windowHeight = contentHeight;
	Element.setStyle('content_layer', {width:(windowWidth)+"px"} );
	Element.setStyle('content_layer', {height:(windowHeight)+"px"} );
}
function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	
	return windowHeight;
}
function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}