function html_size_width(){if (parseInt(navigator.appVersion)>3) {
 if (navigator.appName=="Netscape") {
  winW = window.innerWidth-16;
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {
  winW = document.body.offsetWidth-20;
 }
}return winW;}function html_size_height(){if (parseInt(navigator.appVersion)>3) {
 if (navigator.appName=="Netscape") {
  winH = window.innerHeight-16;
 }
 if (navigator.appName.indexOf("Microsoft")!=-1) {
  winH = document.documentElement.offsetHeight-20;
 }
}return winH;}	
/* Biblioth&egrave;que DHTML */

var DHTML = 0, DOM = 0, MS = 0, NS = 0, OP = 0;

function DHTML_init() {

 if (window.opera) {
     OP = 1;
 }
 if(document.getElementById) {
   DHTML = 1;
   DOM = 1;
 }
 if(document.all && !OP) {
   DHTML = 1;
   MS = 1;
 }
if(document.layers && !OP) {
   DHTML = 1;
   NS = 1;
 }
}

function getElem(p1,p2,p3) {
 var Elem;
 if(DOM) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.getElementById(p2) == "object")
     Elem = document.getElementById(p2);
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document.getElementsByName(p2) == "object")
     Elem = document.getElementsByName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.getElementsByTagName(p2) == "object" ||
        (OP && typeof document.getElementsByTagName(p2) == "function"))
     Elem = document.getElementsByTagName(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(MS) {
   if(p1.toLowerCase()=="id") {
     if (typeof document.all[p2] == "object")
     Elem = document.all[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="tagname") {
     if (typeof document.all.tags(p2) == "object")
     Elem = document.all.tags(p2)[p3];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="name") {
     if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
 else if(NS) {
   if(p1.toLowerCase()=="id" || p1.toLowerCase()=="name") {
   if (typeof document[p2] == "object")
     Elem = document[p2];
     else Elem = void(0);
     return(Elem);
   }
   else if(p1.toLowerCase()=="index") {
    if (typeof document.layers[p2] == "object")
     Elem = document.layers[p2];
    else Elem = void(0);
     return(Elem);
   }
   else return void(0);
 }
}

function getCont(p1,p2,p3) {
   var Cont;
   if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild) {
     if(getElem(p1,p2,p3).firstChild.nodeType == 3)
       Cont = getElem(p1,p2,p3).firstChild.nodeValue;
     else
       Cont = "";
     return(Cont);
   }
   else if(MS && getElem(p1,p2,p3)) {
     Cont = getElem(p1,p2,p3).innerText;
     return(Cont);
   }
   else return void(0);
}

function getAttr(p1,p2,p3,p4) {
   var Attr;
   if((DOM || MS) && getElem(p1,p2,p3)) {
     Attr = getElem(p1,p2,p3).getAttribute(p4);
     return(Attr);
   }
   else if (NS && getElem(p1,p2)) {
       if (typeof getElem(p1,p2)[p3] == "object")
        Attr=getElem(p1,p2)[p3][p4]
       else
        Attr=getElem(p1,p2)[p4]
         return Attr;
       }
   else return void(0);
}

function setCont(p1,p2,p3,p4) {
   if(DOM && getElem(p1,p2,p3) && getElem(p1,p2,p3).firstChild)
     getElem(p1,p2,p3).firstChild.nodeValue = p4;
   else if(MS && getElem(p1,p2,p3))
     getElem(p1,p2,p3).innerText = p4;
   else if(NS && getElem(p1,p2,p3)) {
     getElem(p1,p2,p3).document.open();
     getElem(p1,p2,p3).document.write(p4);
     getElem(p1,p2,p3).document.close();
   }
}

DHTML_init();
	/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["http://specialty.bfioptilas.se/objects/1_3_1783560463/laird1.png", "http://specialty.bfioptilas.se/EMI+Shielding-74.htm", "_self"] 
fadeimages[1]=["http://specialty.bfioptilas.se/objects/1_3_1783560463/laird2_EMI.jpg", "http://specialty.bfioptilas.se/EMI+Shielding-74.htm", "_self"] 
fadeimages[2]=["http://specialty.bfioptilas.se/objects/1_3_1783560463/laird3_EMI.jpg", "http://specialty.bfioptilas.se/EMI+Shielding-74.htm", "_self"]
fadeimages[3]=["http://specialty.bfioptilas.se/objects/1_3_1783560463/laird4_EMI.jpg", "http://specialty.bfioptilas.se/EMI+Shielding-74.htm", "_self"]  
 fadeimages[4]=["http://specialty.bfioptilas.se/objects/1_3_1783560463/laird5_EMI.jpg", "http://specialty.bfioptilas.se/EMI+Shielding-74.htm", "_self"]
 fadeimages[5]=["http://specialty.bfioptilas.se/objects/1_3_1783560463/laird6_thermal1.jpg", "http://specialty.bfioptilas.se/Power+Electronic+Components-75.htm", "_self"]  
 fadeimages[6]=["http://specialty.bfioptilas.se/objects/1_3_1783560463/laird7_thermal2.jpg", "http://specialty.bfioptilas.se/Power+Electronic+Components-75.htm", "_self"]
       
   
 
var fadebgcolor="white"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
var selected_chess = -1;
function chess_menu(){
  var div = document.getElementById("tp_chessboard_menu");
  div.replaceChild(chess_construct(), div.firstChild);
}

function chess_construct(){
  var table = document.createElement("table");
  table.style.borderWidth = "0px";
    table.style.margin = "0";
    table.style.margin = "0";
    table.cellPadding= "0";
    table.cellSpacing= "0";
  var tbody = document.createElement("tbody");
  var tr = document.createElement("tr");
  var pair = 0;
  var nb_nodes = document.getElementById("tp_chessboard_menu_ul").childNodes.length;
  for (var i=0;i<nb_nodes; i++){
    if (i<8){
      if (i==4) 
         pair = 1;
      var n = document.getElementById("tp_chessboard_menu_ul").childNodes[i];
      var link = document.createElement("a");

      link.href = n.firstChild.href;
      link.target = n.firstChild.target;
      link.innerHTML = n.firstChild.innerHTML;
      link.style.fontSize = "11px";
        if (selected_chess==i) link.style.color= "#962f34";

      var td = document.createElement("td");
      td.style.height = "57px";
      td.style.overflow = "hidden";
      td.style.textAlign = "center";
      if (pair == 0){
        td.style.background = "#c0c0c0";
        pair = 1;
      }
      else{
        td.style.background = "#CFCFCF";
        pair = 0;
      }

      var div = document.createElement("div");
      div.style.width = "100px";
      div.style.overflow = "hidden";
      div.appendChild(link);
      td.appendChild(div);
      if (i==4){
         tbody.appendChild(tr);
         var tr = document.createElement("tr");
      }
      tr.appendChild(td);
    }
  }
  tbody.appendChild(tr);
  table.appendChild(tbody);
  return table;
}

function display_contact(type){ var peremption = 1000*60*60*24*365;if (type=='open') {document.getElementById('contact_info').style.display = 'block';fixer_valeur('contactdip', '1', peremption);}if (type=='close') {document.getElementById('contact_info').style.display = 'none';fixer_valeur('contactdip', '0', peremption);}}

function fixer_valeur(indicateur, valeur, expire) {
 var maintenant = new Date();
 var temps = new Date(maintenant.getTime() + expire);
 document.cookie = indicateur+"="+valeur+"; expires="+temps.toGMTString()+";";
}

function cherche_valeur(indicateur) {
 var valeur = 1;
 if(document.cookie) {
  var valeur_depart = document.cookie.indexOf(indicateur+"=");
  if (valeur_depart != -1){
    valeur_depart +=  indicateur.length + 1;
    var sub = document.cookie.substring(valeur_depart);
    var valeur_fin = sub.indexOf(";");
    if (valeur_fin == -1)
     valeur_fin = sub.length;
    valeur = sub.substring(0,valeur_fin);

  }
 }
 return valeur;
}

function init_contactdisp(){
  if (cherche_valeur('contactdip') == 0) document.getElementById('contact_info').style.display = 'none';
  else document.getElementById('contact_info').style.display = 'block';

}
var tab_pr = new Array();tab_pr[0]=0;tab_pr[1]=15;var pr_win_height = 30;var pr_item_scroll_height = 2;var pr_total_item_height = 30;var pr_scroll_speed = 150;var pr_scroll_id = "";var pr_display_id = -1;
   function pr_init(){
     for(i=0;i<tab_pr.length;i++){
       document.getElementById("pr_allcontent_"+i).style.display = "none";
     }
    pr_scroll_id = window.setInterval("pr_scroll()",pr_scroll_speed);
   }
   function pr_scroll(){
     for(i=0;i<tab_pr.length;i++){
       pos = tab_pr[i]-pr_item_scroll_height;
       if (pos < -15)
         pos = pr_total_item_height;
       tab_pr[i] = pos;
       document.getElementById("pr_"+i).style.top = pos+"px";
     }
   }

   function pr_stop_scroll(i){
     if (i>-1){
       document.getElementById("pr_"+i).style.color = "#962f34";
     }
     window.clearInterval(pr_scroll_id);
   }

   function pr_restart_scroll(i){
     if (i>-1){
       document.getElementById("pr_"+i).style.color = "#00386e";
     }
     pr_scroll_id = window.setInterval("pr_scroll()",pr_scroll_speed);
   }

   function pr_display(p){
     pr_hidde(pr_display_id);
     pr_display_id = p;
     document.getElementById("pr_allcontent").style.display = "block";
     document.getElementById("pr_allcontent_"+pr_display_id).style.display = "block";
     document.getElementById("pr_info").style.display = "none";
   }

   function pr_hidde(p){
     if(p!=-1){
       document.getElementById("pr_allcontent").style.display = "none";
       document.getElementById("pr_allcontent_"+p).style.display = "none";
       document.getElementById("pr_info").style.display = "block";
     }
     pr_display_id = -1;
   }

   function pr_display_first(){
     document.getElementById("pr_allcontent").style.display = "block";
     document.getElementById("pr_allcontent_0").style.display = "block";
      pr_display_id = 0;
   }
 
