/////////////////////////////////////////////
//Sandy 4-21-2001 version 1.0
//Supports IE4.0+,NS4+
//NS4 - no mouseover hover and button effect
/////////////////////////////////////////////
//
//creating an array of arrays 
//
var myArray = new Array( 
new Array(
"Home","/index.shtml",
"About","/goodies/about.shtml",
"FAQ","/goodies/faq.shtml",
"Sitemap","/goodies/sitemap.shtml",
"Search","/goodies/search.shtml",
"Tools","/goodies/tool.shtml",
"Contact","/goodies/contact.shtml"
),
new Array(
"Profile","/feature/profile.shtml",
"Biography","/feature/biography.shtml",
"Family/Friends","/feature/costar5.shtml",
"Autograph","/feature/autograph.shtml",
"Filmography","/feature/filmography.shtml",
"Reviews","/moviereviews/index.shtml",
"Co-Stars","/feature/costar2.shtml",
"5 Tigers","/feature/costar3.shtml"
),
new Array(
),
new Array(
),
new Array(
"Live News Feed", "/news/rss.php",
"News Archive","/news/archive.shtml",
"Interviews","/news/interview.shtml",
"Miscellaneous","/news/japan.shtml",
"News Links","/news/link.shtml",
"Chris Journal","/goodies/chris.shtml"
),
new Array(
),
new Array(
"Screensaver","/multimedia/screensaver.shtml",
"Wallpapers","/multimedia/wallpaper.shtml",
"Lyrics","/multimedia/lyrics.shtml",
"Video Clips","/multimedia/videoclip.shtml",
"CD","/multimedia/music.shtml",
"Music","/multimedia/musicfile.shtml",
"TVB Themesongs","/multimedia/tvbthemesong.shtml"
),
new Array(
"Discussion Board", "/phpBB2/index.php",
"Links","/goodies/link.shtml",
"Film Blog", "/tony/?page_id=74",
"Tony Message","/goodies/message.shtml",
"Email Me","mailto:webmaster@tonyleung.info"
)
);

function isEven(x) { return (x%2)?false:true; }
function isOdd(x) { return !isEven(x); }
var str ='';

function getContent(i){
	var newLength=myArray[i].length;
	var j=0;
	str='';
	while (j<newLength){
		if (isEven(j)){
			var myLink=myArray[i][j];
			var myURL=myArray[i][j+1];
		}
		str = str + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='+myURL+' class=tony>'+myLink+'</a>'
		j=j+2;
	}
	return str;
}

function moveout(which, html){
	which.style.background='#CC3300';
	for (i=0; i<8; i++){
		var menu = 'menu'+i;
		if (i!=html){
			document.getElementById(menu).style.background='#808080';
		}
	}
}

function movein(which, html){
	which.style.background='#CC3300'
	if (document.getElementById){
		document.getElementById("descriptions").innerHTML=getContent(html);
	} else {
		boxdescription.innerHTML=getContent(html);
	}
}

function rollmessage(html){
	if (document.all||document.getElementById){
		cross_el=document.getElementById? document.getElementById("descriptions"):document.all.descriptions
		cross_el.innerHTML=(getContent(html))
	} else if (document.layers){
		document.d1.document.d2.document.write(getContent(html))
		document.d1.document.d2.document.close()
	}

}

function appear(){
	document.d1.visibility='show'
}

function regenerate(){
	window.location.reload()
}
function regenerate2(){
	if (document.layers){
		appear()
		setTimeout("window.onresize=regenerate",450)
	}
}


window.onload=regenerate2

function openWindow(theURL) {
  
var mywindow = window.open(theURL,"newwindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=400");

mywindow.focus();

}

function openWindowSize(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=yes,scrollbars=no,status=no,";
    options += "menubar=no,toolbar=no,location=no,directories=no";
    var newWin = window.open(url, 'newWin', options);
    /*
    if (w!=undefined){
    	newWin.resizeTo(w+30,h+30)
    }else{
    	newwin.resizeTo(300,300)
    }
    */
    newWin.focus();
}

function openWindow(url, w, h) {
    var options = "width=" + w + ",height=" + h + ",";
    options += "resizable=yes,scrollbars=no,status=no,";
    options += "menubar=no,toolbar=no,location=no,directories=no";
    var newWin = window.open(url, 'newWin', options);
    /*
    if (w!=undefined){
    	newWin.resizeTo(w+30,h+30)
    }else{
    	newwin.resizeTo(300,300)
    }
    */
    newWin.focus();
}



