/////////////////////////////////////// HOME PAGE /////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////
// set active tab:
// function should send to server the javascript error for tracing. for now it just alerts.
function traceError(text){
	//alert(text);
}

//---------------------------------------------------------------------------
function rotateWheel(frame){
	var wheel = document.getElementById("flash_wheel");
	if(!wheel) return(false);
	wheel.setOver(frame);
}
/////////////////////////////////////// MARQUEE ////////////////////////////////////////
var marquee_delayb4scroll=0 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var marquee_pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var gapTop = 100;
var firstMarqueeStartPosition = 130; //where the first marquee is going to start.
var copyspeed=marqueespeed;
var pausespeed=(marquee_pauseit==0)? copyspeed: 0;
var actualheight='';
var cross_marquee,cross_marquee2,marqueeheight,flagMargueeState; //flagMargueeState: 1 - first marguee moving, 2 - second moving

//-----------------------------------------------------------------------------------------
function scrollmarquee(){
	cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"; //move scroller upwards
	cross_marquee2.style.top=parseInt(cross_marquee2.style.top)-copyspeed+"px"; //move scroller upwards
	
	if (parseInt(cross_marquee.style.top)<(actualheight*(-1)+gapTop) && parseInt(cross_marquee2.style.top)<=(actualheight*(-1))){
		cross_marquee2.style.top=parseInt(marqueeheight)+8+"px";
	}
	if (parseInt(cross_marquee2.style.top)<(actualheight*(-1)+gapTop) && parseInt(cross_marquee.style.top)<=(actualheight*(-1))){
		cross_marquee.style.top=parseInt(marqueeheight)+8+"px";
	}
}
//-----------------------------------------------------------------------------------------
function initializemarquee(){
	flagMargueeState = 1;
	cross_marquee=document.getElementById("vmarquee");
	if(!cross_marquee) return(false);			
	cross_marquee2 = document.getElementById("vmarquee2");
	if(!cross_marquee2) return(false);
	cross_marquee2.innerHTML = cross_marquee.innerHTML;
		
	cross_marquee.style.top=firstMarqueeStartPosition;
	marqueeheight=document.getElementById("marqueecontainer").offsetHeight;	
	actualheight=cross_marquee.offsetHeight; //height of marquee content (much of which is hidden from view)

	//set height of div2 to bottom
	cross_marquee2.style.top=(actualheight*(-1));	
	
	if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
		cross_marquee.style.height=marqueeheight+"px";
		cross_marquee.style.overflow="scroll";
		return
    }
    setTimeout('lefttime=setInterval("scrollmarquee()",30)', marquee_delayb4scroll);
}
function initMarquee(){
    //initializemarquee();
    setOnloadFunction("initializemarquee"); 
}
//------------------------------------------------------------------------------------
/////////////////////////////////////// END MARQUEE //////////////////////////////////