vs4Arr=[
                                                                           
["/images/catalog/logo/logo-Accuone.jpg","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-acome.jpg","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-aeroline.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-aldes.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-ampack.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-Atlantic.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-Atlantic-chauffage-ENR.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-atlantic-climatisation-ventilation.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-Beopan.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-clivet.gif","/catalogues-fabricants.html",""],  
["/images/catalog/logo/logo-Dorken.gif","/catalogues-fabricants.html",""],   
["/images/catalog/logo/logo-dosteba.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-hekia.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-helios.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-hitachi.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-Homatherm.jpg","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-ING.gif","/catalogues-fabricants.html",""],        
["/images/catalog/logo/logo-isoltop.gif","/catalogues-fabricants.html",""],        
["/images/catalog/logo/logo-Kingspan-SOLAR.gif","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-Makita.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-metisse.gif","/catalogues-fabricants.html",""],  
//["/images/catalog/logo/logo-Nedair.gif","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-oventrop.jpg","/catalogues-fabricants.html",""],  
["/images/catalog/logo/logo-Aerfast-Sofragraf-Senco.jpg","/catalogues-fabricants.html",""],  
["/images/catalog/logo/logo-PRB.gif","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-speidel.gif","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-sika.gif","/catalogues-fabricants.html",""],  
["/images/catalog/logo/logo-siplast.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-somatherm.gif","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-soprema.gif","/catalogues-fabricants.html",""],    
["/images/catalog/logo/logo-SOTEXTHO.gif","/catalogues-fabricants.html",""],
["/images/catalog/logo/logo-systemair.gif","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-unelvent.gif","/catalogues-fabricants.html",""], 
["/images/catalog/logo/logo-Technibel-climatisation.gif","/catalogues-fabricants.html",""]


] ;
scroll1='null' ;
function unset(array, valueOrIndex){
	var output=[];
	for(var i in array){
		if (i!=valueOrIndex)
			output[i]=array[i];
	}
	return output;
}
while (vs4Arr.length>5) {
//var numimage= Math.round(Math.random()*(vs4Arr.length-1)+1);
var numimage= Math.round(Math.random()*(vs4Arr.length))-1
//vs4Arr = unset(vs4Arr, numimage);
vs4Arr.splice(numimage,1)
}
dir=0 // 0 = up 1 = down
speed=1
imageSize=100  // %
fixedWidth=212 // set a fixed width
fixedHeight=100 // set a fixed height

popupLeft= 100 // pixels
popupTop= 100 // pixels

biggest=0
ieBorder=0
sv4Timer=null

preload=new Array()
for(var i=0;i<vs4Arr.length;i++){
preload[i]=new Image()
preload[i].src=vs4Arr[i][0]
}

function initVS4(){
scroll1=document.getElementById("scroller1");
if(scroll1){
for(var j=0;j<vs4Arr.length;j++){

scroll1.innerHTML+='<img id="pic'+j+'" src="'+preload[j].src+'" alt="'+vs4Arr[j][2]+'" onclick="showBigPic('+j+')"><br>'

if(imageSize!=0){ // use percentage size
newWidth=preload[j].width/100*imageSize
newHeight=preload[j].height/100*imageSize
}
else{ // use fixed size
newWidth=fixedWidth
newHeight=fixedHeight
}

document.getElementById("pic"+j).style.width=newWidth+"px"
document.getElementById("pic"+j).style.height=newHeight+"px"

if(document.getElementById("pic"+j).offsetWidth>biggest){
biggest=document.getElementById("pic"+j).offsetWidth
}

}

scrollBox=document.getElementById("scroll_box")

if(document.getElementById&&document.all&&document.compatMode!="CSS1Compat"){
ieBorder=parseInt(scrollBox.style.borderTopWidth)*2
}

scrollBox.style.width=biggest+ieBorder+"px"

scroll2=document.getElementById("scroller2")
scroll2.innerHTML=scroll1.innerHTML
scroll2.style.top=scroll1.offsetHeight+"px"

if(dir==0){
speed= -speed
}

scrollVS4()
}
}

function scrollVS4(){
if(paused==1){return}
clearTimeout(sv4Timer)

scroll1Pos=parseInt(scroll1.style.top)
scroll2Pos=parseInt(scroll2.style.top)

scroll1Pos+=speed
scroll2Pos+=speed

scroll1.style.top=scroll1Pos+"px"
scroll2.style.top=scroll2Pos+"px"

sv4Timer=setTimeout("scrollVS4()",60)

if(dir==0){
if(scroll1Pos< -scroll1.offsetHeight){
scroll1.style.top=scroll1.offsetHeight+"px"
}

if(scroll2Pos< -scroll1.offsetHeight){
scroll2.style.top=scroll1.offsetHeight+"px"
}
}

if(dir==1){
if(scroll1Pos>parseInt(scrollBox.style.height)){
scroll1.style.top=(scroll2Pos-scroll1.offsetHeight)+"px"
}

if(scroll2Pos>parseInt(scrollBox.style.height)){
scroll2.style.top=(scroll1Pos - scroll2.offsetHeight)+"px"
}
}

}

st=null
function pause(){
clearTimeout(sv4Timer)
clearTimeout(st)
}

function reStartVS4(){
clearTimeout(st)
st=setTimeout("scrollVS4()",100)
}

paused=0
picWin=null
chkTimer=null

function showBigPic(p){

if(vs4Arr[p][1]!=""){
paused=1

if(picWin&&picWin.open&&!picWin.closed){picWin.close()} // if picWin exists close it

if(vs4Arr[p][1].indexOf("htm")==-1){
bigImg=new Image()
bigImg.src=vs4Arr[p][1]

data="\n<center>\n<img src='"+bigImg.src+"'>\n<\/center>\n"

var winProps = "left= "+popupLeft+", top = "+popupTop+", width="+(bigImg.width+20)+", height="+(bigImg.height+20)+", scrollbars=no, toolbar=no, directories=no, menu bar=no, resizable=yes, status=no"

picWin=window.open("","win1",winProps)
picWin.document.write("<HTML>\n<HEAD>\n<TITLE><\/TITLE>\n")
picWin.document.write("<\/HEAD>\n")
picWin.document.write("<BODY style='backgground-color:black;margin-top:10px;margin-left10px'>\n")
picWin.document.write("<div id=\"display\">"+data+"<\/div>")
picWin.document.write("\n<\/BODY>\n<\/HTML>")
picWin.document.close()
}
else{
//picWin=window.location(vs4Arr[p][1])
picWin=window.open(vs4Arr[p][1], "_self")
}

}
clearTimeout(chkTimer)
}

window.onfocus=function(){
/*
clearTimeout(chkTimer)
if(picWin&&picWin.open&&!picWin.closed){
chkTimer=setTimeout("picWin.close()",10000) // uncomment to have popup closed when blurred
}
*/
paused=0
if(scroll1!='null'){
scrollVS4() 
}

}
window.onblur=function(){

paused=1
pause()
}
