var myWidth;
var myHeight;
var size_id;
var screen_width;
var screen_height;
var flash_height;
var col_left_width;
var col_left_height;
var col_right_width;
var col_right_height;
var col_right_scroll_track_height;
var three_col_width;
var back_to_portfolio_y;
var back_to_portfolio_x;
var back_to_services_y;
var back_to_services_x;

// Determine available space
if( typeof( window.innerWidth ) == 'number' ) {
	//Non-IE
	myWidth = window.innerWidth;
	myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	//IE 6+ in 'standards compliant mode'
	myWidth = document.documentElement.clientWidth;
	myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	//IE 4 compatible
	myWidth = document.body.clientWidth;
	myHeight = document.body.clientHeight;
}


// Check used on opening site in a new window
if (cookieTest == 1 && myWidth != getcookie('width')) {
	// alert ('myWidth = '+myWidth+' and Cookie width = '+getcookie('width'));
	setcookie('width',myWidth,2);
	location.href=location.href;
}

// Re-check when resizing window
window.onresize = function () {
	// alert ('myWidth = '+myWidth+' and Cookie width = '+getcookie('width'));
	location.href=location.href;
}

if (getcookie('width') >= 1220) {
	size_id = 'lg';
	screen_width = 1204;
	screen_height = 622;
	flash_height = 518;
	col_left_width = 835;
	col_left_height = 535;
	col_right_width = 315;
	col_right_height = 475;
	col_right_scroll_track_height = 459;
	three_col_width = 360;
	back_to_portfolio_x = 870;
	back_to_portfolio_y = 485;
	back_to_services_x = 1055;
	back_to_services_y = 485;
} else {
	size_id = 'sm';
	screen_width = 943;
	screen_height = 487;
	flash_height = 412;
	col_left_width = 650;
	col_left_height = 400;
	col_right_width = 245;
	col_right_height = 353;
	col_right_scroll_track_height = 337;
	three_col_width = 270;
	back_to_portfolio_x = 679;
	back_to_portfolio_y = 360;
	back_to_services_x = 793;
	back_to_services_y = 360;
}