
var nom=0;
function effect(){

		var windowWidth = $.browser.opera && $.browser.version > "9.5" && $.fn.jquery <= "1.2.6" ? document.documentElement["clientWidth"] : $(window).width();
		var scleft1=windowWidth-317+$(document).scrollLeft();
		if (scleft1>$('#main-table').width()-317){
			scleft1=$('#main-table').width()-317;
		}	
		$('#div-effectall').css({'left':scleft1+'px'});
	
}

$(window).load(function(){
	effect();
});

$(window).resize(function(){
	effect();
});

$(window).scroll(function(){
	effect();
});

function cleartlink(){
	for (i=1;i<4;i++){
		if ($("#lic"+i).attr('class')=='tlink active') {
			nom=i;
			$("#lic"+i).removeClass("active");
		}
		
	}
}

function showmap_resize(){
	if (document.getElementById('mapsh').style.display=='block'){
		showmap();
	}
}

function showmap(){
	
		var t=document.getElementById('ic4');
		if (t!=null){
			var br=t.getBoundingClientRect();
			var leftm=Math.round(br.left);
			$('#mapsh').css({'left' : leftm - 638 + 'px'});
			$('#mapsh').css({'display' : 'block'});
			cleartlink();
			$("#lic4").addClass("active");
		}
	
}
 

function map_clos(){
	$('#mapsh').css({'display' : 'none'});
	$("#lic4").removeClass("active");
	if (nom){
		$("#lic"+nom).addClass("active");
	}
}

$(window).resize(function(){
	showmap_resize();
});