var mp_Height=300;
var mp_Width=120;
var mp_Bg="#FAF3DE";
var mp_Speed=50;

var mp_outer,mp_inner,mp_elHeight,mp_ref,mp_Interval;
var mp_w3c=(document.getElementById)?true:false;
var mp_ns4=(document.layers)?true:false;
var mp_ie4=(document.all && !mp_w3c)?true:false;
var mp_ie5=(document.all && mp_w3c)?true:false;
var mp_okay=(mp_ie5 || mp_ie4 || (parseFloat(navigator.appVersion)>4.5) );
var txt='';
if(mp_okay){
if(mp_ns4){
txt+='<table cellpadding=0 cellspacing=0 border=0 height='+mp_Height+' width='+mp_Width+'><tr><td>';
txt+='<ilayer name="mp_ref" bgcolor="'+mp_Bg+'" width='+mp_Width+' height='+mp_Height+'></ilayer>';
txt+='</td></tr></table>'
txt+='<layer name="mp_outer" bgcolor="'+mp_Bg+'" visibility="hidden" width='+mp_Width+' height='+mp_Height+'>';
txt+='<layer  name="mp_inner"  width='+(mp_Width-4)+' height='+(mp_Height-4)+' visibility="hidden" left="2" top="2" >'+mp_Cont+'</layer>';
txt+='</layer>';
}else{
txt+='<div id="mp_ref" style="position:relative; width:'+mp_Width+'; height:'+mp_Height+'; background-color:'+mp_Bg+';" ></div>';
txt+='<div id="mp_outer" style="position:absolute; width:'+mp_Width+'; height:'+mp_Height+'; visibility:hidden; background-color:'+mp_Bg+'; overflow:hidden" >';
txt+='<div id="mp_inner"  style="position:absolute; visibility:visible; left:2px; top:2px; width:'+(mp_Width-4)+'; overflow:hidden; cursor:default;">'+mp_Cont+'</div>';
txt+='</div>';
}
document.write(txt);
}else{
document.write(mp_Cont);
}

function getElHeight(el){
if(mp_ns4)return (el.document.height)? el.document.height : el.clip.bottom-el.clip.top;
else if(mp_ie4||mp_ie5)return (el.style.height)? el.style.height : el.clientHeight;
else return (el.style.height)? parseInt(el.style.height):parseInt(el.offsetHeight);
}

function getPageLeft(el){
var x;
if(mp_ns4)return el.pageX;
if(mp_ie4||mp_w3c){
x = 0;
while(el.offsetParent!=null){
x+=el.offsetLeft;
el=el.offsetParent;
}
x+=el.offsetLeft;
return x;
}}

function getPageTop(el){
var y;
if(mp_ns4)return el.pageY;
if(mp_ie4||mp_w3c){
y=0;
while(el.offsetParent!=null){
y+=el.offsetTop;
el=el.offsetParent;
}
y+=el.offsetTop;
return y;
}}

function scrollbox(){
if('mp_Pause==false'){
if(mp_ns4){
mp_inner.top-=1;
if(mp_inner.top<2-mp_elHeight)mp_inner.top=mp_Height+2;
}else{
mp_inner.style.top=parseInt(mp_inner.style.top)-1+'px';
if(parseInt(mp_inner.style.top)<2-mp_elHeight)mp_inner.style.top=mp_Height+2+'px';
}
}
}

window.onresize=function(){
if(mp_okay){
if(mp_ns4)setTimeout('history.go(0)', 400);
else{
mp_outer.style.left=getPageLeft(mp_ref)+'px';
mp_outer.style.top=getPageTop(mp_ref)+'px';
}}}

window.onload=function(){
if(mp_okay){
mp_outer=(mp_ns4)?document.layers['mp_outer']:(mp_ie4)?document.all['mp_outer']:document.getElementById('mp_outer');
mp_inner=(mp_ns4)?mp_outer.document.layers['mp_inner']:(mp_ie4)?document.all['mp_inner']:document.getElementById('mp_inner');
mp_ref=(mp_ns4)?document.layers['mp_ref']:(mp_ie4)?document.all['mp_ref']:document.getElementById('mp_ref');
mp_elHeight=getElHeight(mp_inner);
if(mp_ns4){
mp_outer.moveTo(getPageLeft(mp_ref),getPageTop(mp_ref));
mp_outer.clip.width=mp_Width;
mp_outer.clip.height=mp_Height;
mp_inner.top-=2;
mp_inner.clip.width=mp_Width-4;
mp_inner.clip.height=mp_elHeight;
mp_outer.visibility="show";
mp_inner.visibility="show";
}else{
mp_outer.style.left=getPageLeft(mp_ref)+'px';
mp_outer.style.top=getPageTop(mp_ref)+'px';
mp_inner.style.top='0px';
mp_inner.style.clip='rect(0px, '+(mp_Width-4)+'px, '+(mp_elHeight)+'px, 0px)';
mp_outer.style.visibility="visible";
}
setTimeout('mp_Interval=setInterval(\'scrollbox()\',mp_Speed)',10000);
}}

function mp_Pause(){
  clearInterval(mp_Interval);
}

function mp_unPause(){
  mp_Interval=setInterval('scrollbox()',mp_Speed)
}
