﻿    ///////Do not edit pass this line///////////////////////
    var ie=document.all
    var dom=document.getElementById
    var timerTM;
    var indexDiv=1;
    if (messagesTM.length>2)
        messIndex=2
    else
        messIndex=0
        
     var tdivTM,tdivTM2,lastFunctionTM;
    function moveTM(whichdiv, whichdiv2){
        
        tdivTM=eval(whichdiv)
        tdivTM2=eval(whichdiv2)
        var condition1 = (parseInt(tdivTM.style.left)>=tdivTM.offsetWidth*-1)
        var condition2 = (parseInt(tdivTM.style.left)-parseInt(scrollerwidthTM)+80>=tdivTM.offsetWidth*-1)
        var condition = (tdivTM.offsetWidth>=parseInt(scrollerwidthTM) ? condition2 : condition1)
        if (condition){
            tdivTM.style.left=parseInt(tdivTM.style.left)-3+"px"
            if(tdivTM2){
                if (parseInt(tdivTM2.style.left)>=tdivTM2.offsetWidth*-1){
                    tdivTM2.style.left=parseInt(tdivTM2.style.left)-3+"px"
                    timerTM = setTimeout("moveTM(tdivTM,tdivTM2)",scrollerdelayTM)
                    lastFunctionTM = "moveTM(tdivTM,tdivTM2)";
                }else{
                    tdivTM2.style.left=scrollerwidthTM
                    timerTM = setTimeout("moveTM(tdivTM)",scrollerdelayTM)
                    lastFunctionTM = "moveTM(tdivTM)";
                }
                
                
            }else{
                timerTM = setTimeout("moveTM(tdivTM)",scrollerdelayTM)
                lastFunctionTM = "moveTM(tdivTM)";
            }
           
        }
        else{
            if(tdivTM==firstTM_obj){
               timerTM = setTimeout("moveTM(secondTM_obj,firstTM_obj)",scrollerdelayTM)
               lastFunctionTM = "moveTM(secondTM_obj,firstTM_obj)";
               
            }else{
               timerTM = setTimeout("moveTM(firstTM_obj,secondTM_obj)",scrollerdelayTM)
               lastFunctionTM = "moveTM(firstTM_obj,secondTM_obj)";
            }
        }
    }
    function startscrollTM(){
        firstTM_obj=ie? firstTM : document.getElementById("firstTM")
        secondTM_obj=ie? secondTM : document.getElementById("secondTM")
        if(lastFunctionTM){
            eval(lastFunctionTM);
        }
        else{
            moveTM(firstTM_obj)
            lastFunctionTM = "moveTM(firstTM_obj)";
       }
            
    }
    function pausescrollTM(){
        clearTimeout(timerTM);
        redrawTM()
    }
    function redrawTM(){
        var mainDiv = ie? main2TM : document.getElementById("main2TM")
        mainDiv.style.position = "absolute"
        mainDiv.style.position = "relative"

    }
    if (ie||dom){
        document.writeln('<div id="main2TM" style="text-align:left;position:relative;width:'+scrollerwidthTM+';height:'+scrollerheightTM+';overflow:hidden;background-color:'+scrollerbgcolorTM+' ;background-image:url('+scrollerbackgroundTM+'); border:'+scrollerborderTM+'">')
        document.writeln('<div style="position:absolute;width:'+scrollerwidthTM+';height:'+scrollerheightTM+';clip:rect(0 '+scrollerwidthTM+' '+scrollerheightTM+' 0);left:0px;top:0px">')
        document.writeln('<div id="firstTM" style="position:absolute;width:auto;left:'+scrollerwidthTM+';top:1px;white-space:nowrap;" onmouseover="pausescrollTM();" onmouseout="startscrollTM();">')
        document.write(unescape(messagesTM[0]))
        document.writeln('</div>')
        document.writeln('<div id="secondTM" style="position:absolute;width:auto;left:'+scrollerwidthTM+';top:1px;white-space:nowrap;" onmouseover="pausescrollTM();" onmouseout="startscrollTM();">')
       document.write(unescape(messagesTM[0]))
        document.writeln('</div>')
        document.writeln('</div>')
        document.writeln('</div>')
    }
    
    if (window.addEventListener){
        window.addEventListener("load", startscrollTM, false)
        window.addEventListener("resize", redrawTM, false)
    }else if (window.attachEvent){
        window.attachEvent("onload", startscrollTM)
        window.attachEvent("onresize", redrawTM)
    }else if (ie||dom){
        window.onresize=redrawTM
        window.onload=startscrollTM
        
    }

