/* -- [>] Browser detection ------------------------------------------ */
function lib_browserCheck(){
		this.ver=navigator.appVersion
	this.agent=navigator.userAgent.toLowerCase()
	this.dom=document.getElementById?1:0
	this.op5=this.agent.indexOf("opera 5")>-1 && window.opera 
  this.op6=this.agent.indexOf("opera 6")>-1 && window.opera 
  this.ie5 = (this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6)
  this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1)
	this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5)
  this.ie6 = (this.agent.indexOf("msie")>-1 && !this.op5 && !this.op6 && !this.ie5 && !this.ie55 && !this.ie4)
  this.ie = (this.ie4 || this.ie5 || this.ie6)
	this.mac=(this.agent.indexOf("mac")>-1)
	this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar)
	this.ns4=(!this.dom && document.layers)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6)
  this.usedom= this.ns6//Use dom creation
  this.reuse = this.ie||this.usedom //Reuse layers
  this.px=this.dom&&!this.op5?"px":""
	return this
}
var lib_bw = new lib_browserCheck();
/* -- /industrie
/* -- [>] Script Location -------------------------------------------- */
/* -- var root = "http://www.lassonde.com/industrie"; -- */
var root = "/industrie";

/* -- [>] Langue ----------------------------------------------------- */
function langue(){

var path = document.location.href;
	if(path.indexOf("/fr/")){
		url = path.replace(/\/fr\//,"/en/");
		document.location.href = url;
	}
}

/* -- [>] Photo ------------------------------------------------------ */
function photo(){
	var htmlPhoto = "";
		
	if(lib_bw.ns4){
		htmlPhoto += "<layer pagex='10' pagey='40' z-index='2' width='750' height='75' visibility='show'>";
		htmlPhoto += "   <embed src='"+root+"/fr/swf/photo.swf' width='750' height='75' autostart='false' align='left' quality='high' bgcolor='#FFFFFF' name='photo' type='application/x-shockwave-flash' pluginspace='http://www.macromedia.com/go/getflashplayer'></embed>";
		htmlPhoto += "</layer>";
	}
	else{
		htmlPhoto += "<div id='blockPhoto'>";
		htmlPhoto += "   <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='750' height='75' id='photo'>";
		htmlPhoto += "      <param name='movie' value='"+root+"/fr/swf/photo.swf'>";
		htmlPhoto += "      <param name='quality' value='high'>";
		htmlPhoto += "      <param name='bgcolor' value='#FFFFFF'>";
		htmlPhoto += "   <embed src='"+root+"/fr/swf/photo.swf' width='750' height='75' autostart='false' align='left' quality='high' bgcolor='#FFFFFF' name='photo' type='application/x-shockwave-flash' pluginspace='http://www.macromedia.com/go/getflashplayer'></embed>";
		htmlPhoto += "   </object>";
		htmlPhoto += "</div>";
	}
	document.write(htmlPhoto);
}

/* -- [>] Menu ------------------------------------------------------- */
/* -- id = Accueil | Societe | Communications | Finances | Filiales -- */
function menu(id){
	var htmlMenu = "";
	
	if(lib_bw.ns4){
		htmlMenu += "<layer pagex='10' pagey='115' z-index='2' width='750' height='10' visibility='show'>";
		htmlMenu += "  <img src='"+root+"/img/menuLine.gif' width='750' height='10' border='0'>";
		htmlMenu += "</layer>";
		
		htmlMenu += "<layer pagex='10' pagey='125' z-index='2' width='750' height='40' visibility='show'>";
		htmlMenu += "   <embed src='"+root+"/fr/swf/menu.swf?id="+id+"&root="+root+"' width='750' height='40' autostart='false' align='' quality='high' bgcolor='#FFFFFF' name='menu' type='application/x-shockwave-flash' pluginspace='http://www.macromedia.com/go/getflashplayer'></embed>";
		htmlMenu += "</layer>";
	}
	else{
		htmlMenu += "<div id='blockLine'>";
		htmlMenu += "  <img src='"+root+"/img/menuLine.gif' width='750' height='10' border='0'>";
		htmlMenu += "</div>";
	
		htmlMenu += "<div id='blockMenu'>";
		htmlMenu += "  <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='750' height='40' id='menu'>";
		htmlMenu += "    <param name='movie' value='"+root+"/fr/swf/menu.swf?id="+id+"&root="+root+"'>";
		htmlMenu += "    <param name='quality' value='high'>";
		htmlMenu += "    <param name='bgcolor' value='#FFFFFF'>";
		htmlMenu += "   <embed src='"+root+"/fr/swf/menu.swf?id="+id+"&root="+root+"' width='750' height='40' autostart='false' align='' quality='high' bgcolor='#FFFFFF' name='menu' type='application/x-shockwave-flash' pluginspace='http://www.macromedia.com/go/getflashplayer'></embed>";		
		htmlMenu += "  </object>";	
		htmlMenu += "</div>";
	}
	document.write(htmlMenu);
}

/* -- [>] Block Txt Begin -------------------------------------------- */
function blockTxtBegin(txt){
	var blockTxtBeginHtml = "";

	blockTxtBeginHtml += "<a name='top'></a>";
	blockTxtBeginHtml += "<table width='750' border='0' cellspacing='0' cellpadding='0'>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td><img src='"+root+"/img/pixel.gif' width='1' height='185' border='0' /></td>";
	blockTxtBeginHtml += "   </tr>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td class='titre'>"+txt+"</td>";
	blockTxtBeginHtml += "   </tr>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td><img src='"+root+"/img/pixel_666666.gif' width='750' height='1' border='0' /></td>";
	blockTxtBeginHtml += "   </tr>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td class='txt'>";
	blockTxtBeginHtml += "      <br />";
	
	document.write(blockTxtBeginHtml);
}

/* -- [>] Block Txt Begin -------------------------------------------- */
function blockTxtBegin2(txt){
	var blockTxtBeginHtml = "";

	blockTxtBeginHtml += "<a name='top'></a>";
	blockTxtBeginHtml += "<table width='750' border='0' cellspacing='0' cellpadding='0'>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td><img src='"+root+"/img/pixel.gif' width='1' height='50' border='0' /></td>";
	blockTxtBeginHtml += "   </tr>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td class='titre'>"+txt+"</td>";
	blockTxtBeginHtml += "   </tr>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td><img src='"+root+"/img/pixel_666666.gif' width='750' height='1' border='0' /></td>";
	blockTxtBeginHtml += "   </tr>";
	blockTxtBeginHtml += "   <tr>";
	blockTxtBeginHtml += "      <td class='txt'>";
	blockTxtBeginHtml += "      <br />";
	
	document.write(blockTxtBeginHtml);
}

/* -- [>] Block Txt End ---------------------------------------------- */
function blockTxtEnd(){
	blockTxtEndHtml = "";

	blockTxtEndHtml += "      <br />";
	blockTxtEndHtml += "      </td>";
	blockTxtEndHtml += "   </tr>";
	blockTxtEndHtml += "   <tr>";
	blockTxtEndHtml += "      <td><img src='"+root+"/img/pixel_666666.gif' width='750' height='1' border='0' /></td>";
	blockTxtEndHtml += "   </tr>";
	blockTxtEndHtml += "   <tr>";
	blockTxtEndHtml += "      <td align='right'  class='copywright'>&copy; 2003 - Industries Lassonde inc.</td>";
	blockTxtEndHtml += "   </tr>";
	blockTxtEndHtml += "</table>";
	blockTxtEndHtml += "<br />";
	blockTxtEndHtml += "<br />";

	document.write(blockTxtEndHtml);
}

/* -- [>] Block Top End ---------------------------------------------- */
function blockTop(){
	blockTopHtml = "";

	blockTopHtml += "<table width='750' border='0' cellspacing='0' cellpadding='0'>";
	blockTopHtml += "   <tr>";
	blockTopHtml += "      <td align='right' class='HautdePage'><a href='#top'>haut de page</a></td>";
	blockTopHtml += "   </tr>";
	blockTopHtml += "</table>";

	document.write(blockTopHtml);
}

/* -- [>] Resize ------------------------------------------------- */
function resize(){
	if(lib_bw.ns){
		document.location.href = document.location.href;
	}
}
onResize = resize;


/* -- [>] Popup carte ------------------------------------------------- */
function openpopcarte(page) {
	if (page == 'nohref')
		{ return; }
	else
		{ 
			var iMyWidth;
			var iMyHeight;
			iMyWidth = (window.screen.width/2) - (330 + 10); 
			iMyHeight = (window.screen.height/2) - (200 + 10); 
			var win2 = window.open(page,"Lassonde","width=750,height=545,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no" + ",menubar=yes");
			win2.focus();
		}
}

/* -- [>] Popup Biographie ------------------------------------------------- */
function openpoplibrary(page) {
	if (page == 'nohref')
		{ return; }
	else
		{ 
			var iMyWidth;
			var iMyHeight;
			iMyWidth = (window.screen.width/2) - (330 + 10); 
			iMyHeight = (window.screen.height/2) - (200 + 10); 
			var win2 = window.open(page,"Lassonde","width=680,height=475,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
			win2.focus();
		}
}
/* -- [>] Popup communique speciaux ------------------------------------------------- */
function openpopcomm(page) {
	if (page == 'nohref')
		{ return; }
	else
		{ 
			var iMyWidth;
			var iMyHeight;
			iMyWidth = (window.screen.width/2) - (330 + 10); 
			iMyHeight = (window.screen.height/2) - (200 + 10); 
			var win2 = window.open(page,"Lassonde","width=750,height=600,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
			win2.focus();
		}
}

/* -- [>] Popup Rapport ------------------------------------------------- */
function openpoprapport(page) {
	if (page == 'nohref')
		{ return; }
	else
		{ 
			var iMyWidth;
			var iMyHeight;
			iMyWidth = (window.screen.width/2) - (330 + 10); 
			iMyHeight = (window.screen.height/2) - (200 + 10); 
			var win2 = window.open(page,"Lassonde","width=400,height=200,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
			win2.focus();
		}
}

/* -- [>] Popup Photo seulement ------------------------------------------------- */
function openpopphotoseulement(page) {
	if (page == 'nohref')
		{ return; }
	else
		{ 
			var iMyWidth;
			var iMyHeight;
			iMyWidth = (window.screen.width/2) - (330 + 10); 
			iMyHeight = (window.screen.height/2) - (200 + 10); 
			var win2 = window.open(page,"Lassonde","width=310,height=450,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes");
			win2.focus();
		}
}



function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function NewWindow(mypage, myname, w, h, scroll) {
		var winl = (screen.width - w) / 2;
		var wint = (screen.height - h) / 2;
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',noresize';
		win = window.open(mypage, myname, winprops);
		if (parseInt(navigator.appVersion) >= 4) {
			win.window.focus(); 
		}
	}
