function showindex() {
MM_showHideLayers('divMessage1','','show');
messages3[0]='<font face="arial,helvetica,sans-serif" size="2" color="#000000"><b>('+(pos_main+1)+' of '+nav_main.length+')</b></font>';
changeText3(0,1);
}

function setsize() {
	if (!parent.opener.bw.ns4) {
		height=document.body.scrollHeight+30;
		if (height>screen.height-30) height=screen.height-30;
		parent.resizeTo(600,height);
	}
}

function stayontop(){ 
window.focus();
}
var printw;
function openPrintWindow(theURL,winName) { 
  printw=window.open(theURL,winName,'scrollbars=yes,resizable=yes,width=790,height=480');
}
var win;
function openWindow(theURL,winName) { 
  var windowW=810; 
  var windowH=510; 
  var windowX = 0; 
  var windowY = 0;
  ver=navigator.appVersion
  agent=navigator.userAgent
  dom=document.getElementById?1:0
  opera5=agent.indexOf("Opera 5")>-1;
  ie6=(ver.indexOf("MSIE 6")>-1 && dom && !opera5)?1:0 
  if (ie6) fs=''; else fs='fullscreen,';
  win=window.open("",winName,fs+'scrollbars=yes,resizable=no,width=810,height=510');
  win.focus();       
  win.resizeTo(windowW,windowH);
  win.moveTo(windowX,windowY);
   var frameString=""+
"<html>"+
"<head>"+
"<title>Bladder Cancer</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+theURL+"' scrolling=auto>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
    win.document.open();
    win.document.write(frameString)
    win.document.close()
}
var pos_main=0;
var pos_sub=0;
var stat=false;
function set_empty() {
pos_main=0;
pos_sub=0;
stat=false;
splited_sub=nav_sub[pos_main].split(",");
if (splited_sub[pos_sub]=='') MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
MM_swapImage('histo','',nav_main[pos_main],1);
}
function set_empty2() {
splited_sub=nav_sub[pos_main].split(",");
if (splited_sub[pos_sub]=='') MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
}
function switch_button() {
splited_sub=nav_sub[pos_main].split(",");
if (splited_sub[0]!='') stat = !stat;
if (stat){
    splited_sub=nav_sub[pos_main].split(",");
	if (splited_sub[0]=='') {
		MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
	} else {
		MM_swapImage('expl_back','','imgs/nav_a_04.gif',1);
		MM_swapImage('histo','',splited_sub[pos_sub],1);
	}
} else {
    pos_sub=0;
	splited_sub=nav_sub[pos_main].split(",");
	if (splited_sub[0]=='') {
		MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
	} else {
		MM_swapImage('expl_back','','imgs/nav_a_02.gif',1);
		MM_swapImage('histo','',nav_main[pos_main],1);
	}
}
}

function switch_over() {
if (stat){
    splited_sub=nav_sub[pos_main].split(",");
	if (splited_sub[0]=='') {
		MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
	} else {
		MM_swapImage('expl_back','','imgs/nav_a_04.gif',1);
	}
} else {
	splited_sub=nav_sub[pos_main].split(",");
	if (splited_sub[0]=='') {
		MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
	} else {
		MM_swapImage('expl_back','','imgs/nav_a_02.gif',1);
	}
}
}

function nav_out(dir) {
if (dir=='r'){
    MM_swapImage('Image26','','imgs/nav_n_03.gif',1);
} else {
	MM_swapImage('Image24','','imgs/nav_n_01.gif',1);
}
}

function nav(dir) {
if (dir=='l') {
	if (stat){
		pos_sub-=1;
		pos_main-=1;//new
		if (pos_main<0) pos_main=nav_main.length-1;//new
		if (pos_sub<0) pos_sub=nav_sub.length-1;
		splited_sub=nav_sub[pos_main].split(",");
		
		if (splited_sub[0]=='' && pos_main==0) {
			MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
		} else {
   			MM_swapImage('expl_back','','imgs/nav_n_04.gif',1);
		}
		//if (splited_sub[pos_sub]=="undefined" || splited_sub[pos_sub]==null || splited_sub[pos_sub]=='') return;
		MM_swapImage('histo','',splited_sub[pos_sub],1);
		MM_swapImage('histo','',nav_main[pos_main],1);//new
		switch_button();//new
		if (splited_sub[0]=='') {//new
			MM_swapImage('expl_back','','imgs/nav_empty.gif',1);//new
		} else {//new
			MM_swapImage('expl_back','','imgs/nav_n_02.gif',1);//new
		}	
	} else {
		pos_main-=1;
		if (pos_main<0) pos_main=nav_main.length-1;
		splited_sub=nav_sub[pos_main].split(",");
		if (splited_sub[0]=='' && pos_main==0) {
			MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
		} else {
   			MM_swapImage('expl_back','','imgs/nav_n_02.gif',1);
		}
		MM_swapImage('histo','',nav_main[pos_main],1);
	}
	messages3[0]='<font face="arial,helvetica,sans-serif" size="2" color="#000000"><b>('+(pos_main+1)+' of '+nav_main.length+')</b></font>';
	
}
if (dir=='r') {
    //x=MM_findObj('histo');
	//x.width=100;x.height=100;
	if (stat){
		pos_sub+=1;
		pos_main+=1;//new
		if (pos_main>nav_main.length-1) pos_main=0;//new
		if (pos_sub>nav_sub.length-1) pos_sub=0;
		splited_sub=nav_sub[pos_main].split(",");
		if (splited_sub[0]=='' && pos_main==0) {
			MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
		} else {
   			MM_swapImage('expl_back','','imgs/nav_n_04.gif',1);
		}
		//if (splited_sub[pos_sub]=="undefined" || splited_sub[pos_sub]==null || splited_sub[pos_sub]=='') return;
		MM_swapImage('histo','',splited_sub[pos_sub],1);
		MM_swapImage('histo','',nav_main[pos_main],1);//new
		switch_button();//new
		if (splited_sub[0]=='') {//new
			MM_swapImage('expl_back','','imgs/nav_empty.gif',1);//new
		} else {//new
			MM_swapImage('expl_back','','imgs/nav_n_02.gif',1);//new
		}
	} else {
		pos_main+=1;
		if (pos_main>nav_main.length-1) pos_main=0;
		splited_sub=nav_sub[pos_main].split(",");
		if (splited_sub[0]=='' && pos_main==0) {
			MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
		} else {
   			MM_swapImage('expl_back','','imgs/nav_n_02.gif',1);
		}
		MM_swapImage('histo','',nav_main[pos_main],1);
	}
	messages3[0]='<font face="arial,helvetica,sans-serif" size="2" color="#000000"><b>('+(pos_main+1)+' of '+nav_main.length+')</b></font>';

}
}

function switch_out() {
if (stat){
   splited_sub=nav_sub[pos_main].split(",");
	if (splited_sub[0]=='') {
		MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
	} else {
   		MM_swapImage('expl_back','','imgs/nav_n_04.gif',1);
	}	
} else {
	splited_sub=nav_sub[pos_main].split(",");
	if (splited_sub[0]=='') {
		MM_swapImage('expl_back','','imgs/nav_empty.gif',1);
	} else {
		MM_swapImage('expl_back','','imgs/nav_n_02.gif',1);
	}
}
}

function setsearch() {
for (i=0;i<document.links.length;i++) {
	if (document.links[i].href.indexOf("javascript:")==-1 && document.links[i].href.indexOf("#")==-1)
		document.links[i].href=document.links[i].href+"?t="+t+"&n="+n+"&m="+m+"&a="+a;
}

/*if (bw.ns6) {
	evnt=document.getElementById('object');
	if (evnt) {
		css=evnt.style;
		if (css.marginTop=="" || css.marginTop==null || css.marginTop=="undefined") css.marginTop=-170;
	}
	evnt=document.getElementById('object2');
	if (evnt) {
		css=evnt.style;
		if (css.marginTop=="" || css.marginTop==null || css.marginTop=="undefined") css.marginTop=-185;
	}
}*/
}

function settnmlink(site) {
location.href=site+'_'+tdata[t].t+'.html?t='+t+'&n='+n+'&m='+m+'&a='+a;
}

function getdocname() {
/*name_to_split=window.location.href;
name_start=name_to_split.lastIndexOf("/");
name_end=name_to_split.indexOf("?");
if (name_end==-1) name_end=name_to_split.length;
thesite = name_to_split.substring(name_start+1,name_end);*/

if (a=='t') return tdata[t].site;
if (a=='n') return ndata[n].site;
if (a=='m') return mdata[m].site;
}

function tnmchange(active) {
var tlist = document.tform.tselect;
var nlist = document.nform.nselect;
var mlist = document.mform.mselect;
	
t = tlist.options[tlist.selectedIndex].value;
n = nlist.options[nlist.selectedIndex].value;
m = mlist.options[mlist.selectedIndex].value;
a = active;	
doc=getdocname();
self.location.href=doc+"?t="+t+"&n="+n+"&m="+m+"&a="+a;
}

function checkprobable() {
ret=false;
for (i=0;i<udata.length;i++) {
	if (udata[i].t==t && udata[i].n==n && udata[i].m==m) {
		ret=true;
		break;
	}
}
return ret;
}

function buildtnmtext() {
atext='<p class="box"><b>TNM-Classification according to the  UICC (1997/2002)</b><br><br>';
atext=atext+tdata[t].desc+'<br><br>';
atext=atext+ndata[n].desc+'<br><br>';
atext=atext+mdata[m].desc+'</p>';
if (checkprobable()) {
	atext=atext+'<p class="box"><u>Annotation:</u> In the selected T-Stage, lymphatic and/or distant metastases are not likely to be found.</p>';
}
messages[1]=atext;
}

function buildlist() {
var tlist = document.tform.tselect;
for (i=0;i<tlist.options.length; i++) {
	tlist.options[i]=null;
}	
for (i=0;i<tdata.length; i++) {
	tlist.options[i]=new Option(tdata[i].t,i); 
	if (t==i) tlist.options[i].selected=true;
}
var nlist = document.nform.nselect;
for (i=0;i<nlist.options.length; i++) {
	nlist.options[i]=null;
}
if (t==0 || t==1) {
	nlist.options[0]=new Option(ndata[1].n,1); 
	nlist.options[0].selected=true;
} else {	
	for (i=0;i<ndata.length; i++) {
		nlist.options[i]=new Option(ndata[i].n,i); 
		if (n==i) nlist.options[i].selected=true;
	}
}
var mlist = document.mform.mselect;
for (i=0;i<mlist.options.length; i++) {
	mlist.options[i]=null;
}
if (t==0 || t==1) {
	mlist.options[0]=new Option(mdata[1].m,1); 
	mlist.options[0].selected=true;
} else {	
	for (i=0;i<mdata.length; i++) {
		mlist.options[i]=new Option(mdata[i].m,i); 
		if (m==i) mlist.options[i].selected=true;
	}
}
buildtnmtext();
}
var passed = location.search.substring(1); 

function getParm(string,parm) {
    var startPos = string.indexOf(parm + "=");
    if (startPos > -1) {
        startPos = startPos + parm.length + 1;
        var endPos = string.indexOf("&",startPos);
        if (endPos == -1)
            endPos = string.length;
        return unescape(string.substring(startPos,endPos));
    }
    return '';
}
t = getParm(passed,"t");
n = getParm(passed,"n");
m = getParm(passed,"m");
a = getParm(passed,"a");
if (t==0 || t==1 || t=='') {
	n=1;m=1;
	if (t=='') t=1;
}
if (n=='')  n=1; 
if (m=='')  m=1;
if (a=='')  a='t';
function tumor(t,site,desc) {
	this.t=t;
	this.site=site;
	this.desc=desc;
}
function node(n,site,desc) {
	this.n=n;
	this.site=site;
	this.desc=desc;
}
function metastase(m,site,desc) {
	this.m=m;
	this.site=site;
	this.desc=desc;
}

function unprobable(t,n,m) {
	this.t=t;
	this.n=n;
	this.m=m;
}

var udata = new Array();
udata[udata.length] = new unprobable(2,2,1);
udata[udata.length] = new unprobable(2,2,2);
udata[udata.length] = new unprobable(2,3,1);
udata[udata.length] = new unprobable(2,3,2);
udata[udata.length] = new unprobable(2,4,1);
udata[udata.length] = new unprobable(2,4,2);
udata[udata.length] = new unprobable(4,2,1);
udata[udata.length] = new unprobable(4,2,2);
udata[udata.length] = new unprobable(4,3,1);
udata[udata.length] = new unprobable(4,3,2);
udata[udata.length] = new unprobable(4,4,1);
udata[udata.length] = new unprobable(4,4,2);
udata[udata.length] = new unprobable(5,2,1);
udata[udata.length] = new unprobable(5,2,2);
udata[udata.length] = new unprobable(5,3,1);
udata[udata.length] = new unprobable(5,3,2);
udata[udata.length] = new unprobable(5,4,1);
udata[udata.length] = new unprobable(5,4,2);

var tdata = new Array();
tdata[tdata.length] = new tumor('pTX',sitelist[0]+'_pTX.html','<b>pTx:</b> Primary tumor cannot be assessed');
tdata[tdata.length] = new tumor('pT0',sitelist[0]+'_pT0.html','<b>pT0:</b> No evidence of primary tumor');
tdata[tdata.length] = new tumor('pTa',sitelist[0]+'_pTa.html','<b>pTa:</b> Non-invasive papillary carcinoma<br><br>Stage Ta tumors have an exophytic growing part of papillary ("fingerlike") configuration and an endophytic growing part, restricted to the urothelium (mucous coat).');
tdata[tdata.length] = new tumor('pTiS',sitelist[0]+'_pTis.html','<b>pTiS:</b> Carcinoma in Situ (Cis) "flat tumor"<br><br>The Carcinoma in Situ (Cis) has a flat non papillary configuration and is confined to the urothelium (mucous coat). A Carcinoma in Situ (Cis) might be local or diffuse, it can stand alone or may appear in combination with papillary tumors. The Carcinoma in Situ (Cis) might be visible as reddened, velvety, slightly elevated mucosa, or it may sometimes not be visible at all.');
tdata[tdata.length] = new tumor('pT1',sitelist[0]+'_pT1.html','<b>pT1:</b> Tumor invades subepithelial connective tissue<br><br>Stage T1 tumors are generating from the urothelium (mucous coat) and penetrate its basal cell layer and invades the submucous connective tissue (Lamina propria), not yet affecting the muscular layer (Tunica muscularis).');
//tdata[tdata.length] = new tumor('pT2',sitelist[0]+'_pT2.html','<u>pT2:</u> tumor invades muscle<br><br>The muscle-invading pT2 tumors are subdivided in pT2a and pT2b. Tumors staged pT2a only affecting the inner half of the muscular layer (Tunica muscularis). Tumors staged pT2b invade the outer half of the muscular layer as well.');
tdata[tdata.length] = new tumor('pT2a',sitelist[0]+'_pT2a.html','<b>pT2a:</b> Tumor invades superficial muscle (inner half)<br><br>The muscle-invading pT2 tumors are subdivided in pT2a and pT2b. Tumors staged pT2a only affecting the inner half of the muscular layer (Tunica muscularis). Tumors staged pT2b invade the outer half of the muscular layer as well.');
tdata[tdata.length] = new tumor('pT2b',sitelist[0]+'_pT2b.html','<b>pT2b:</b> Tumor invades deep muscle (outer half)<br><br>The muscle-invading pT2 tumors are subdivided in pT2a and pT2b. Tumors staged pT2a only affecting the inner half of the muscular layer (Tunica muscularis). Tumors staged pT2b invade the outer half of the muscular layer as well.');
//tdata[tdata.length] = new tumor('pT3',sitelist[0]+'_pT3.html','<u>pT3:</u> tumor invades perivesical tissue<br><br>An invasion of the perivesical space is denoted as pT3. There will be a further subdivision in pT3a and pT3b with pT3a being a tumor only microscopically invading the perivesical space, while the pT3b tumor can be detected as an extravesical mass.');
tdata[tdata.length] = new tumor('pT3a',sitelist[0]+'_pT3a.html','<b>pT3a:</b> Tumor invades perivesical tissue microscopically<br><br>An invasion of the perivesical space is denoted as pT3. There will be a further subdivision in pT3a and pT3b with pT3a being a tumor only microscopically invading the perivesical space, while the pT3b tumor can be detected as an extravesical mass.');
tdata[tdata.length] = new tumor('pT3b',sitelist[0]+'_pT3b.html','<b>pT3b:</b> Tumor invades perivesical tissue macroscopically (extravesical mass)<br><br>An invasion of the perivesical space is denoted as pT3. There will be a further subdivision in pT3a and pT3b with pT3a being a tumor only microscopically invading the perivesical space, while the pT3b tumor can be detected as an extravesical mass.');
//tdata[tdata.length] = new tumor('pT4',sitelist[0]+'_pT4.html','<u>pT4:</u> Tumor invades any of the following: prostate, uterus, vagina, pelvic wall, or abdominal wall.<br><br>A tumor infiltrating neighbouring structures is denoted as pT4, with further subdivisions being pT4a and pT4b. A pT4a tumor invades the prostate, uterus or vagina. A pT4b tumor is fixed to the pelvic wall and/or to the abdominal wall.');
tdata[tdata.length] = new tumor('pT4a',sitelist[0]+'_pT4a.html','<b>pT4a:</b> Tumor invades the prostate, uterus, vagina<br><br>A tumor infiltrating neighbouring structures is denoted as pT4, with further subdivisions being pT4a and pT4b. A pT4a tumor invades the prostate, uterus or vagina. A pT4b tumor is fixed to the pelvic wall and/or to the abdominal wall. ');
tdata[tdata.length] = new tumor('pT4b',sitelist[0]+'_pT4b.html','<b>pT4b:</b> Tumor invades the pelvic wall, abdominal wall<br><br>A tumor infiltrating neighbouring structures is denoted as pT4, with further subdivisions being pT4a and pT4b. A pT4a tumor invades the prostate, uterus or vagina. A pT4b tumor is fixed to the pelvic wall and/or to the abdominal wall.');

var ndata = new Array();
ndata[ndata.length] = new node('NX ',sitelist[0]+'_NX.html','<b>NX:</b> Regional lymph nodes cannot be assessed');
ndata[ndata.length] = new node('N0 ',sitelist[0]+'_N0.html','<b>N0:</b> No regional lymph node metastasis');
ndata[ndata.length] = new node('N1 ',sitelist[0]+'_N1.html','<b>N1:</b> Metastasis in a single lymph node, 2 cm or less in greatest dimension');
ndata[ndata.length] = new node('N2 ',sitelist[0]+'_N2.html','<b>N2:</b> Metastasis in a single lymph node, more than 2 cm but not more than 5 cm in greatest dimension; or multiple lymph nodes, none more than 5 cm in greatest dimension');
ndata[ndata.length] = new node('N3 ',sitelist[0]+'_N3.html','<b>N3:</b> Metastasis in a lymph node more than 5 cm in greatest dimension');

var mdata = new Array();
mdata[mdata.length] = new metastase('MX ',sitelist[0]+'_MX.html','<b>MX:</b> Distant metastasis cannot be assessed<br><br><br><br><br><br><br><br><br><br>');
mdata[mdata.length] = new metastase('M0 ',sitelist[0]+'_M0.html','<b>M0:</b> No distant metastasis<br><br><br><br><br><br><br><br><br><br><br><br><br><br>');
mdata[mdata.length] = new metastase('M1 ',sitelist[0]+'_M1.html','<b>M1:</b> Distant metastasis<br><br><br><br><br><br><br><br><br><br>');

if (document.layers) document.writeln('<link href="../css/bladder_ns4.css" rel="stylesheet" type="text/css">');
  else document.writeln('<link href="../css/bladder.css" rel="stylesheet" type="text/css">');
