var html = '\
<!-- BEGIN TRAQUEUR BOX -->\
	<style type="text/css">\
	  #prehome_overlay {\
	    position: absolute;\
	    background: #000;\
	    width:100%;\
	    filter:alpha(opacity=60);\
      -moz-opacity:.60;\
      -webkit-opacity: 0.6;\
      -khtml-opacity: 0.6;\
      height:100%;\
      z-index:110;\
      display:none;\
	  }\
	  #prehome_overlay_content {\
	    z-index:120;\
	    position : absolute;\
	    display:none;\
	    width:100%;\
	    text-align:center;\
	    top : 50px;\
	  }\
	</style>\
	<div id="prehome_overlay"></div>\
	<div id="prehome_overlay_content">\
	  <img id="prehome_image" usemap="#map" border="0"  style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=\'true\',src=\'itf/prehome2.png\')"  src="itf/prehome2.png" width="522" height="475" >\
	</div>\
  <map name="map">\
  <area shape="rect" coords="2,2,517,107" href="javascript:hide_prehome();" />\
  <area shape="rect" coords="31,165,180,296" href="produits.shtml" />\
  <area shape="rect" coords="182,164,330,296" href="http://abonne.traqueur.fr" />\
  <area shape="rect" coords="351,163,490,298" href="telematique.shtml" />\
  <area shape="rect" coords="30,312,172,447" href="http://www.traqbox.fr" />\
  <!-- <area shape="rect" coords="189,314,332,448" href="http://tis.traqueur.fr" />-->\
  <area shape="rect" coords="349,314,490,449" href="groupe-traqueur-en-bref.shtml" />\
  </map>\
<!-- END TRAQUEUR BOX -->	\
';

if(jQuery.browser.msie&&jQuery.browser.version.substr(0,1)<"7") {
  var ie6 = true;  
}

function show_prehome() {
  if(ie6) {
    $("select").hide(); // on cache les select (ie bug)

    $("#prehome_image").attr('src',"itf/pixel.png");
  }
  
  height = $(document).height();
  width = $(document).width();	    
  $('#prehome_overlay').css('height', height + 'px' );
  $('#prehome_overlay').css('width', width + 'px' );
  $('#prehome_overlay').click( function(){hide_prehome();} );
  $('#prehome_overlay_content').click( function(){hide_prehome();} );
  $('#prehome_overlay').show();
  $('#prehome_overlay_content').fadeIn();
  // resize again
  height = $(document).height();
  width = $(document).width();	    
  $('#prehome_overlay').css('height', height + 'px' );
  $('#prehome_overlay').css('width', width + 'px' );
}

function hide_prehome() {
  $('#prehome_overlay_content').fadeOut('fast');
  $('#prehome_overlay').fadeOut('fast');
  
  $("select").show(); // on cache les select (ie bug)


}

$(document).ready(function() {
  // on preload l'image
  var preload = new Image();
	preload.src  = 'itf/prehome.png';
  $(html).prependTo("body"); // on injecte le html

  show_prehome();
});
