/* USE WORDWRAP AND MAXIMIZE THE WINDOW TO SEE THIS FILE
========================================
 V-NewsTicker v2.2
 License : Freeware (Enjoy it!)
 (c)2003 VASIL DINKOV- PLOVDIV, BULGARIA
========================================
 For IE4+, NS4+, Opera5+, Konqueror3.1+
========================================
 Get the NewsTicker script at:
 http://www.smartmenus.org/other.php
 and don't wait to get the Great SmartMenus script at:
 http://www.smartmenus.org
 LEAVE THESE NOTES PLEASE - delete the comments if you want */

// BUG in Opera:
// If you want to be able to control the body margins
// put the script right after the BODY tag, not in the HEAD!!!

// === 1 === FONT, COLORS, EXTRAS...
w_font='verdana,arial,sans-serif';
w_fontSize='10px';
w_fontSizeNS4='11px';
w_fontWeight='bold';
w_fontColor='#3973AC';
w_textDecoration='none';
w_fontColorHover='#3973AC';//		| won't work
w_textDecorationHover='underline';//	| in Netscape4
w_bgColor='transparent';
//set [='transparent'] for transparent
// set [='url(image_source)'] for image
w_top=0;//	|
w_left=0;//	| defining
w_width=150;//	| the box
w_height=120;//	|
w_paddingTop=2;
w_paddingLeft=2;
w_position='relative';// absolute/relative
w_timeout=4500;//1000 = 1 second
w_slideSpeed=30;
w_slideDirection=0;//0=down-up;1=up-down
w_pauseOnMouseOver=true;
// v2.2+ new below
w_slideStep=1;//pixels
w_textAlign='left';// left/center/right
w_textVAlign='middle';// top/middle/bottom - won't work in Netscape4

// === 2 === THE CONTENT - ['href','text','target']
// Use '' for href to have no link item


function w_fisherYates ( myArray ) {
  var i = myArray.length;
  if ( i == 0 ) return false;
  while ( --i ) {
     var j = Math.floor( Math.random() * ( i + 1 ) );
     var tempi = myArray[i];
     var tempj = myArray[j];
     myArray[i] = tempj;
     myArray[j] = tempi;
   }
}

w_fisherYates(w_content);
// ===

w_ua=navigator.userAgent;

w_nS4=document.layers?1:0;

w_iE=document.all&&!window.innerWidth&&w_ua.indexOf("MSIE")!=-1?1:0;

w_oP=w_ua.indexOf("Opera")!=-1&&document.clear?1:0;

w_oP7=w_oP&&document.appendChild?1:0;

w_oP4=w_ua.indexOf("Opera")!=-1&&!document.clear;

w_kN=w_ua.indexOf("Konqueror")!=-1&&parseFloat(w_ua.substring(w_ua.indexOf("Konqueror/")+10))<3.1?1:0;

w_count=w_content.length;w_cur=1;

w_cl=0;w_d=w_slideDirection?-1:1;

w_TIM=0;

w_fontSize2=w_nS4&&navigator.platform.toLowerCase().indexOf("win")!=-1?w_fontSizeNS4:w_fontSize;

w_canPause=0;

function w_getOS(a){
         return w_iE?document.all[a].style:w_nS4?document.layers["w_container"].document.layers[a]:document.getElementById(a).style
};

function w_start(){
         var o,px;
         o=w_getOS("w_1");
         px=w_oP&&!w_oP7||w_nS4?0:"px";
         if(parseInt(o.top)==w_paddingTop){
                w_canPause=1;
                if(w_count>1)w_TIM=setTimeout("w_canPause=0;w_slide()",w_timeout);
                        return
        }
        o.top=(parseInt(o.top)-w_slideStep*w_d)*w_d>w_paddingTop*w_d?parseInt(o.top)-w_slideStep*w_d+px:w_paddingTop+px;
                
        if(w_oP&&o.visibility.toLowerCase()!="visible")
                o.visibility="visible";
        setTimeout("w_start()",w_slideSpeed)
};

function w_slide()
{
 var o,o2,px;
 o=w_getOS("w_"+w_cur);
 o2=w_getOS("w_"+(w_cur<w_count?w_cur+1:1));
 px=w_oP&&!w_oP7||w_nS4?0:"px";
 
 if(parseInt(o2.top)==w_paddingTop){
        if(w_oP)
                o.visibility="hidden";
        o.top=w_height*w_d+px;
        w_cur=w_cur<w_count?w_cur+1:1;
        w_canPause=1;w_TIM=setTimeout("w_canPause=0;w_slide()",w_timeout);
        return
  }

  if(w_oP&&o2.visibility.toLowerCase()!="visible")
        o2.visibility="visible";

  if((parseInt(o2.top)-w_slideStep*w_d)*w_d>w_paddingTop*w_d){
        o.top=parseInt(o.top)-w_slideStep*w_d+px;o2.top=parseInt(o2.top)-w_slideStep*w_d+px
  }else{
       	o.top=-w_height*w_d+px;
        o2.top=w_paddingTop+px
  }
  setTimeout("w_slide()",w_slideSpeed)
};

if(w_nS4||w_iE||w_oP||document.getElementById&&!w_kN&&!w_oP4){
        document.write("<style>.vnewsticker,a.vnewsticker{font-family:"+w_font+";font-size:"+w_fontSize2+";color:"+w_fontColor+";text-decoration:"+w_textDecoration+";font-weight:"+w_fontWeight+"}a.vnewsticker:hover{font-family:"+w_font+";font-size:"+w_fontSize2+";color:"+w_fontColorHover+";text-decoration:"+w_textDecorationHover+"}</style>");

        w_temp="<div "+(w_nS4?"name":"id")+"=w_container style='position:"+w_position+";top:"+w_top+"px;left:"+w_left+"px;width:"+w_width+"px;height:"+w_height+"px;background:"+w_bgColor+";layer-background"+(w_bgColor.indexOf("url(")==0?"-image":"-color")+":"+w_bgColor+";clip:rect(0,"+w_width+","+w_height+",0);overflow:hidden'>"+(w_iE?"<div style='position:absolute;top:0px;left:0px;width:100%;height:100%;clip:rect(0,"+w_width+","+w_height+",0)'>":"");
        for(w_i=0;w_i<w_count;w_i++)
                w_temp+="<div "+(w_nS4?"name":"id")+"=w_"+(w_i+1)+" style='position:absolute;top:"+(w_height*w_d)+"px;left:"+w_paddingLeft+"px;width:"+(w_width-w_paddingLeft*2)+"px;height:"+(w_height-w_paddingTop*2)+"px;clip:rect(0,"+(w_width-w_paddingLeft*2)+","+(w_height-w_paddingTop*2)+",0);overflow:hidden"+(w_oP?";visibility:hidden":"")+";text-align:"+w_textAlign+"' class=vnewsticker>" + (!w_nS4?"<table width="+(w_width-w_paddingLeft*2)+" height="+(w_height-w_paddingTop*2)+" cellpadding=0 cellspacing=0 border=0><tr><td width="+(w_width-w_paddingLeft*2)+" height="+(w_height-w_paddingTop*2)+" align="+w_textAlign+" valign="+w_textVAlign+" class=vnewsticker>":"")+(w_content[w_i][0]!=""?"<a href='"+w_content[w_i][0]+"' target='"+w_content[w_i][2]+"' class=vnewsticker"+(w_pauseOnMouseOver?" onmouseover='if(w_canPause&&w_count>1){clearTimeout(w_TIM);w_cl=1}' onmouseout='if(w_canPause&&w_count>1&&w_cl)w_TIM=setTimeout(\"w_canPause=0;w_slide();w_cl=0\","+w_timeout+")'":"")+">":"<span"+(w_pauseOnMouseOver?" onmouseover='if(w_canPause&&w_count>1){clearTimeout(w_TIM);w_cl=1}' onmouseout='if(w_canPause&&w_count>1&&w_cl)w_TIM=setTimeout(\"w_canPause=0;w_slide();w_cl=0\","+w_timeout+")'":"")+">")+w_content[w_i][1]+(w_content[w_i][0]!=""?"</a>":"</span>")+(!w_nS4?"</td></tr></table>":"")+"</div>";w_temp+=(w_iE?"</div>":"")+"</div>";document.write(w_temp);setTimeout("w_start()",0);

        if(w_nS4)onresize=function(){location.reload()}
}

