//---------------------------------------------------------------------------------------------------------------------------
//SCROLLER.JS
//---------------------------------------------------------------------------------------------------------------------------

//TESQscape - FINE's JavaScript Library for External Link (called from any HTML page)
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//

//---------------------------------------------------------------------------------------------------------------------------

//V-SCROLLUP PAGE
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE: input type="button" onclick="scrollup();"
function scrollup()
{
for (n=1; n<=10000; n++)
{
parent.scroll(1,n);
}
return true;
}
//---------------------------------------------------------------------------------------------------------------------------

//V-SCROLLDOWN PAGE
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE: input type="button" onclick="scrolldn();"
function scrolldn()
{
for (n=10000; n>=1; n--)
{
parent.scroll(1,n);
}
return true;
}
//---------------------------------------------------------------------------------------------------------------------------

//H-SCROLLING TEXT AT STATUS BAR - METHOD 1
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE:
//<BODY onload="scrollstatus();">
var msg=". . . Welcome to my site and be my guest . . .";
function scrollstatus()
{
window.status=msg;
msg=msg.substr(1,(msg.length-1)) + msg.substr(0,1);
//This editable setting dictates how quickly each character moves across the scroll box (ex. 75=.075 seconds).
settimeout("scrollstatus();",150);
}
//---------------------------------------------------------------------------------------------------------------------------

//H-SCROLLING TEXT IN A TEXT BOX
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE:
//<BODY onload="scrolltextbox(this.scrollform.scrolltext);"
//<form name="scrollform" onsubmit="return false;" style="background-color: rgb(0,0,0); color: rgb(255,0,0)">
//<input type="text" name="scrolltext" size="100" value style="background-color: rgb(0,0,0); color: rgb(255,0,0); font-family: Arial, Verdana; font-size: 10pt; border: medium none rgb(0,0,0)">
//
//<script language="javascript" type="text/javascript">
//
//var textboxmsg="";
var textboxmsg="TESQscape - internet presence provider : web design and development, domain name registration, website allocation, search engine submission, web traffic generation, web promotion, website maintenance, etc . . .";
function scrolltextbox(callpage)
{
var page;
page=callpage;
page.value=textboxmsg;
textboxmsg=textboxmsg.substring(1,textboxmsg.length) + textboxmsg.substring(0,1);
// This editable setting dictates how quickly each character moves across the scroll box (ex. 75=.075 seconds).
setTimeout("scrolltextbox(this.scrollform.scrolltext)",360);
}
//--></script>
//---------------------------------------------------------------------------------------------------------------------------

//H-SCROLLING TEXT IN A TEXT BOX AND IN STATUS BAR
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE:
//<BODY onload="scrollbox(this.scrollform.scrolltext);"
//<form name="scrollform" onsubmit="return false;" style="background-color: rgb(0,0,0); color: rgb(255,0,0)">
//<input type="text" name="scrolltext" size="110" value style="background-color: rgb(0,0,0); color: rgb(255,0,0); font-family: Arial, Verdana; font-size: 10pt; border: medium none rgb(0,0,0)">
//
//var winmsg_itspro="Welcome to our site and be our guest . . . ";
//var boxmsg_itspro="MEGA MALL BATAM CENTRE . . .";
//
//var winmsg_tesq="Welcome to our site and be our guest . . . ";
//var boxmsg_tesq="MEGA MALL BATAM CENTRE . . . ";
//
function scrollbox(callpage)
{
var page;
page=callpage;
window.status=winmsg;
page.value=boxmsg;
winmsg=winmsg.substring(1,winmsg.length) + winmsg.substring(0,1);
boxmsg=boxmsg.substring(1,boxmsg.length) + boxmsg.substring(0,1);
// This editable setting dictates how quickly each character moves across the scroll box (ex. 60=.060 seconds).
setTimeout("scrollbox(this.scrollform.scrolltext)",360);
}
//---------------------------------------------------------------------------------------------------------------------------

//H-SCROLLING TEXT AT STATUS BAR - METHOD 2 : USING SEED
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE:
//<BODY onload="scrollit_r21(seed);">
function scrollit_r2l(seed)
{
var box="welcome to our site";
var out = " ";
var c = 1;
if (seed > 100)
{
seed--;
var cmd="scrollit_r2l(" + seed + ")";
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 100 && seed > 0)
{
for (c=0 ; c < seed ; c++)
{
out+=" ";
}
out+=box;
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else if (seed <= 0)
{
if (-seed < box.length)
{
out+=box.substring(-seed,box.length);
seed--;
var cmd="scrollit_r2l(" + seed + ")";
window.status=out;
timerTwo=window.setTimeout(cmd,100);
}
else
{
window.status=" ";
timerTwo=window.setTimeout("scrollit_r2l(100)",75);
}
}
}
//---------------------------------------------------------------------------------------------------------------------------

//SHOOTING TEXT AT STATUS BAR
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE:
//<BODY onload="timeout=window.settimeout('shootstatbar()',500);">
//<script language="JavaScript">
//<!--
// You may edit the message below.
var startMsg = "MEGA MALL ... BATAM ... CENTRE ... ";
var str  = "";
var msg  = "";
var leftMsg = "";
function shootstatbar()
{
if (msg == "")
{
str = " ";
msg = startMsg;
leftMsg = "";
}

if (str.length == 1)
{
while (msg.substring(0, 1) == " ")
{
leftMsg = leftMsg + str;
str = msg.substring(0, 1);
msg = msg.substring(1, msg.length);
}

leftMsg = leftMsg + str;
str = msg.substring(0, 1);
msg = msg.substring(1, msg.length);

for (var ii = 0; ii < 120; ii++)
{
str = " " + str;
}
}
else
str = str.substring(10, str.length);

window.status = leftMsg + str;
// This editable value (1000 = 1 second)
// corresponds to the speed of the shooting message.
timeout = window.settimeout('shootstatbar()',500);
}
// -->
//</script>
//---------------------------------------------------------------------------------------------------------------------------

//V-SCROLL TEXT ANYWHERE
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE:
//<body onload="startscroll();>
//<!-----V-SCROLL TEXT BEGIN------>
/**
<table><tr><td>
<ilayer id="main" width="&amp;{scrollerwidth};" height="&amp;{scrollerheight};" bgcolor="&amp;{scrollerbgcolor};" background="&amp;{scrollerbackground};" visibility="hide">
<layer id="first" left="0" top="1" width="&amp;{scrollerwidth};">
<script language="javascript1.2">
set_vs_size([column width],[row height]);
check_vs_msg();
</script>
<ilayer id="main" width="&amp;{scrollerwidth};" height="&amp;{scrollerheight};" bgColor="&amp;{scrollerbgcolor};" background="&amp;{scrollerbackground};" visibility="hide">
<layer id="first" left="0" top="1" width="&amp;{scrollerwidth};">
<script language="javascript1.2">
write_vs_msg_init();
</script>
</layer>
<layer id="second" left="0" top="0" width="&amp;{scrollerwidth};" visibility="hide">
<script language="javascript1.2">
write_vs_msg_first();
</script>
</layer>
</ilayer>
<script language="javascript1.2">
write_vs_msg_next();</script>
</td></tr></table>
**/
//<!-----V-SCROLL TEXT END-------->

//<script language="javascript1.2">

/*
Pausing updown message scroller- 
Last updated: 99/07/05 (Bugs fixed, ability to specify background image for scroller)
*/

//configure the below five variables to change the style of the scroller
var scrollerwidth;
var scrollerheight;
//set below to '' if you don't wish to use a background color
//var scrollerbgcolor='FFFFFF'
var scrollerbgcolor=''
//set below to '' if you don't wish to use a background image
//var scrollerbackground='scrollerback.gif'
var scrollerbackground=''

//configure the below variable to change the contents of the scroller
var vsmsg=new Array();

vsmsg[0]='<font face="Arial"><a href="index.htm">MEGA MALL BATAM CENTRE</a></font>';
vsmsg[1]='<font face="Arial"><a href="index.htm">Gateway to global market</a></font>';
vsmsg[2]='<font face="Arial"><a href="index.htm">Pathway to world global business</a></font>';
vsmsg[3]='<font face="Arial"><a href="index.htm">Located in the golden triangle</a></font>';
vsmsg[4]='<font face="Arial"><a href="index.htm">Your business partner to global market</a></font>';

///////Do not edit pass this line///////////////////////

function set_vs_size(i_width,i_height)
{
scrollerwidth = i_width;
scrollerheight = i_height;
}

function check_vs_msg()
{
if (vsmsg.length>1)
i=2
else
i=0
}

function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",3000)
setTimeout("move2(document.main.document.second)",3000)
return
}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",100)
}
else{
tlayer.top=scrollerheight
tlayer.document.write(vsmsg[i])
tlayer.document.close()
if (i==vsmsg.length-1)
i=0
else
i++
}
}

function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",3000)
setTimeout("move1(document.main.document.first)",3000)
return
}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",100)
}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(vsmsg[i])
tlayer2.document.close()
if (i==vsmsg.length-1)
i=0
else
i++
}
}

function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",3000)
setTimeout("move4(second2)",3000)
return
}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("move3(tdiv)",100)
}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=vsmsg[i]
if (i==vsmsg.length-1)
i=0
else
i++
}
}

function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",3000)
setTimeout("move3(first2)",3000)
return
}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("move4(second2)",100)
}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=vsmsg[i]
if (i==vsmsg.length-1)
i=0
else
i++
}
}

function startscroll()
{
if (document.all)
{
move3(first2)
second2.style.top=scrollerheight
second2.style.visibility='visible'
}
else if (document.layers)
{
document.main.visibility='show'
move1(document.main.document.first)
document.main.document.second.top=scrollerheight+5
document.main.document.second.visibility='show'
}
}

//window.onload=startscroll
//</script>

function write_vs_msg_init()
{
if (document.layers) document.write(vsmsg[0])
}

function write_vs_msg_first()
{
if (document.layers) document.write(vsmsg[1])
}

function write_vs_msg_next()
{
if (document.all)
{
document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')
document.write(vsmsg[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0;visibility:hidden">')
document.write(vsmsg[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</span>')
}
}
//---------------------------------------------------------------------------------------------------------------------------

//MOUSE TRAIL TEXT ANYWHERE
//Copyright(C) 2000-2008 - TESQscape - FINE. All intellectual property rights world wide reserved.
//USAGE:
//<body style="width: 100%; overflow-x: hidden; overflow-y: scroll" onload="makesnake();">

//<!--- part 1 of 2 mouse trail start ------------>
//<script>

var x,y
var step=20
var flag=0

var xpos=new Array()
var ypos=new Array()

// Your Message goes here. Important: Note the space at the end of the sentence!!!

var message="www.megamall-batamcentre.com . . . "

function mousetrail1()
{

message=message.split("")
for (z=0;z<=message.length-1;z++)
{
      xpos=new Array()
	xpos[z]=-50
}
for (z=0;z<=message.length-1;z++)
{
      ypos=new Array()
	ypos[z]=-50
}
}

function handlerMM(e)
{
	x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
	y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
	flag=1
}

function makesnake()
{

	if (flag==1 && document.all)
	{
    	for (z=message.length-1; z>=1; z--)
    	{
   			xpos[z]=xpos[z-1]+step
			ypos[z]=ypos[z-1]
    	}
		xpos[0]=x+step
		ypos[0]=y
		for (z=0; z<message.length-1; z++)
		{
    		var thisspan = eval("span"+(z)+".style")
    		thisspan.posLeft=xpos[z]
			thisspan.posTop=ypos[z]
    	}
	}
	else if (flag==1 && document.layers) 
	{
    	for (z=message.length-1; z>=1; z--) 
    	{
   			xpos[z]=xpos[z-1]+step
			ypos[z]=ypos[z-1]
    	}
		xpos[0]=x+step
		ypos[0]=y
		for (z=0; z<message.length-1; z++) 
		{
    		var thisspan = eval("document.span"+z)
    		thisspan.left=xpos[z]
			thisspan.top=ypos[z]
    	}
	}
		var timer=setTimeout("makesnake()",30)

}

//      </script>
//<!--- part 1 of 2 mouse trail end ------------->
//<!------------------------------------------------------->
//<!--- part 2 of 2 mouse trail start ------------>
//<script>

function mousetrail2()
{

for (z=0;z<=message.length-1;z++) 
{
    document.write("<span id='span"+z+"' class='spanstyle'>")
    document.write(message[z])
    document.write("</span>")
}

if (document.layers)
{
	document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;

}
//</script>
//<!--- part 2 of 2 mouse trail end ------------->

