
/*flag = 0;
function doIt(event,b,c)
{
	flag = 1;
	var a = document.getElementById(b);
	//document.getElementById(b).style.top = event.clientX
	a.style.top = event.clientY;
	a.style.left =event.clientX;
	a.style.visibility = "visible";
	d =document.getElementById(c);
	d.style.color = "#000000";
}
function doItWhileMove(event,b)
{
	flag = 1;
	if(flag == 1)
	{
		a = document.getElementById(b);
		a.style.top = event.clientY;
		a.style.left =event.clientX;
	}
}
function stopDoIt(b,c)
{
	d = document.getElementById(c);
	d.style.color = "#ffffff";
	a = document.getElementById(b);
	a.style.visibility = "hidden";
	flag = 0;
}*/

function ShowWeb(divID) {
	if (divID == 120) {
		document.getElementById(divID).style.display="block";
		document.getElementById(121).style.display="none";
	}
	else {
		document.getElementById(divID).style.display="block";
		document.getElementById(120).style.display="none";
	}
}

function ShowDiv(divID) {
	if (document.getElementById(divID).style.display=="block") {
		document.getElementById(divID).style.display="none";
	}
	else {
		for(var i=90;i<94;i++)
		{
			if(i==divID)
			{
				document.getElementById(i).style.display="block";
			}
			else 
			{	
				document.getElementById(i).style.display="none";
			}
		}
	}
	//document.getElementById(divID).style.display="block";
}

function ChangeDiv(divID) {
	for(var i=51;i<55;i++)
	{
		if(i==divID)
		{
			document.getElementById(i).style.display="block";
		}
		else 
		{	
			document.getElementById(i).style.display="none";
		}
	}
	document.getElementById(55).style.display="none";
}

function changetab(num,id,elem,right)
{	
	var tabfocus = document.getElementById(id);
	//alert(elem.className)
	for(var i=51;i<num;i++)
	{
		if(i==id)
		{
			document.getElementById(i).style.visibility = "visible";
			//document.getElementById(i).style.display="block";
		}
		else 
		{	
			document.getElementById(i).style.visibility = "hidden";
			//document.getElementById(i).style.display="none";
		}
	}

	for(var i=60;i<64;i++)
	{
		document.getElementById(i).className = 'leftmenu'
		/*if(document.getElementById(i).style.visibility != "hidden")
		{	
			
			document.getElementById(i).style.visibility = "hidden";
			document.getElementById(i-5).style.visibility = "visible";
			break;
		}*/
	}
	elem.className = 'leftmenu_color'
	//var f=true;
	InitializePage(right);
	//alert(elem.className)
	//document.getElementById(a+5).style.visibility = "visible";	
}

function changerighttab(num,id)
{	
	var tabfocus = document.getElementById(id);
	//document.getElementById('3').style.visibility = "visible"
	for(var i=0;i<=5;i++)
	{
		if(i==id)
			document.getElementById(i).style.visibility = "visible";
			//document.getElementById(i).style.display = "block";
		else
			document.getElementById(i).style.visibility = "hidden";
			//document.getElementById(i).style.display = "none";
	}	
	
}

function invisible(a)
{
	document.getElementById(a).style.visibility = "hidden";
}

function available(a)
{
	document.getElementById(a).style.visibility = "visible";
}


function show_coords(event,t,d)
{

x=event.clientX+1
y=event.clientY+1
var a = document.getElementById(t)
document.getElementById(t).style.visibility = "visible"
document.getElementById(t).style.color= "#62CAEF"
document.getElementById(t).style.top = y + "px"
a.style.left=x + "px"
c = document.getElementById(d)
c.style.color = "#000000"
//document.getElementById(t).style.top = x
//alert("X coords: " + x + ", Y coords: " + y)
}
function changecolor(d)
{
	c = document.getElementById(d)
	c.style.color = "#000000"
}

function hide_div(b,c)
{
	d = document.getElementById(c);
	d.style.color = "#ffffff";
	a = document.getElementById(b);
	a.style.visibility = "hidden";
}

var pausecontent2=new Array()
pausecontent2[0]="<b>3-Oct-2007</b> A top-10 Vietnamese securities company chooses SEA-Solutions to do the business requirements of their Mobile Stock Market project."
pausecontent2[1]="<b>23-Nov-2007</b> Final delivery of HIQ9 module for our client based in Bangkok"
pausecontent2[2]="<b>10-Dec-2007</b> Start the development of Microsoft-Thailand web-based platform to organizing and tracking customer outreach events in order to unify and standardize company\'s marketing efforts."
pausecontent2[3]="<b>24-Dec-2007</b> Approval of the development on the Mobile Stock Market project - Phase 1."
pausecontent2[4]="<b>7-Jan-2008</b> Start the implementation of a prototype for a medical system for the management of patients with chronic diseases."
pausecontent2[5]="<b>21-Jan-2008</b> Visit of BH-Indigo Managing Director at SEA-Solutions Saigon office to officialize the collaboration on the development of the medical system."
pausecontent2[6]="<b>30-Jan-2008</b> Completion of the enhancement of \"First Help Info\" website. The purpose of this website is to give a quick and easy access, via the internet, to an effective and quick assessment of patient\'s condition in the event of distress."
pausecontent2[7]="<b>1-Feb-2008</b> Extension of our staff contract on Mobile and Telecom projects in Malaysia."
pausecontent2[8]="<b>1-Mar-2008</b> Signature of the contract for the development of a logistics application for the cargo transportation industry. This project requires a complete and accurate warehouse management system combined with an integrated Human Resource and Salary Planning Management system."
pausecontent2[9]="<b>12-Mar-2008</b> Visit of Cyberwork Managing Director at Hanoi office. He brought with him the requirements of Citibank project; its development is planned to start at mid-March."
pausecontent2[10]="<b>1-May-2008</b> Hewlett Packard chooses SEA-Solutions to take part on the implementation of application services of a Mobile Project for one of their biggest clients in Malaysia."
pausecontent2[11]="<b>12-June-2008</b> Start the development of a financial application for a Malaysian company specializing in the development of business solutions for the financial services industry."

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 1000)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


