// SCRIPT for NS 4.x versions
// (c) 2000 by Bee Communication S.A.
// Author: Alexander (alextg@bee.gr) Papastergiou

ExecEnable = false;			// DISABLE ALL scripts until all code is generated and loaded by client

function GetPDIndex(id)
{
	found = -1
	for (i=1;i<=MaxPDMenus;i++) {
		if (pdmData1[i] == id) {
			found = i
			break
		}
	}
	return found
}

function Hide( Level )
{
	if (ExecEnable) {
		for (i=1;i<=MaxPDMenus;i++) {
			if (pdmData2[i] > Level) {

				document.layers[ pdmData1[i] ].visibility = "hide"
			}
		}
	}
}

function Show( id )
{
	if (ExecEnable) {
		Index = GetPDIndex(id)

		Hide( pdmData2[Index] -1 )

		id = pdmData1[Index]
		x = pdmData3[Index]
		y = pdmData4[Index]

		if (x < 0) {
			adjust = window.innerWidth
		} else {
			// for 640 resulotions uncomment following line
			adjust = (window.innerWidth - 779)  >> 1
			//adjust = 0
		}
		x = adjust + x

		document.layers[id].left = x
		document.layers[id].top = y
		document.layers[id].visibility = "show"
	}
}

function point( imageName ) {
if (ExecEnable) {
  if ( document.images ) {
    document[ imageName ].src = eval(imageName + "_o.src");
  }
}
}

function nopoint( imageName ) {
if (ExecEnable) {
  if ( document.images ) {
    document[ imageName ].src = eval(imageName + "_n.src");
  }
}
}

var popWin	   // var used because of the closepopWin() function it has to be declare global

function OpenPopWin(URL, width, height, scroll)
{ 
   popWin = window.open(URL, "myPopWin", "toolbar=0,location=0,menubar=0,scrollbars=" + scroll + ",resizable=0,width=" + width + ",height=" + height);
   popWin.focus();
}

function ClosePopWin()  
{ 
   popWin.close()
}
