/* DHTML NewsTicker */
/* THIS VERSION DISPLAYS ALL WEB EXPRESS HEADLINES, FOLLOWED BY ALL croatian inventors */
/* Change the headlines below to change the contents of the scroller */

/* Copyright Notice for the Original Source. It has been substantially modified */
/* Pausing updown message scroller */

/* Configure the variables below to change the color, dimensions of the scroller */
scrollerwidth=124
scrollerheight=150
scrollerbgcolor='white'
toppause=4000 
minipause=10  // Original Value = var  minipause=100
dtop=5        // Original Value
decrement=2   // Original Value = var decrement=5

//set below to '' if you don't wish to use a background image
// MUST use transparent background image to prevent Netscape draw bug
scrollerbackground='transparent.gif'
disc_heads=new Array()
disc_urls=new Array()
express_heads=new Array()
express_urls=new Array()
//////////////////////////////////////////////////////////////////////////////
// The following line is a unique string to identify this array to another script 
//<!--HeadAPUrl-->


express_heads[0]="All about<br>Croatian scientist, inventors ..."
express_heads[1]="Nikola Tesla<br>Rudjer Boskovic"
express_heads[2]="Fran Bosnjakovic<br>Franjo Petris"
express_heads[3]="And other known<br>scientist, inventosrs ... "
express_heads[4]="On two languages<br>English % Croatian"
express_heads[5]="If you have any problems please contact us<br>kdrvar@newton.fsb.hr"
express_heads[6]="Biography<br>Time line"
express_heads[7]="Production Team"
express_heads[8]="David Shwartz<br>Vatroslav Jagic"
express_heads[9]="..and other.."

express_urls[0]="../TQnovo/index.htm"
express_urls[1]="../TQnovo/engilsh/nikola_tesla_english.htm"
express_urls[2]="../TQnovo/engilsh/bosnjak.htm"
express_urls[3]="../TQnovo/engilsh/biography.htm"
express_urls[4]="../TQnovo/index.htm"
express_urls[5]="../TQnovo/autori.htm"
express_urls[6]="../TQnovo/vremenskislijed.htm"
express_urls[7]="../TQnovo/autori.htm"
express_urls[8]="../TQnovo/engilsh/other_inventors/other_fifthteen.htm.htm"
express_urls[9]="../TQnovo/engilsh/index.htm"

//<!--/HeadAPUrl-->
//<!--HeadUrl-->

disc_heads[0]="Sve o hrvatskim izumiteljima<br>znanstvenicima i istrazivacima"
disc_heads[1]="Nikola Tesla<br>Rudjer Boskovic"
disc_heads[2]="Fran Bosnjakovic<br>Franjo Petris"
disc_heads[3]="I jos mnogi drugi poznati istrazivaci<br>znanstvenici..."
disc_heads[4]="Naravno na dva jezila<br>Hrvatski & Engleski"
disc_heads[5]="Ukoliko imate problema javie se autorima<br>kdrvar@newton.fsb.hr"
disc_heads[6]="Biografije<br>Crte vremena"
disc_heads[7]="Production Team<br>Autori"
disc_heads[8]="David Shwartz<br>Vatroslav Jagic"
disc_heads[9]="Ferdinand Kovacevic<br>Franjo Domin"
disc_heads[10]="Rudolf Fizir<br>Marin Getaldic"


disc_urls[0]="../TQnovo/index.htm"
disc_urls[1]="../TQnovo/engilsh/nikola_tesla_english.htm"
disc_urls[2]="../TQnovo/fran_bosnjakovic.htm"
disc_urls[3]="../TQnovo/izumitelji.htm"
disc_urls[4]="../TQnovo/engilsh/index.htm"
disc_urls[5]="../TQnovo/autori.htm"
disc_urls[6]="../TQnovo/vremenskislijed.htm"
disc_urls[7]="../TQnovo/autori.htm"
disc_urls[8]="../TQnovo/engilsh/other_inventors/other_fifthteen.htm"
disc_urls[9]="../TQnovo/engilsh/other_inventors/other_twenthy.htm"
disc_urls[10]="../TQnovo/engilsh/other_inventors/other_sixteen.htm"




//<!--/HeadUrl-->
// The previous line is a unique string to identify this array to another script 
//////////////////////////////////////////////////////////////////////////////
disc_news_url="../TQnovo/index.htm"
express_news_url="../TQnovo/index.htm"
disc_source_text="Start."
express_source_text="Start."
source_font="<font face='Verdana' SIZE=1><b>"

///////Do not edit past this line///////////////////////

messages=new Array()

function write_message( mindex, top_url, top_text, urlarray, textarray, index ) {
    messages[ mindex ] = source_font + "<a href='" + top_url + "'>" + top_text + "</a></b><br>" +
			 "<br><a href='" + urlarray[index] + "'>" + textarray[index] + "</a><br>";
    if ( textarray[ index + 1 ] )
	messages[ mindex ] += "<br><a href='" + urlarray[index + 1] + "'>" + textarray[index + 1] + "</a>";
    messages[ mindex ] += "</font>"
}

   mess_len = ( disc_heads.length + (disc_heads.length % 2) + express_heads.length +  (express_heads.length % 2)) / 2 ;

   for (d=0, m=0, e=0; m<=(mess_len-1); m++) {
       if ( disc_heads[d] )  {
          write_message( m, disc_news_url, disc_source_text, disc_urls, disc_heads, d );
	  d += 2;
       } else if ( express_heads[e] ) {
	  write_message( m, express_news_url, express_source_text, express_urls, express_heads, e );
	  e += 2;
       } 
   }

if (messages.length>1) {
  i=2
  if ( i >= messages.length )
    i = 0;
}
else
  i=0

function move1(whichlayer){
  tlayer=eval(whichlayer)
  if (tlayer.top>0&&tlayer.top<=dtop){
    tlayer.top=0
    setTimeout("move1(tlayer)",toppause)
    setTimeout("move2(document.main.document.second)",toppause)
    return
  }
  if (tlayer.top>=tlayer.document.height*-1){
    tlayer.top-=decrement
    setTimeout("move1(tlayer)",minipause)
  } else {
    tlayer.top=scrollerheight
    tlayer.document.write(messages[i])
    tlayer.document.close()
    if (i==messages.length-1)
      i=0
    else
      i++
  }
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=dtop){
tlayer2.top=0
setTimeout("move2(tlayer2)",toppause)
setTimeout("move1(document.main.document.first)",toppause)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=decrement
setTimeout("move2(tlayer2)",minipause)
}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++
}
}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=dtop){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",toppause)
setTimeout("move4(second2)",toppause)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=decrement
setTimeout("move3(tdiv)",minipause)
}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}
}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=dtop){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",toppause)
setTimeout("move3(first2)",toppause)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=decrement
setTimeout("move4(second2)",minipause)
}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++
}}
function startscroll(){
if (document.all){
move3(first2)
second2.style.top=scrollerheight
second2.style.visibility='visible'
}
else if (document.layers){
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=scrollerheight+decrement
document.main.document.second.visibility='show'
}
}
// This line is now in the HTML page to avoid sporadic javascript errors: window.onload=startscroll 
