No replies
shailendra
Offline
newbie
Last seen: 13 years 13 weeks ago
Joined: 2008-10-29
Posts: 1
Points: 0

Untitled Page

var browser=navigator.appName;
var b_version=navigator.appVersion;
var version=parseFloat(b_version);document.write("Browser name: "+ browser);
document.write("Browser version: "+ version);

iens6=document.all||document.getElementById;
ns4=document.all||document.getElementById;

var scrollspeed = 40;
v_font_event='Verdana, Arial, Helvetica, sans-serif';
v_fontSize_event='11px';
v_fontSize2_event='12px';
v_fontWeight_event='normal';
v_fontColor_event='#333';
v_textDecoration_event='none';
v_fontColorHover_event='#ff0000';// | won't work
v_textDecorationHover_event='underline';// | in Netscape4
v_bgColor_event='url(bg.jpg)';
v_bgColor='';

document.write(".vnewsticker,a.vnewsticker{font-family:"+v_font_event+";font-size:"+v_fontSize2_event+";color:"+v_fontColor_event+";text-decoration:"+v_textDecoration_event+";font-weight:"+v_fontWeight_event+"}a.vnewsticker:hover{font-family:"+v_font_event+";font-size:"+v_fontSize2_event+";color:"+v_fontColorHover_event+";text-decoration:"+v_textDecorationHover_event+"}");
scroller="

";
scroller+="";
scroller+="";
scroller+="";
scroller+="";

scroller+="";
scroller+="";
scroller+='';
scroller+='';
scroller+='';

scroller+='';
if (iens6){
scroller+='

';
scroller+='
';
}
else
{
scroller+='';
scroller+='';
}
scroller+='

';
//scroller+=Me.ScrollerContent;
document.write(scroller);
var step=1
var speed=25
if (iens6){
document.write("

");
var contentobj=document.getElementById? document.getElementById("content_news") : document.all.content_news
var contentheight=contentobj.offsetHeight
if (document.getElementById&&!document.all){
step=5

}
}
else if(navigator.appname="Netscape"){
document.write("");
var contentobj=document.nscontainer.document.nscontent
var contentheight=contentobj.clip.height
alert("sbs");

}

function runscroller() {
if(window.scrolltimer){
clearTimeout(scrolltimer)
}

if(iens6&&parseInt(contentobj.style.top)>=(contentheight*(-1)))
{
contentobj.style.top=parseInt(contentobj.style.top)-step
}
else if(iens6&&parseInt(contentobj.style.top)<(contentheight*(-1)))
{
contentobj.style.top=0;
}

if(ns4&&parseInt(contentobj.top)>=(contentheight*(-1)))
{
//alert(contentobj.top);
contentobj.top=parseInt(contentobj.top)-step
}
else if(ns4&&parseInt(contentobj.top)<(contentheight*(-1)))
{
contentobj.top=0;
}

scrolltimer = setTimeout("runscroller()",60)

}

function scrolldown() {
if(window.scrolltimer){
clearTimeout(scrolltimer)
}

if(iens6&&parseInt(contentobj.style.top)>=(contentheight*(-1)))
{
contentobj.style.top=parseInt(contentobj.style.top)-step

}
else if(iens6&&parseInt(contentobj.style.top)<(contentheight*(-1)))
{
contentobj.style.top=0;

}
scrolltimer = setTimeout("scrolldown()",speed)

}

function scrollup() {
if(window.scrolltimer){
clearTimeout(scrolltimer)
}
//alert(contentobj.style.top);
if(iens6&&parseInt(contentobj.style.top)<0){
contentobj.style.top=parseInt(contentobj.style.top)+step;

}else if(iens6&&parseInt(contentobj.style.top)>0){

contentobj.style.top=parseInt(contentobj.style.top)+step;
}

if(ns4&&contentobj.top<0){
contentobj.top+=step
}
else if(ns4&&contentobj.top>0){
contentobj.top=0
}
scrolltimer = setTimeout("scrollup()",25)
}
function stopall() {
if(window.scrolltimer){
clearTimeout(scrolltimer)
}

}
//function stop1() {
// if(window.scrolltimerup){
// clearTimeout(scrolltimerup)
// }
// scrolltimer = setTimeout("runscroller()",25);
//}
//function stop2() {
// if(window.scrolltimerdown){
// clearTimeout(scrolltimerdown)
// }
// scrolltimerdown = setTimeout("scrolldown()",25);
//}
//function shifttotop(){
// stopall()
// if (iens6) {
// contentobj.style.top=0
// }else{
// contentobj.top=0
// }
//}

function getcontent_height(){
if (iens6)
contentheight=contentobj.offsetHeight
}
window.onload=getcontent_height

javascript:runscroller();

Tags: