window.onload = function fncOnLoad(){
	try{
		var r = eval(resource);
		for(var i = 0; i < r.length; i++){
			if(document.getElementById("id_res_" + r[i].id)){
				document.getElementById("id_res_" + r[i].id).innerHTML = r[i].value;
			}
		}

		var t = eval(toc);
		for(var i = 0; i < t.length; i++){
			var objHn = document.createElement("h" + t[i].level);
			if(t[i].href){
				objHn.innerHTML = "<a href=\"javascript:try{window.opener.document.location.href='../contents/" + t[i].href + "'}catch(e){window.open('../contents/" + t[i].href + "')};void(0);\">" + t[i].node_name + "</a>";
			}else{
				objHn.innerHTML = t[i].node_name;
			}
			objHn.title = t[i].node_name;
			document.getElementById("id_toc").appendChild(objHn);
		}

		with(window){
			moveTo(screen.width - 400, 0);
			resizeTo(400, screen.height - 32);
			self.focus();
		}
	}catch(e){
		if(e.description){
			alert(e.description);
		}else{
			alert(e);
		}
	}
}