function checkURL() {
	var str=new String(unescape(window.location));
	var n=str.indexOf("?")==-1 ? "" : str.substring(str.indexOf("?")+1,str.length);
	var url=str.indexOf("?")==-1 ? str : str.substring(0,str.indexOf("?"));
	var nx=n.split("#");
	//document.getElementById("tb_content").height=screen.availHeight-document.getElementById("tb_navbar").clientHeight-64;
	if(nx[0]!=""){
		switchCell(nx[0],nx[1]);
	}else{
		switchCell(1);
	}
}

function switchCell(n, hash) {
	nc=document.getElementsByName("navcell");
	if(nc){
		t=document.getElementsByName("tb")
		for(i=0;i<nc.length;i++){
			nc.item(i).className="tab-off";
			t.item(i).className="hide-table";
		}
		nc.item(n-1).className="tab-on";
		t.item(n-1).className="tab-content show-table";
	}else if(navcell){
		for(i=0;i<navcell.length;i++){
			navcell[i].className="tab-off";
			tb[i].className="hide-table";
		}
		navcell[n-1].className="tab-on";
		tb[n-1].className="tab-content show-table";
	}
	if(hash){
		document.location="#"+hash;
	}
}

function addToFavorite(){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(document.title));
  }
}
