$(document).ready(function(){
	setinitline();
	$(window).resize(function(){setinitline();});
	$("#frm1").click(function(){ window.location="laval/";});
	$("#frm2").click(function(){ window.location="carrefour/";});
	$("#frm3").click(function(){ window.location="stbruno/";});
	$("#frm4").click(function(){ window.location="montreal/";});
	
	$(".framead").mouseover(function(){ $(this).css({border:'solid #FF9900 1px'}); }).mouseout(function(){$(this).css({border:'solid #993300 1px'});});

function setinitline(){
	$("#lh1").css({
			position:'absolute',
			left:0,
			top: Math.round($(window).height ()/2)-75,
			width:$(window).width(),
			height:1});
	$("#lh2").css({
			position:'absolute',
			left:0,
			top: Math.round($(window).height ()/2)+75,
			width:$(window).width(),
			height:1});
	$("#lv1").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)-150,
			top:10,
			width:1,
			height:$(window).height()-20});
	$("#lv2").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)+150,
			top:10,
			width:1,
			height:$(window).height()-20});
	$("#frm1").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)-150-300-5,
			top:Math.round($(window).height ()/2)-75-150-5});
	$("#frameaddress1").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)-150-300-5,
			top:Math.round($(window).height ()/2)-75-150-5+150+10});
	$("#frm2").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)-150-300-5,
			top:Math.round($(window).height ()/2)+75+5});
	$("#frameaddress2").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)-150-300-5,
			top:Math.round($(window).height ()/2)+75+5+160});
	$("#frm3").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)+150+5,
			top:Math.round($(window).height ()/2)-75-150-5});
	$("#frameaddress3").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)+150+5,
			top:Math.round($(window).height ()/2)-75-150-5+160});
	$("#frm4").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)+150+5,
			top:Math.round($(window).height ()/2)+75+5});
	$("#frameaddress4").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)+150+5,
			top:Math.round($(window).height ()/2)+75+5+160});
	$("#mainframe").css({
			position:'absolute',
			left:Math.round($(window).width ()/2)-150,
			top: Math.round($(window).height ()/2)-74});
				   
}
});
