// Tabs JavaScript Document

function SelectTab(p_num) {
	changeProp("tab-content1","","style.display","none");
	changeProp("tab-content2","","style.display","none");
	changeProp("tab-content3","","style.display","none");
	changeProp("tab-content4","","style.display","none");
	changeProp("tab-content5","","style.display","none");
	changeProp("tab-content6","","style.display","none");
	changeProp("tab-content7","","style.display","none");
	changeProp("tab-content8","","style.display","none");
	changeProp("tab-content9","","style.display","none");
	changeProp("tab-content10","","style.display","none");
	changeProp("tab-content11","","style.display","none");

	changeProp("tab1","","className","tab");
	changeProp("tab2","","className","tab");
	changeProp("tab3","","className","tab");
	changeProp("tab4","","className","tab");
	changeProp("tab5","","className","tab");
	changeProp("tab6","","className","tab");
	changeProp("tab7","","className","tab");
	changeProp("tab8","","className","tab");
	changeProp("tab9","","className","tab");
	changeProp("tab10","","className","tab");
	changeProp("tab11","","className","tab");

	changeProp("tab-content"+p_num,"","style.display","block");	
	changeProp("tab"+p_num,"","className","tab-header active");
}

function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

function findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
