﻿  
var xmlpage;

function start()
{
//loadpage('page');
var thisObj1 = document.getElementById('ctl00_img2');
thisObj1.src='images/b2-g.jpg'
var thisObj2 = document.getElementById('ctl00_img0');
thisObj2.src='images/bright-o.jpg'
var thisObj3 = document.getElementById('ctl00_img1');
thisObj3.src='images/b1-o.jpg'
var thisObj4 = document.getElementById('ctl00_img3');
thisObj4.src='images/b-06.jpg'
var thisObj5 = document.getElementById('ctl00_img4');
thisObj5.src='images/b-07.jpg'
document.getElementById("p").align='center'
document.getElementById("p").innerHTML =document.getElementById('w').innerHTML


startTicker();
}

function loadpage(name)
{
if (window.ActiveXObject)
  {
  xmlpage=new ActiveXObject("Microsoft.XMLDOM");
  xmlpage.async=false;
  xmlpage.load("doc/"+name+".xml");
  
      }
else if (document.implementation && document.implementation.createDocument)
  {
  xmlpage=document.implementation.createDocument("","",null);
  xmlpage.load("doc/"+name+".xml");
    }
else
  {
  alert('Your browser cannot handle this script');
  }
     
      }

var xmlDoc=" ";
function init(name){
		
		
if (window.ActiveXObject)
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load("doc/"+name+".xml");
  
      }
else if (document.implementation && document.implementation.createDocument)
  {
  xmlDoc=document.implementation.createDocument("","",null);
  xmlDoc.async=false;
  xmlDoc.load("doc/"+name+".xml");
    }
else
  {
  alert('Your browser cannot handle this script');
  }


//		window.ActiveXObject ? xmlDoc = new ActiveXObject("Microsoft.XMLDOM") 
//				     :  xmlDoc = document.implementation.createDocument("","",null);
//		xmlDoc.async = false;
//		xmlDoc.load("doc/"+ticker+".xml");
		 
		
	}



init('ticker');
var theSummaries = new Array();
var k;
for (k = 0; k <xmlDoc.getElementsByTagName('body').length; k++)
		{

theSummaries[k]=xmlDoc.getElementsByTagName('body')[k].firstChild.data;

}




var theSiteLinks = new Array('#');


	// Control parameters
	var theCharacterTimeout = 50;
	var theStoryTimeout     = 5000;
	var theWidgetOne        = "_";
	var theWidgetTwo        = "-";
	var theWidgetNone       = "";
    var theItemCount = theSummaries.length;
	var NS6=(document.getElementById && !document.all) ? true : false;
	
// Ticker startup

function startTicker()
{
//alert(leadRecipient);
	// Define run time values
	theCurrentStory     = -1;
	theCurrentLength    = 0;
	// Locate base objects
	if (document.getElementById) {	
			runTheTicker();   	
		 }
	else {
           // document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
            return true;
	}
}
// Ticker main run loop
function runTheTicker()
{
	var myTimeout;  
	// Go for the next story data block
	if(theCurrentLength == 0)
	{
		theCurrentStory++;
		theCurrentStory      = theCurrentStory % theItemCount;
		theStorySummary      = theSummaries[theCurrentStory];
		theTargetLink        = theSiteLinks[theCurrentStory];
	}
	
	var textTitle = theStorySummary.substring(0,theCurrentLength) + whatWidget();
	
	if (theTargetLink ) {
	
		if (NS6) {
	document.getElementById("theTicker").innerHTML  = '<a href="'+ theTargetLink +'" class="siteNavigation">'+textTitle+'</a>';
				 }
		else {
	document.all.theTicker.innerHTML  = '<a href="'+ theTargetLink +'" class="siteNavigation">'+textTitle+'</a>';
				}
						} 	
	else {
		if (NS6) {
	document.getElementById("theTicker").innerHTML = '<span class="tickertext">'+textTitle+'</span>';
				}
		else {
	document.all.theTicker.innerHTML  = '<span class="tickertext">'+textTitle+'</span>';
				}
	}
	
	// Modify the length for the substring and define the timer
	if(theCurrentLength != theStorySummary.length)
	{
		theCurrentLength++;
		myTimeout = theCharacterTimeout;
	}
	else
	{
		theCurrentLength = 0;
		myTimeout = theStoryTimeout;
	}
	// Call up the next cycle of the ticker
	setTimeout("runTheTicker()", myTimeout);
}

// Widget generator
function whatWidget()
{
	if(theCurrentLength == theStorySummary.length)
	{
		return theWidgetNone;
	}

	if((theCurrentLength % 2) == 1)
	{
		return theWidgetOne;
	}
	else
	{
		return theWidgetTwo;
	}

}

var mousex;
var mousey;
function displaycoordNS(e){
mousex=e.clientX;
mousey=e.clientY;
}




var http = null;

if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Msxml2.XMLHTTP");
} else {
  http = new XMLHttpRequest();
} 

function tabload(url){
//document.getElementById("whois").style.display="block"
 http.open("GET", url, true);
  http.onreadystatechange=function() {
    if(http.readyState == 4) {
      document.getElementById("p").innerHTML = http.responseText;
    }
 }
  http.send(null);
} 






function IMG_onclick(i) {

var k;

for (k = 1; k <6; k++)
		{
var thisObj1 = document.getElementById('img'+k);

thisObj1 .src='images/tab-bt0'+k+'_over.jpg';
var rolover2=document.getElementById('asia'+ k);
rolover2.style.display='none';	

}

var thisObj1 = document.getElementById('img'+i);
thisObj1.src='images/tab-bt0'+i+'.jpg';	

var rolover1= document.getElementById('asia'+ i);
rolover1.style.display='block';	 


 }
 function openlast()
	{
	var rolover2=document.getElementById('open');
    rolover2.style.display='none';	
    var rolover2=document.getElementById('close');
    rolover2.style.display='block';	
     var rolover2=document.getElementById('last');
    rolover2.style.display='none';	

	}
function closelast()
	{
	var rolover2=document.getElementById('close');
    rolover2.style.display='none';	
    var rolover2=document.getElementById('open');
    rolover2.style.display='block';
      var rolover2=document.getElementById('last');
    rolover2.style.display='block';		

	}

