

// **************************************************************
// Author : ridwanK (mail@ridwank.com) --- LEADING EDGE ALLIANCE
// CUSTOMIZATIONS BY MONIR MAMOUN, NATEX INTERACTIVE
// This script originally made by ridwank
// For other downloadble stuff please visit http://ridwank.com
// IT IS FREE, BUT PLEASE DO NOT REMOVE THIS COMMENT TAG
// **************************************************************

// *** D E F I N E   V A R I A B L E S ***

// PUT YOUR CONTENT FILE
var filecontent = "scroll_template.htm"; // put your content file
// SCROLLER OUTER BORDER IN PIXEL
var scrollborder = "0px";
var scrollbordercolor = "#CCCCCC";
// SCROLLBOX SIZE IN PIXEL:[999]px OR PERSENTAGE:[1-100]%
///changenote monir changed scrollwidth from 294 to 286, 40x6 logos plus left and right arrows
var scrollwidth = "697px";
var scrollheight = "60px";
// FILE NAVIGATION IMAGES (left & right) ATTRIBUTES
var imgleft = "images/arrow_left.gif";
var imgright = "images/arrow_right.gif";
var imgwidth = "23";
var imgheight = "60";
var globalX = 0;
// next variable is number of icons. Remember to count 
// the 12 that repeat at the end as separate icons.
//****************update*****************************
// number of icons isn't correct name for this anymore. Icons are no longer set at 50px wide.
// so math is off. Have just been guessing when adding a new icon. If icon is 90px wide add 2
// to number_of_icons
var number_of_icons = 249;

// *** S T A R T   S C R I P T ***
var waktu=0;
var pauseinitializer=0;

function pausecomp(millis)
{
	var date = new Date();
	var curDate = null;

	do { curDate = new Date(); }
	while(curDate-date < millis);
}

function kiri(){
	isi.scrollBy(-1,0);waktu=setTimeout('kiri()',10);
}
function kanan(){
	isi.scrollBy(1,0);waktu=setTimeout('kanan()',10);
	globalX=globalX+1;
	// there is a -12 in the next function because the last 12 icons
	// are repeated and we automatically reset once they have scrolled by;
	// resetting the scrollTo function back to 0 at that point creates
	// a seamless transition back to the beginning of the scroll.
	// Monir was here and was proud of this little tweak. 10/21/06
	if (globalX == 54*(number_of_icons-12)) 
		{
		globalX=0;
		 isi.scrollTo(0,0);
		}

}

function selesai() {
    clearTimeout(waktu);
}
function boxanak(){
	var boxwidth=
	document.writeln('<iframe name="isi" src="'+filecontent+'" ');
	document.writeln('width=100% height="'+scrollheight+'" Marginwidth=0 Marginheight=0 ');
	document.writeln('Hspace=0 Vspace=0 Frameborder=0 Scrolling=No></iframe>');
}

function playscroll(){
	
	document.writeln('<table border=0 cellspacing=0 cellpadding=0 ');
	document.writeln('style="border:'+scrollborder+' solid '+scrollbordercolor+'; width:'+scrollwidth+' ;height:'+scrollheight+' ">');
	document.writeln('<tr><td width="'+imgwidth+'" valign=top><img class="klik" style="cursor:hand" ');
	document.writeln('src="'+ imgleft +'" border="0" width="'+ imgwidth +'" height="'+ imgheight +'" ');
	document.writeln('onmouseover="kiri()" onmouseout="selesai()"></td>');
	document.writeln('<td valign=top>');
	boxanak();
	document.writeln('</td>');
	document.writeln('<td width="'+imgwidth+'" valign=top><img class="klik" style="cursor:hand"');
	document.writeln('src="'+ imgright +'" border="0" width="'+ imgwidth +'" height="'+ imgheight +'" ');
	document.writeln('onmouseover="kanan()" onmouseout="selesai()"></td>');
	document.writeln('</tr></table>');
	
	waktu=setTimeout('kanan()',3000);

}

playscroll();



