
info=[

['<b>SPECIAL OFFERS</b><div>'+getCalendarDate()+'<br />Discount prices on all popular Medications</div>'],
['<div>Save up to 80%<br />Worldwide shipping<br />Free doctor consultation</div>']
]


function getCalendarDate()
{
   var months = new Array(13);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var dateString = monthname +
                    ' ' +
                    monthday +
                    ', ' +
                    year;
   return dateString;
}

step=1
nextMessage=1

function initTSV1(){
tsvDisplay=document.getElementById("tsvcont")

for(var i=0;i<2;i++){
newDiv=document.createElement("DIV")
newDiv.setAttribute("id","tsvdiv"+i)
newDiv.onmouseover=function(){clearTimeout(timer)}
newDiv.onmouseout=function(){scrollTSV1()}
tsvDisplay.appendChild(newDiv)
}

tsvDv0=document.getElementById("tsvdiv0")
tsvDv1=document.getElementById("tsvdiv1")
tsvDv0.innerHTML=info[0]
tsvDv1.innerHTML=info[1]

tsvDv0.style.top=tsvDisplay.offsetHeight+"px"
tsvDv1.style.top=tsvDisplay.offsetHeight+tsvDv0.offsetHeight+"px"

scrollTSV1()
}

function scrollTSV1(){
tsvDv0Pos=parseInt(tsvDv0.style.top)
tsvDv1Pos=parseInt(tsvDv1.style.top)

tsvDv0Pos-=step
tsvDv1Pos-=step

tsvDv0.style.top=tsvDv0Pos+"px"
tsvDv1.style.top=tsvDv1Pos+"px"

if(tsvDv0Pos< -tsvDv0.offsetHeight){

nextMessage++
if(nextMessage==info.length){nextMessage=0}
tsvDv0.innerHTML=info[nextMessage]

if(tsvDv1.offsetHeight<tsvDisplay.offsetHeight){

if(tsvDv1.offsetTop<tsvDisplay.offsetHeight-tsvDv1.offsetHeight){
tsvDv0.style.top=tsvDisplay.offsetHeight+"px"
}
else{
tsvDv0.style.top=tsvDv1.offsetTop+tsvDv1.offsetHeight+"px"
}

}
else{
tsvDv0.style.top=tsvDv1.offsetTop+tsvDv1.offsetHeight+"px"
}

}

if(tsvDv1Pos< -tsvDv1.offsetHeight){

nextMessage++
if(nextMessage==info.length){nextMessage=0}
tsvDv1.innerHTML=info[nextMessage]

if(tsvDv0.offsetHeight<tsvDisplay.offsetHeight){

if(tsvDv0.offsetTop<tsvDisplay.offsetHeight-tsvDv0.offsetHeight){
tsvDv1.style.top=tsvDisplay.offsetHeight+"px"
}
else{
tsvDv1.style.top=tsvDv0.offsetTop+tsvDv0.offsetHeight+"px"
}

}
else{
tsvDv1.style.top= tsvDv0.offsetTop+tsvDv0.offsetHeight+"px"
}

}

timer=setTimeout("scrollTSV1()",50)

}
