
function fire(){

if (document.getElementById('me1')){
var m1 = document.getElementById('me1');
m1.onmouseover = function() {resclass(); tab1(); return false;}}

if (document.getElementById('me2')){
var m2 = document.getElementById('me2');
m2.onmouseover = function() {resclass(); tab2(); return false;}}

if (document.getElementById('me3')){
var m3 = document.getElementById('me3');
m3.onmouseover = function() {resclass(); tab3(); return false;}}

if (document.getElementById('me4')){
var m4 = document.getElementById('me4');
m4.onmouseover = function() {resclass(); tab4(); return false;}}

if (document.getElementById('me5')){
var m5 = document.getElementById('me5');
m5.onmouseover = function() {resclass(); tab5(); return false;}}

if (document.getElementById('video')){
var v21 = document.getElementById('video');
//v21.onclick = function() {vidon(); return false;}
}// Uncomment to activate video launch.

if (document.getElementById('n7')){
var sf = document.getElementById('n7');
sf.onmouseover = function() {srcs(); return false;}}

if (document.getElementById('n1t')){
var n1t = document.getElementById('n1t');
n1t.onmouseover = function() {srch(); return false;}}

if (document.getElementById('n2t')){
var n2t = document.getElementById('n2t');
n2t.onmouseover = function() {srch(); return false;}}

if (document.getElementById('n3t')){
var n3t = document.getElementById('n3t');
n3t.onmouseover = function() {srch(); return false;}}

if (document.getElementById('n4t')){
var n4t = document.getElementById('n4t');
n4t.onmouseover = function() {srch(); return false;}}

if (document.getElementById('n5t')){
var n5t = document.getElementById('n5t');
n5t.onmouseover = function() {srch(); return false;}}

if (document.getElementById('n6t')){
var n6t = document.getElementById('n6t');
n6t.onmouseover = function() {srch(); return false;}}


if (document.getElementById('n7b')){
var sfb = document.getElementById('n7b');
sfb.onmouseover = function() {srcsb(); return false;}}

if (document.getElementById('n1b')){
var n1tb = document.getElementById('n1b');
n1tb.onmouseover = function() {srchb(); return false;}}

if (document.getElementById('n2b')){
var n2tb = document.getElementById('n2b');
n2tb.onmouseover = function() {srchb(); return false;}}

if (document.getElementById('n3b')){
var n3tb = document.getElementById('n3b');
n3tb.onmouseover = function() {srchb(); return false;}}

if (document.getElementById('n4b')){
var n4tb = document.getElementById('n4b');
n4tb.onmouseover = function() {srchb(); return false;}}

if (document.getElementById('n5b')){
var n5tb = document.getElementById('n5b');
n5tb.onmouseover = function() {srchb(); return false;}}

if (document.getElementById('n6b')){
var n6tb = document.getElementById('n6b');
n6tb.onmouseover = function() {srchb(); return false;}}

nov();

fie();//ie

}

function resclass() {

    var a1 = document.getElementById('me1'); a1.className="off";
    var a2 = document.getElementById('me2'); a2.className="off";
    var a3 = document.getElementById('me3'); a3.className="off";
    var a4 = document.getElementById('me4'); a4.className="off";
    var a5 = document.getElementById('me5'); a5.className="off";
    
    var b1 = document.getElementById('z1'); b1.style.zIndex="1";
    var b2 = document.getElementById('z2'); b2.style.zIndex="1";
    var b3 = document.getElementById('z3'); b3.style.zIndex="1";
    var b4 = document.getElementById('z4'); b4.style.zIndex="1";
    var b5 = document.getElementById('z5'); b5.style.zIndex="1";
	
	}
	
function nov() {

    var n1 = document.getElementById('newsOv');
    
    n1.onmouseover = function() {no1(); return false};
    
    n1.onmouseout = function() {no2(); return false};
	
	}
	
	function no1() {

    var n1 = document.getElementById('newsOv');
	
    n1.className="no1";
	
	}
	
	function no2() {

    var n1 = document.getElementById('newsOv');
	
    n1.className="no2";
	
	}
	
	function srcs() {

    var sv = document.getElementById('searchForm');
	
    sv.style.visibility="visible";
    
    var sv2 = document.getElementById('n7');
    
    sv2.className="actived";
	
	}
	
	function srch() {

    var hv = document.getElementById('searchForm');
	
    hv.style.visibility="hidden";
    
    var hv2 = document.getElementById('n7');
    
    hv2.className="desactived";
	
	}
	
	function srcsb() {

    var sbv = document.getElementById('searchFormb');
	
    sbv.style.visibility="visible";
    
    var sbv2 = document.getElementById('n7b');
    
    sbv2.className="actived";
	
	}
	
	function srchb() {

    var hbv = document.getElementById('searchFormb');
	
    hbv.style.visibility="hidden";
    
    var hbv2 = document.getElementById('n7b');
    
    hbv2.className="desactived";
	
	}
	

	
function tab1() {// &agrave; &eacute;

    var t1 = document.getElementById('d11b');
	
	t1.innerHTML = '<p class="tb">'
	
	+'<a href="http://www.parelies.com/restauration-sonore-sound-restoration" title="Allez &agrave; cette rubrique - Go to this section">'
	
	+'<span class="aw"></span><img src="http://www.parelies.com/img/rs.gif" alt="Allez ˆ cette rubrique - Go to this section" /></a></p>'
	
	+'<p>Restauration sonore... Ou comment remonter le temps en gommant ses outrages... '
	
	+'<br /> Acc&eacute;dez &agrave; cette rubrique en cliquant sur<a href="http://www.parelies.com/restauration-sonore-sound-restoration"> ce lien</a>.</p>'
	
	+'<p>Sound restoration... Or how to go back in time by erasing its ravages... '
	
	+'<br /> Access this section by clicking on <a href="http://www.parelies.com/restauration-sonore-sound-restoration">this link</a>.</p>';
	
    var t11 = document.getElementById('me1'); t11.className="on";
    
    var t12 = document.getElementById('z1'); t12.style.zIndex="400";
	
	}


function tab2() {

    var t2 = document.getElementById('d11b');
    
	t2.innerHTML = '<p class="tb">'
	
	+'<a href="http://www.parelies.com/mastering" title="Allez &agrave; cette rubrique - Go to this section">'
	
	+'<span class="aw"></span><img src="http://www.parelies.com/img/mas.gif" alt="Allez ˆ cette rubrique - Go to this section" /></a></p>'
	
	+'<p>Mastering... Ultimes mises au point avant satellisation... '
	
	+'<br /> Acc&eacute;dez &agrave; cette rubrique en cliquant sur<a href="http://www.parelies.com/mastering"> ce lien</a>.</p>'
	
	+'<p>Mastering... Final adjustments prior to satellization... '
	
	+'<br /> Access this section by clicking on <a href="http://www.parelies.com/mastering">this link</a>.</p>';
	
    var t22 = document.getElementById('me2'); t22.className="on";
    
    var t23 = document.getElementById('z2'); t23.style.zIndex="400";
	
	}
	
	
function tab3() {

    var t3 = document.getElementById('d11b');
	
	t3.innerHTML = '<p class="tb">'
	
	+'<a href="http://www.parelies.com/gravure-vinyles-vinyls-engraving" title="Allez &agrave; cette rubrique - Go to this section">'
	
	+'<span class="aw"></span><img src="http://www.parelies.com/img/vin.gif" alt="Allez ˆ cette rubrique - Go to this section" /></a></p>'
	
	+'<p>Gravure vinyles... Un son bien cisel&eacute;... '
	
	+'<br /> Acc&eacute;dez &agrave; cette rubrique en cliquant sur<a href="http://www.parelies.com/gravure-vinyles-vinyls-engraving"> ce lien</a>.</p>'
	
	+'<p>Vinyls engraving... Precisely chiseled sound... '
	
	+'<br /> Access this section by clicking on <a href="http://www.parelies.com/gravure-vinyles-vinyls-engraving">this link</a>.</p>';
	
    var t33 = document.getElementById('me3'); t33.className="on";
    
    var t34 = document.getElementById('z3'); t34.style.zIndex="400";
	
	}
	
function tab4() {

    var t4 = document.getElementById('d11b');
	
	t4.innerHTML = '<p class="tb">'
	
	+'<a href="http://www.parelies.com/optimisation-hcx-home-cinema" title="Allez &agrave; cette rubrique - Go to this section">'
	
	+'<span class="aw"></span><img src="http://www.parelies.com/img/htx.gif" alt="Allez ˆ cette rubrique - Go to this section" /></a></p>'
	
	+'<p>Optimisation HCX Home Cinema... Un &quot;plus&quot; pour rendre plus convainquants de nombreux documents... '
	
	+' Acc&eacute;dez &agrave; cette rubrique en cliquant sur<a href="http://www.parelies.com/optimisation-hcx-home-cinema"> ce lien</a>.</p>'
	
	+'<p>Optimisation HCX Home Cinema... An &quot;extra&quot; that can make many documents more convincing... '
	
	+' Access this section by clicking on <a href="http://www.parelies.com/optimisation-hcx-home-cinema">this link</a>.</p>';
	
    var t44 = document.getElementById('me4'); t44.className="on";
    
    var t45 = document.getElementById('z4'); t45.style.zIndex="400";
	
	}
	
	
function tab5() {

    var t5 = document.getElementById('d11b');
	
	t5.innerHTML = '<p class="tb">'
	
	+'<a href="http://www.parelies.com/parelimage-dvd-diaporama-slideshow" title="Allez &agrave; cette rubrique - Go to this section">'
	
	+'<span class="aw"></span><img src="http://www.parelies.com/img/dia.gif" alt="Allez ˆ cette rubrique - Go to this section" /></a></p>'
	
	+'<p>Parelimage DVD Diaporama... IMPACT ou IMMERSION ? A vous de choisir... '
	
	+'<br /> Acc&eacute;dez &agrave; cette rubrique en cliquant sur<a href="http://www.parelies.com/parelimage-dvd-diaporama-slideshow"> ce lien</a>.</p>'
	
	+'<p>Parelimage DVD Slideshow... IMPACT or IMMERSION? Your choice ... '
	
	+'<br /> Access this section by clicking on <a href="http://www.parelies.com/parelimage-dvd-diaporama-slideshow">this link</a>.</p>';
	
    var t55 = document.getElementById('me5'); t55.className="on";
    
    var t56 = document.getElementById('z5'); t56.style.zIndex="400";
	
	}
	
	
/*********************************************************************************

Video
  
**********************************************************************************/


function sendEvent(swf,typ,prm) { 
  thisMovie(swf).sendEvent(typ,prm); 
};
function getUpdate(typ,pr1,pr2,swf) {};
function thisMovie(swf) {
  if(navigator.appName.indexOf("Microsoft") != -1) {
    return window[swf];
  } else {
    return document[swf];
  }
}


function vidon() {

    var v1 = document.getElementById('videowrp');
	
	v1.innerHTML = '<div id="shadowbox_container">'
 + '<div id="sdw">'
 + '<div id="shadowbox">'
 + '<div id="shadowbox_title">'
    + '<div id="shadowbox_toolbar"><div id="shadowbox_toolbar_inner">'
        + '<div id="shadowbox_nav_close">'
            + '<a id="vidclose" title="Fermer - Close" href="javascript:sendEvent("mediap","stop");">Fermer - Close</a>'
 + '</div></div></div></div>'
 + '<div id="shadowbox_body"><div id="shadowbox_body_inner">'
 
 + '</div></div>'
 + '<div id="shadowbox_title_inner">Parelimage</div>'
 + '</div></div></div>';
	
	v1.className="von";
	
	var v7 = document.getElementById('shadowbox_body_inner');
	
	var v72 = document.getElementById('mediaHolder');
	
	v7.appendChild(v72);
	
	v72.style.display = "block";
	
	vidoff1();
	
	if (document.getElementById('von0')){ vidmtie();}
	
	}
	
	
	function adjustS() {

	
	var xScroll, yScroll;

	
	if (window.innerHeight && window.scrollMaxY) {	

		xScroll = document.body.scrollWidth;

		yScroll = window.innerHeight + window.scrollMaxY;

	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac

		xScroll = document.body.scrollWidth;

		yScroll = document.body.scrollHeight;

	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari

		xScroll = document.body.offsetWidth;

		yScroll = document.body.offsetHeight;

	}
	
	pageWidth = xScroll;

	pageHeight = yScroll;
	

	var windowWidth, windowHeight;

	if (self.innerHeight) {	// all except Explorer

		windowWidth = self.innerWidth;

		windowHeight = self.innerHeight;

	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode

		windowWidth = document.documentElement.clientWidth;

		windowHeight = document.documentElement.clientHeight;

	} else if (document.body) { // other Explorers

		windowWidth = document.body.clientWidth;

		windowHeight = document.body.clientHeight;

	}	


	arrayPageSize = new Array(windowWidth,windowHeight,pageWidth,pageHeight);

	return arrayPageSize;
}

function vidmtie() {

	if (document.getElementById('von0')){
			
	var von = document.getElementById('von0');
	
	var von2 = document.getElementById('videowrp');
	
	von.style.display = "block";
	
	var arrayPageSize = adjustS();

	vheight = arrayPageSize[3];
	
	von.style.height = (vheight + 'px');
	
	vwidth = arrayPageSize[2];
	
	von.style.width = "100%";
	
	var vp = document.getElementById("vpos");

    vmt = vp.offsetTop;
    vmt2 = vmt+244;
    vmt3 = vmt2;
        
    var sdw = document.getElementById('sdw');
    
    sdw.style.top = vmt3;
    
    von.onclick = function() {vidoff2(); return false;}
    
    von2.onclick = function() {vidoff2(); return false;}
    
	
	}
	
}
	
	
function vidoff1() {

	if (document.getElementById('video')){
	
	var v22 = document.getElementById('vidclose');
	
	v22.onclick = function() {vidoff2(); return false;}}
	
	}
	
	
function vidoff2() {

    var objBody = document.getElementsByTagName("body").item(0);

    var v11 = document.getElementById('mediaHolder');
    
    v11.style.display = "none";
    
    if (document.getElementById('von0')){
	
	var von = document.getElementById('von0');
	
	von.style.display = "none";
	
	//vidoffie();
	
	sendEvent('mediap','stop');
	
	}
    
    objBody.insertBefore(v11, objBody.lastChild);

    var v2 = document.getElementById('videowrp');
	
	v2.innerHTML = '';
	
	v2.className="voff";
	
	
}

function vidoffie() {

sendEvent('mediap','stop');

}


/*********************************************************************************

ie stuff
  
**********************************************************************************/

function fie() {

	if (document.getElementById('iem2')){
	
	var iem2 = document.getElementById('iem2').offsetHeight;
	
	var mas = document.getElementById('mas');
	
	var iem2h = iem2;
	
	mas.style.height = (iem2h + 'px');
	
	
	}
	
	if (document.getElementById('f5m3')){
	
	var f5m3 = document.getElementById('f5m3').offsetHeight;
	
	var j3m2 = document.getElementById('j3m2');
	
	var f5m3h = f5m3;
	
	j3m2.style.height = (f5m3h + 'px');
	
	
	}
	
	if (document.getElementById('f5m')){
	
	var f5m = document.getElementById('f5m').offsetHeight;
	
	var j3m = document.getElementById('j3m');
	
	var f5mh = f5m;
	
	j3m.style.height = (f5mh + 'px');
	
	
	}
	
}
	
	
/*********************************************************************************

Preload stuff
  
**********************************************************************************/


function pli() {

 	var imgtl = new Array('rs.gif', 'mas.gif', 'dia.gif', 'vin.gif', 'htx.gif', 'nexov.jpg', 'prevov.jpg', 'nexovm.jpg', 'prevovm.jpg', 'awov.png', 'awov2.png');
 	
 	var dir = '/img/';
 	
 	var ima = new Array();
 	
 	for (i=0;i<imgtl.length;i++) {
 	
  		ima[i] = new Image();
  		
  		ima[i].src = dir + imgtl[i];
  		
  	}
  	  		
}



/*********************************************************************************

  Multiple window.onload
  
**********************************************************************************/


function addLoadEvent(func)

{	

	var oldonload = window.onload;

	if (typeof window.onload != 'function'){

    	window.onload = func;

	} else {

		window.onload = function(){

		oldonload();

		func();

		}

	}

}


addLoadEvent(fire);
addLoadEvent(pli);
