// fading header links+messages
function msgobj(){
this.msg;
this.msgurl;
this.mstip;
this.mstype;
}
var msg_list=new Array();
msg_list[0]=new msgobj();
msg_list[1]=new msgobj();
msg_list[2]=new msgobj();
msg_list[3]=new msgobj();
msg_list[4]=new msgobj();
msg_list[0].msg="You have to see this!";
msg_list[0].msgurl="../volume4_e/suparator.html";
msg_list[0].msgtip="Wondering what Suparator&reg;is? Click now!";
msg_list[0].msgtype="page";
msg_list[1].msg="New!!! Case study on paint line pretreatment.";
msg_list[1].msgurl="../volume2_e/paint-line.html";
msg_list[1].msgtip="See what oil control can do on a cleaning bath for a coating line.";
msg_list[1].msgtype="page";
msg_list[2].msg="Why Suparator&reg;is ideal for heat treat applications.";
msg_list[2].msgurl="../volume3_e/heat-treat.html";
msg_list[2].msgtip="Oil control in heat treat is not simple. Read why and what advantages Suparator&reg;has in this application field.";
msg_list[2].msgtype="section";
msg_list[3].msg="Shows where Suparator is exibited.";
msg_list[3].msgurl="../volume0_e/shows.html";
msg_list[3].msgtip="Find out where Suparator is on display.";
msg_list[3].msgtype="section";
msg_list[4].msg="Down load brochures and other documents here.";
msg_list[4].msgurl="../volume5_e/welcome5.html";
msg_list[4].msgtip="Here you can down load documentation and technical data in Adobe pdf format.";
msg_list[4].msgtype="none";
//----------------------------------------------------------------------
//----------------------------------------------------------------------
if (!parent.mmenu.style0){
var sr=208, sg=240, sb=240, er=160, eg=0, eb=0;
}
else{
var sr=96, sg=144, sb=192;var er=0, eg=255, eb=0;
}
var step=20, fade=50;pause=3000;
var icolor=0, imsg=0, totality=false, glowing=true, msg_obj;
var hexa=new Array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f');
//--------------------------------------------------------------------
//--------------------------------------------------------------------
function hex(i){
if (i <0)
return "00";
else if (i> 255)
return "ff";
else
return ""+hexa[Math.floor(i/16)]+hexa[i%16];
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
var hr, hg, hb;
var colors1=new Array();
for(var i=0;i <=step;i++){
hr=hex(Math.floor(sr * ((step-i)/step)+er * (i/step)));
hg=hex(Math.floor(sg * ((step-i)/step)+eg * (i/step)));
hb=hex(Math.floor(sb * ((step-i)/step)+eb * (i/step)));
colors1[i]="#"+hr+hg+hb;
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
function init_msgs(){
if (!parent.mmenu) return;
msg_obj=getObject("msgfade");
loadmsg(msg_list[imsg].msg,msgfade);
msg_timer=setTimeout("changecolor()",fade);
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
function changemsg(){
imsg=(imsg==msg_list.length-1)? 0: imsg+1;
loadmsg(msg_list[imsg].msg,msgfade);
}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
function changecolor(){
getContentColor();
if (totality !=true){
msg_obj.color=contentcolor;
msg_timer=setTimeout("changecolor()",fade);
}else{
msg_timer=setTimeout("changecolor()",pause);
totality=false;
}}
//--------------------------------------------------------------------
//--------------------------------------------------------------------
function getContentColor(){
if(icolor==colors1.length-1 && glowing==true){
glowing=false;
totality=true;
}else if(icolor <colors1.length && glowing==true){
contentcolor=colors1[eval(icolor++)];
}else if(icolor <1 && glowing==false){
changemsg();
contentcolor=colors1[eval(icolor++)];
glowing=true;
}else{
contentcolor=colors1[eval(icolor--)];
}}
