var streamheight;
var streamwidth;
var streamwrapper;

//formatting
var cb__fnt = cb_jobstream_text_font?'font: '+cb_jobstream_text_font+';':'';
var cb__fntclr = cb_jobstream_font_color?'color: '+cb_jobstream_font_color+';':'';
var cb__bg  = cb_jobstream_main_bgcolor?'background-color: '+cb_jobstream_main_bgcolor+';':'';
var cb__lnk = cb_jobstream_link_color?'color: '+cb_jobstream_link_color+';':'';

p6 ='<table border="0" width="100%">';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3H3SN760RS3K8RYX0T" style="'+cb__fnt+cb__lnk+'"><b>Jefe de proyecto</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3H3SN760RS3K8RYX0T" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Michael Page International Espa&#241;a<br \/>MADRID</a><\/td><\/tr>';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3F2MG6W8MFKQ6X4CFZ" style="'+cb__fnt+cb__lnk+'"><b>Responsable t&#233;cnico</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3F2MG6W8MFKQ6X4CFZ" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Michael Page International Espa&#241;a<br \/>MADRID</a><\/td><\/tr>';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G3LM77FVHL3C0TGGF" style="'+cb__fnt+cb__lnk+'"><b>Interim- jefe de proyectos</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G3LM77FVHL3C0TGGF" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Page Personnel<br \/>Tarragona</a><\/td><\/tr>';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3I6YH5X91787KV1D12" style="'+cb__fnt+cb__lnk+'"><b>T&#233;cnico I+D CSP</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3I6YH5X91787KV1D12" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Acciona<br \/>Navarra</a><\/td><\/tr>';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3H1P5712DL4TYMV5H0" style="'+cb__fnt+cb__lnk+'"><b>Ingeniero industrial junior</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3H1P5712DL4TYMV5H0" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Michael Page International Espa&#241;a<br \/>MADRID</a><\/td><\/tr>';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G3L06Y17XVJLZ8XQX" style="'+cb__fnt+cb__lnk+'"><b>Responsable aplicaciones/desarrollo</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G3L06Y17XVJLZ8XQX" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Michael Page International Espa&#241;a<br \/>MADRID</a><\/td><\/tr>';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G58G6V0KPJ2S5DFMJ" style="'+cb__fnt+cb__lnk+'"><b>Ingeniero electr&#243;nica de seguridad</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G58G6V0KPJ2S5DFMJ" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Michael Page International Espa&#241;a<br \/>MADRID</a><\/td><\/tr>';
p6+= '<tr><td onmouseover="highlight(this);" onmouseout="unhighlight(this);" style="padding: 0 0 10px 0;"><a target="_top" href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G1WQ6ZFK9K2D1109Q" style="'+cb__fnt+cb__lnk+'"><b>Ingeniero de Compras</b><\/a><br \/><a href="http://www.careerbuilder.es/intl/JobSeeker/Jobs/JobDetails.aspx?ipath=jbstrm&lr=soloing&siteid=soloing_jbstrm2&Job_DID=J3G1WQ6ZFK9K2D1109Q" style="'+cb__fnt+cb__fntclr+'text-decoration:none;display:block;">Randstad<br \/>Madrid</a><\/td><\/tr>';

p6+='</table>';

document.write('<div id="stream">'+p6+'</div>');
streamheight = document.getElementById('stream').scrollHeight;
document.getElementById('stream').style.display = 'none';

streamwidth = (parseFloat(cb_jobstream_width) - 6) + 'px';
streamwrapper = (parseFloat(cb_jobstream_height)) + 'px';

//JobStream
document.write('<table border="0"><tr><td>');

c=new scrollerObj('c',streamwrapper,streamwidth,streamheight,'100',p6,cb_jobstream_main_bgcolor,cb_jobstream_main_bgcolor,'1','center')


document.write('<\/td><\/tr><\/table>');

//Scripts for scroller
function scrollerObj(name,initH,initW,heightB,widthB,content,initBg,Bg,speed,initFl){

//**data**//
this.name=name;this.initH=initH;this.initW=initW;this.heightB=heightB;
this.widthB=widthB;this.content=content;this.initBg=initBg;
this.Bg=Bg;this.iniFl=initFl;this.speed=parseInt(speed,5);
this.timer=name+"Timer";

//**methods**//
this.getElement=getElement;this.createLayer=createLayer;
this.scrollLayer=scrollLayer;this.scrollLoop=scrollLoop;

//**initiate methods**//
this.createLayer();this.getElement();this.scrollLayer();}

//**call this method to stop scrolling**//
function scrollLoop(s){this.speed=s;}
function scrollLayer(){
if(parseInt(this.elem.style.top,10)>(this.elem.offsetHeight*(-1))){
  this.elem.style.top=parseInt(this.elem.style.top,10)-this.speed+'px';
  } else {this.elem.style.top=this.initH;}}
function getElement(){this.elem=document.getElementById(this.name);}
function createLayer(){
document.write('<div id="layer'+this.name+'" style="position:relative;overflow:hidden;float:center');
document.write(';background-color:'+this.initBg+';width:');
document.write(this.initW+';height:'+this.initH+';" onmouseover="');
document.write(this.name+'.scrollLoop(0)" onmouseout="'+this.name+'.scrollLoop(');
document.write(this.speed+')">');
document.write('<table width="100%" id="'+this.name+'" style="position:absolute;top:');
document.write(this.initH+';left:0px;border:0px solid black;');
document.write('height:'+this.heightB+';background-color:');
document.write(this.Bg+'"><tr><td>');
document.write(this.content);
document.write('<\/td><\/tr><\/table><\/div>');
if(this.scrollLayer){this.timer=setInterval(this.name+'.scrollLayer()','30');}
}

function switchTabs(tab) {
     if (tab=='jbstrm') {
        document.getElementById(tab).style.display = '';
        document.getElementById("qsb").style.display = 'none';     
	}
    else {
        document.getElementById(tab).style.display = '';
        document.getElementById("jbstrm").style.display = 'none';      
    }
}

function highlight(section) {
    section.style.background = cb_jobstream_highlight;
}

function unhighlight(section) {
    section.style.background = cb_jobstream_main_bgcolor;
}