var laguageFlag = "en";

function setLanguageFlag(lnFlag){
	laguageFlag = lnFlag;
}

function openWin(pageName){
	var w = 550;
	var h = 600;
	var webaddress = '';
	if (pageName == 'disclaimer'){
		webaddress = "disclaimer.html";
	}
	if (pageName == 'copyright'){
		webaddress = "copyright.html";
	}
	if (pageName == 'conditions'){
		webaddress = "conditions.html";
	}
	viewWin = window.open(webaddress,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+w+',height='+h);
	viewWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
}


function openWinMain(pageName){
	var w = 550;
	var h = 600;
	var webaddress = '';
	if (pageName == 'disclaimer'){
		webaddress = laguageFlag + "/disclaimer.html";
	}
	if (pageName == 'copyright'){
		webaddress = laguageFlag + "/copyright.html";
	}
	if (pageName == 'conditions'){
		webaddress = laguageFlag + "/conditions.html";
	}
	viewWin = window.open(webaddress,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+w+',height='+h);
	viewWin.moveTo(screen.availWidth/2-(w/2),screen.availHeight/2-(h/2));
}

function showHide(group){
	document.getElementById('group1').style.visibility = 'hidden';
	document.getElementById('group2').style.visibility = 'hidden';
	document.getElementById('group3').style.visibility = 'hidden';
	document.getElementById(group).style.visibility = 'visible';
}

var sRepeat=null
function doMarquee(dir, src, amount) {
	//if (window.document.readyState=="loading") alert("Please wait until the page is finished loading.")
	if (amount==null) amount=10
	switch (dir) {
	case "up":
		document.all[src].style.pixelTop-=amount
		if (-document.all[src].style.pixelTop>=document.all[src].offsetHeight)
			document.all[src].style.pixelTop=document.all[src].offsetParent.offsetHeight
		break;
	case "down":
		document.all[src].style.pixelTop+=amount
		if (document.all[src].style.pixelTop>document.all[src].offsetParent.offsetHeight)
			document.all[src].style.pixelTop = -document.all[src].offsetHeight
		break;
	case "left":
		document.all[src].style.pixelLeft-=amount
		if (-document.all[src].style.pixelLeft>=document.all[src].offsetWidth)
			document.all[src].style.pixelLeft=document.all[src].offsetParent.offsetWidth
		break;
	case "right":
		document.all[src].style.pixelLeft+=amount
		if (document.all[src].style.pixelLeft>document.all[src].offsetParent.offsetWidth)
			document.all[src].style.pixelLeft = -document.all[src].offsetWidth
		break;
	}
	return false
}


function RunMarquee(sDir,sWhich) {
  
  clearInterval(sRepeat)
  iAmount=5
  sRepeat = setInterval("doMarquee('"+sDir+"','"+sWhich+"'," + iAmount+")",175)
}

function doLoad() {
  //setup()
  
  window.document.all.s1.ondragstart = new Function("return false")
  RunMarquee("up","s1")
}
