
// index scroller code

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function P7AniMagic(el, x, y, a, b, c, s) { //v2.5 PVII
 var g,elo=el,f="",m=false,d="";x=parseInt(x);y=parseInt(y);
 var t = 'g.p7Magic = setTimeout("P7AniMagic(\''+elo+'\','; 
 if ((g=MM_findObj(el))!=null) {d=(document.layers)?g:g.style;}else{return;}
 if (parseInt(s)>0) {eval(t+x+','+y+','+a+','+b+','+c+',0)",' + s+')');return;}
 var xx=(parseInt(d.left))?parseInt(d.left):0;
 var yy=(parseInt(d.top))?parseInt(d.top):0;
 if(parseInt(c)==1) {x+=xx;y+=yy;m=true;c=0;}
 else if (c==2) {m=false;clearTimeout(g.p7Magic);}
 else {var i=parseInt(a);
  if (eval(g.moved)){clearTimeout(g.p7Magic);}
  if (xx<x){xx+=i;m=true;if(xx>x){xx=x;}}
  if (xx>x){xx-=i;m=true;if(xx<x){xx=x;}}
  if (yy<y){yy+=i;m=true;if(yy>y){yy=y;}}
  if (yy>y){yy-=i;m=true;if(yy<y){yy=y;}}}
 if (m) {if((navigator.appName=="Netscape") && parseInt(navigator.appVersion)>4){
    xx+="px";yy+="px";}
  d.left=xx;d.top=yy;g.moved=true;eval(t+x+','+y+','+a+','+b+','+c+',0)",'+b+')');
  }else {g.moved=false;}
}

// Drop Down routines

var delay = 750;
var currentDropDown = 0;
var timerID = 0;


function dropDownOn(a){

	clearTimeout(timerID);			// cancel any pending menuHide
	dropDownHide(currentDropDown);	// force hide current menu
	
	currentDropDown = a;		// store new menu name
	dropDownShow(a);			// show new menu
}

function dropDownOff(){

	timerID = setTimeout('dropDownHide(currentDropDown)',delay);	// turns off menu after preset delay
}

function dropDownShow(a){

	if (a==false){
		return;
		}

	if (document.all){
		element = document.all[a];
		element.style.visibility = "visible";
		return;
		}
	
	if (document.getElementById){
		element = document.getElementById(a);
		element.style.visibility = "visible";
		return;
		}
}

function dropDownHide(a){

	if (a==false){
		return;
		}

	if (document.all){
		element = document.all[a];
		element.style.visibility = "hidden";
		return;
		}
	
	if (document.getElementById){
		element = document.getElementById(a);
		element.style.visibility = "hidden";
		return;
		}
}


function dropDownRollOn(a){

	var colour = "#ffff00";
	var colourFont = "#000000";
	
	if (document.all){
		element = document.all[a];
		element.style.backgroundColor = colour;
		element.style.color = colourFont;
		element.style.cursor = 'pointer';
		return;
		}
	
	if (document.getElementById){
		element = document.getElementById(a);
		element.style.backgroundColor = colour;
		element.style.color = colourFont;
		element.style.cursor = 'pointer';
		return;
		}
}

function dropDownRollOff(a){

	var colour = "#999999";
	var colourFont = "#ffffff";
	
	if (document.all){
		element = document.all[a];
		element.style.backgroundColor = colour;
		element.style.color = colourFont;
		element.style.cursor = 'default';
		return;
		}
	
	if (document.getElementById){
		element = document.getElementById(a);
		element.style.backgroundColor = colour;
		element.style.color = colourFont;
		element.style.cursor = 'default';
		return;
		}
}


// Who's Who

function showWhosWho(w,b){

	if (document.all){
	
		element = document.all[w];
		buttonImg = document.all[b];
		
		if (element.style.display == 'block'){
			element.style.display = 'none';
			buttonImg.src = '/images/expand_down_15x15.gif';
		}else{
			element.style.display = 'block';
			buttonImg.src = '/images/expand_up_15x15.gif';
		}
		
		return;
		}
	
	if (document.getElementById){
	
		element = document.getElementById(w);
		buttonImg = document.getElementById(b);
		
		if (element.style.display == 'block'){
			element.style.display = 'none';
			buttonImg.src = '/images/expand_down_15x15.gif';
		}else{
			element.style.display = 'block';
			butonImg.src = '/images/expand_up_15x15.gif';
		}
				
		return;
		}
}

// Who's Who Open enlarge image by HonWong 0/09/04
function OpenWindow(theURL,winName,features) { 
  var popwin=window.open(theURL,winName,features);
  popwin.focus();
}
