﻿
var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=2 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.left)<(actualwidth*(-1)+4))
cross_marquee.style.left=(parseInt(cross_marquee2.style.left)+actualwidth+4)+"px"
if (parseInt(cross_marquee2.style.left)<(actualwidth*(-1)+4))
cross_marquee2.style.left=(parseInt(cross_marquee.style.left)+actualwidth+4)+"px"
cross_marquee2.style.left=parseInt(cross_marquee2.style.left)-copyspeed+"px"
cross_marquee.style.left=parseInt(cross_marquee.style.left)-copyspeed+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee2=document.getElementById("vmarquee2")
cross_marquee.style.left=0
marqueewidth=document.getElementById("marqueecontainer").offsetWidth
actualwidth=cross_marquee.firstChild.offsetWidth
cross_marquee2.style.left=actualwidth+4+'px'
cross_marquee2.innerHTML=cross_marquee.innerHTML
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee

<!--
function switchTheDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].visibility = "show"
else if (document.all) document.all[''+id+''].style.visibility = "visible"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
else
if (flagit=="0"){
if (document.layers) document.layers[''+id+''].visibility = "hide"
else if (document.all) document.all[''+id+''].style.visibility = "hidden"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
}
}
//-->
function fullscreener(url) {
  w = screen.availWidth-10;
  h = screen.availHeight-20;
  
  features = "width="+w+",height="+h;
  features += ",left=0,top=0,screenX=0,screenY=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no;"

  window.open(url, "", features);
}


function showlayer(szDivID, iState) 
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
	
	return true;
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function popupInfo(obj,id,flagit) {
	pos = findPos(obj);
	xPos = pos[0]-20;
	yPos = pos[1]-20;

	if (flagit=="1")
	{
		if (document.layers) 
		{
			document.layers[''+id+''].visibility = "show";
			document.layers[''+id+''].left = xPos + 'px';
			document.layers[''+id+''].top =  yPos + 'px';
		}
		else if (document.all)
		{
			document.all[''+id+''].style.left = xPos + 'px';
			document.all[''+id+''].style.top =  yPos + 'px';
			document.all[''+id+''].style.visibility = "visible";
		}
		else if (document.getElementById) 
		{	
			document.getElementById(''+id+'').style.left = xPos + 'px';
			document.getElementById(''+id+'').style.top =  yPos + 'px';
			document.getElementById(''+id+'').style.visibility = "visible"
		}
	}
	else if (flagit=="0")
	{
		if (document.layers) document.layers[''+id+''].visibility = "hide"
		else if (document.all) document.all[''+id+''].style.visibility = "hidden"
		else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
	}
}

function launchHTML_BUTOH(url){
windowW = 821
windowH = 730
windowX = (screen.width/2)-(windowW/2);
windowY = (screen.height/2)-(windowH/2); 

   html_butoh = window.open(url,"win","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+windowW+",height="+windowH+",top=0,left=0")
      
   html_butoh.moveTo(windowX,windowY)
   
  } 
