// CREDITS:
// Simple UpNews Scroller by Urs Dudli and Peter Gehrig
// Copyright (c) 2000 Peter Gehrig and Urs Dudli. All rights reserved.
// Permission given to use the script provided that this notice remains as is.
// Additional scripts can be found at http://www.24fun.ch.
// info@24fun.ch
// 3/15/2000

var message= new Array()

message[0]="Welcome to GP SYSTEM (SINGAPORE) PTE LTD|Your Partner for Precision Cutting Tools & Accessories|No.51, Bukit Batok Crescent, #04-04/05 Unity Centre|Singapore 658077  Tel: (65)6861-2663  Fax: (65)6861-3500"

message[1]="Our Main Business:|Tungsten carbide cutting tools & wear parts, Chucking|tools, Hydraulic vices, Carbide & CBN cutting tools,|ABS modular boring system, Arbors & Tapping holders"

message[2]="Our Main Business:|CNC tool presetting machines, Precision collets,|Fine boring tools, Taps & dies, High speed|electro-spindle milling and grinding heads"

message[3]="GP SYSTEM (MALAYSIA) SDN BHD|No. 19-1, Jalan Kenari 7, Bandar Puchong Jaya|47100 Puchong, Selangor Darul Ehsan, Malaysia|Tel: (603) 80759160   Fax: (603) 80759740"

message[4]="GP SYSTEM (THAILAND) CO. LTD.|77 Soi Charansanitwong 49/1, Bangbumru, Bangplad|Bangkok 10700, Thailand|Tel: (662) 4356820/21   Fax: (662) 4356822"

message[5]="CV GP SYSTEM INDONESIA|JL. Letjen Soeprato, No.160 Komp. Cempaka Putih|Blok A-16, Jakarta 10640, Indonesia|Tel: (021) 4258219"

message[6]="GP SYSTEM (SHANGHAI) CO., LTD.|1st Floor Western of the C Building|No.33 Guangshun Rd., Shanghai, P.R. China|Tel: (8621) 52196081-5   Fax: (8621) 52196091"

message[7]="GP SYSTEM COMPANY LIMITED|Flat 7, Block B, 2/F, Sun Kwai Fong Gardens|Kwai-Chung, Hongkong|Tel: (852) 24286256   Fax: (852) 24289604"

message[8]="GP SYSTEM (KOREA) CORPORATION|Chung-Ang Circulation Complex, Ba-Dong 3308|1258 Kuro-Dong, Kuro-Gu, Seoul, Korea|Tel: (822) 6173363   Fax: (822) 6170096"

message[9]="GP SYSTEM (SOUTH AFRICA) (PTY) LTD|Cor Loper & Winnipeg Ave, Aeroport Industrial Spartan|Kempton Park, PO Box 31, Isando 1600, South Africa|Tel: (011) 3927250   Fax: (011) 3923899"

// The height of the scrollerbox (pixels)
var scrollerheight=70

// The width of the scrollerbox (pixels)
var scrollerwidth=340

// The distance to the left border of the window (pixels)
var scrollerleft=85

// The distance to the top border of the window (pixels)
var scrollertop=7

// The padding between the scrollerbox and the text (pixels)
var scrollerpadding=3

// The width of the scrollerbox-border (pixels)
var backgroundborder=0

// The background-colour of the scrollerbox
var scrollerbgcolor="FBF9F9"

// Font attributes of the title
var font_titleface="Arial"
var font_titlecolor="CC0202"
var font_titlesize=1

// Font attributes of the copytext
var font_copyface="Arial"
var font_copycolor="000000"
var font_copysize=0

// standstill between the messages (milliseconds)
var standstillfix=3000

// Do not edit below this line
var cliptop=0
var clipbottom=scrollerheight-2*scrollerpadding
var clipleft=0
var clipright=scrollerwidth

var i_message=0
var mes_joined
var mes_split
var contenttext
var contentbg

var totalheight=scrollerheight*(message.length)
var i_height=0
var step=1
var pause=20

var standstillflex=0

function initiate(){
	contenttext="<table cellpadding=0 cellspacing=0 border=0 width="+(scrollerwidth-2*scrollerpadding)+">"
	contenttext+="<tr align='middle' valign='top'><td height='"+scrollerheight+"'><br></td></tr>"
	for (i=0;i<=message.length-1;i++) {
		mes_joined=message[i]
		mes_split=mes_joined.split("|")
		contenttext+="<tr align='middle'  valign='top'><td height='"+scrollerheight+"'><b><font face='"+font_titleface+"' color='"+font_titlecolor+"' size='"+font_titlesize+"'>"+mes_split[0]+"</font></b><br><font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"+mes_split[1]+"</font><br><font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"+mes_split[2]+"</font><br><font face='"+font_copyface+"' color='"+font_copycolor+"' size='"+font_copysize+"'>"+mes_split[3]+"</font></td></tr>"
	}
	contenttext+="</table>"

	contentbg="<table cellpadding=0 cellspacing=0 border="+backgroundborder+" width='"+scrollerwidth+"'><tr><td height='"+scrollerheight+"' bgcolor="+scrollerbgcolor+">&nbsp;</td></tr></table>"

	if (document.all) {
		scrollertext.innerHTML=contenttext
		scrollerbg.innerHTML=contentbg
		document.all.scrollertext.style.posTop=scrollertop
		document.all.scrollertext.style.posLeft=scrollerleft
		document.all.scrollerbg.style.posTop=scrollertop-scrollerpadding
		document.all.scrollerbg.style.posLeft=scrollerleft-scrollerpadding
		document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
	}
	if (document.layers) {
		document.scrollertext.document.write(contenttext)
		document.scrollertext.document.close()
		document.scrollerbg.document.write(contentbg)
		document.scrollerbg.document.close()
		document.scrollertext.top=scrollertop
		document.scrollertext.left=scrollerleft
		document.scrollerbg.top=scrollertop-scrollerpadding
		document.scrollerbg.left=scrollerleft-scrollerpadding
		document.scrollertext.clip.left=clipleft
        document.scrollertext.clip.right=clipright
        document.scrollertext.clip.top=cliptop
        document.scrollertext.clip.bottom=clipbottom
	}
	scroll()
}

function scroll(){
	standstillflex=standstillfix
	if (document.all){
		if (i_height<scrollerheight) {
			i_height+=step
			cliptop+=step
			clipbottom+=step
			document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
			document.all.scrollertext.style.posTop-=step
			var timer=setTimeout("scroll()",pause)
		}

		else {
			if (document.all.scrollertext.style.posTop<=-(totalheight)) {
				document.all.scrollertext.style.posTop=scrollertop
				cliptop=0
				clipbottom=scrollerheight-2*scrollerpadding
				document.all.scrollertext.style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
				standstillflex=0
			}
			i_height=0
			clearTimeout(timer)
			var timer=setTimeout("scroll()",standstillflex)
		}
	}

		if (document.layers){
			if (i_height<scrollerheight) {
				i_height+=step
				cliptop+=step
				clipbottom+=step
				document.scrollertext.clip.left=clipleft
        		document.scrollertext.clip.right=clipright
        		document.scrollertext.clip.top=cliptop
        		document.scrollertext.clip.bottom=clipbottom
				document.scrollertext.top-=step
				var timer=setTimeout("scroll()",pause)
			}

		else {
			if (document.scrollertext.top<=-(totalheight)) {
				document.scrollertext.top=scrollertop
				cliptop=0
				clipbottom=scrollerheight-2*scrollerpadding
				document.scrollertext.clip.left=clipleft
        		document.scrollertext.clip.right=clipright
        		document.scrollertext.clip.top=cliptop
        		document.scrollertext.clip.bottom=clipbottom
				standstillflex=0
			}
			i_height=0
			clearTimeout(timer)
			var timer=setTimeout("scroll()",standstillflex)
		}
	}
}

