function openBrWindow(theURL,winName,features) {
	window.open(theURL,winName,features);
}

function go(url) {
	window.location = url;
}

function property_next() {
	if (parseInt($("#property_nav").css("marginLeft")) % 300 != 0) {
		return false;
	}
	$("#property_nav").stop(true, true);
	var curr_pos = parseInt($("#property_nav").css("marginLeft"));
	var nav_width = parseInt($("#property_nav").width());
	if (curr_pos*-1 < nav_width - 900) {
		var move_to = curr_pos - 300;
		$("#property_nav").animate({
			marginLeft: move_to + "px"
		}, {
			duration: 500
		});
	}
}

function property_prev() {
	if (parseInt($("#property_nav").css("marginLeft")) % 300 != 0) {
		return false;
	}
	$("#property_nav").stop(true, true);
	var curr_pos = parseInt($("#property_nav").css("marginLeft"));
	if (curr_pos*-1 > 0) {
		var move_to = curr_pos + 300;
		$("#property_nav").animate({
			marginLeft: move_to + "px"
		}, {
			duration: 500
		});
	}
}

function login() {
//   var features = 'scrollbars,status';
//   var features = 'scrollbars,status,resizable';
//   var features = 'status';

	var isIE = (navigator.appName.indexOf('Microsoft') != -1);
	var features = ''
	features += ',width=790,height=580';
	
	if (isIE)
		features += ',left=0,top=0';
	else
		features += ',screenX=0,screenY=0';
	
	window.open("","stocktrade", features);
	document.Login.submit();
	document.Login.password.value = '';
}

$(function() {
	$('a[rel*=facebox]').facebox();
	$("a.image_gallery").fancybox(
		{ 'zoomSpeedIn': 300, 'zoomSpeedOut': 300, 'overlayShow': true }
	
	);
});

