<!--
var treeWindowName = "Kinome_Tree_Control_Window";
var treeHandle = 0;

	function openKinome(){
		//call open method on the applet object
		var url = "display/kinome.html";
	
		agent = navigator.userAgent;
	        
		params  = "";
		params += "toolbar=0,";
		params += "location=0,";
		params += "directories=0,";
		params += "status=0,";
		params += "menubar=0,";
		params += "scrollbars=0,";
		params += "resizable=0,";
		params += "width=200,";
		params += "height=170";
		
		treeHandle = window.open(url, treeWindowName , params);
		
		if (!treeHandle.opener) {
			treeHandle.opener = window;
		}
		
		treeHandle.blur();
		
//		alert("after openKinome: treeHandle = " + treeHandle);
	}

	function closeKinome(){
//		alert("closeKinome called");
		treeHandle = getTreeHandle();
		treeHandle.close();
		treeHandle = 0;
//		alert("treeHandle after closing = " + treeHandle);
	}
	
	function aboutKinome(){
		var out = "../aboutkinome.do";
		document.location.href = out;
	}	
	
	function setClickedId(id){
		alert("Clicked id = " + id);
	}
	
	function displayKinaseList(parameter){
//		alert("displayKinaseList executing with parameter = " + parameter);
		var os = navigator.platform;
//		if (os.indexOf("Mac") != -1){
//			alert("This function is not yet available on Mac OS due to browser limitations.");
//			return;
//		}
		
		var flag = getTreeActive();
		if (flag == 0){
//			alert("This function is available only with kinome tree displayed");
//			return;
			openKinome();
		}
		treeHandle = getTreeHandle();
		treeHandle.blur();
		treeHandle.displayKinaseList(parameter);
	}
	
	function displayKinaseId(parameter){
//		alert("displayKinaseId executing with parameter = " + parameter);
		var os = navigator.platform;
		if (os.indexOf("Mac") != -1){
			alert("This function is not yet available on Mac OS due to browser limitations.");
			return;
		}
		
		treeHandle = getTreeHandle();
		treeHandle.blur();
		var flag = getTreeActive();
		if (flag == 0){
//			alert("This function is available only with kinome tree displayed");
//			return;
			openKinome();
		}
		treeHandle.displayKinaseId(parameter);
	}
	
	function checkTreeHandle(){
		getTreeHandle();
	}
	
	function getTreeActive(){
		try{
			var handle = getTreeHandle();
			handle.blur();
			var active = handle.getTreeOpen();
//			alert("getTreeActive: active = " + active);
			return active;
		}
		catch (error){
//			alert("error = " + error);
			return 0;
		}
	}
	
	function getTreeHandle(){
		if (treeHandle == 0){
//			alert("treehandle = 0. getting a new one");
			var params  = "";
			params += "toolbar=0,";
			params += "location=0,";
			params += "directories=0,";
			params += "status=0,";
			params += "menubar=0,";
			params += "scrollbars=0,";
			params += "resizable=0,";
			params += "width=1,";
			params += "height=1";
			treeHandle = window.open('', treeWindowName, params);
		}
//		alert("getTreeHandle: returning treeHandle = " + treeHandle);
		return treeHandle;
	}
	
	//service functions that are executed in response to tree events
	function loadKinaseList(list){
		var out = "../displaykinaselist.do?kinase_list=" + list;
//		alert("New location = " + out);
		document.location.href = out;
	}

	function loadConservation(list){
		var out = "../loadconservation.do?" + list;
		document.location.href = out;
	}

	function loadAlignment(list){
		var out = "../displaykinasealignment.do?" + list;
		document.location.href = out;
	}

	function blastKinase(id){
		var out = "../blastkinase.do?kinase_id=" + id;
		document.location.href = out;
	}
		

//-->