
//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display]:
var initialtab=[1, "sc1"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes

////////Stop editting////////////////

var previoustab=""

if (turntosingle==1) document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){
  if (disabletablinks==1) aobject.onclick=new Function("return false")
  if (document.getElementById){
    highlighttab(aobject)
    if (turntosingle==0){
      if (previoustab!="") document.getElementById(previoustab).style.display="none"
      document.getElementById(cid).style.display="block"
      previoustab=cid
    }
  }
}

function highlighttab(aobject){
  if (typeof tabobjlinks=="undefined") collecttablinks()
  for (i=0; i<tabobjlinks.length; i++) tabobjlinks[i].className=""
  aobject.className="current"
}

function collecttablinks(){
  var tabobj=document.getElementById("tablist")
  tabobjlinks=tabobj.getElementsByTagName("A")
}

function do_onload(){
  collecttablinks()
  expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

if (window.addEventListener) window.addEventListener("load", do_onload, false)
else if (window.attachEvent) window.attachEvent("onload", do_onload)
else if (document.getElementById) window.onload=do_onload

//////Tabs on new home page//////

function FP_changeProp() {//v1.0
 var args=arguments,d=document,i,j,id=args[0],o=FP_getObjectByID(id),s,ao,v,x;
 d.$cpe=new Array(); if(o) for(i=2; i<args.length; i+=2) { v=args[i+1]; s="o"; 
 ao=args[i].split("."); for(j=0; j<ao.length; j++) { s+="."+ao[j]; if(null==eval(s)){ 
  s=null; break; } } x=new Object; x.o=o; x.n=new Array(); x.v=new Array();
 x.n[x.n.length]=s; eval("x.v[x.v.length]="+s); d.$cpe[d.$cpe.length]=x;
 if(s) eval(s+"=v"); }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}

function FP_changePropRestore() {//v1.0
 var d=document,x; 
 if(d.$cpe) { //We have a problem with the $cpe, it is not recognised.
   for(i=0; i<d.$cpe.length; i++) { 
     x=d.$cpe[i];
     if(x.v=="") x.v=""; 
     eval("x."+x.n+"=x.v"); 
   } 
   d.$cpe=null; 
 }
}
function expandcontent1() {
  expandcontent('table1',this)
  td1.background='';
  td2.background='img/qxp/Main/TabNavList.png';
  td3.background='';
  td4.background='';
  td5.background='';
  td6.background='';
  td7.background='';
  td8.background='';
  News.style.fontWeight='bold';
  News.style.color='#007531';
  Benefits.style.fontWeight='';
  Benefits.style.color='';
  Highlights.style.fontWeight='';
  Highlights.style.color='';
  DYK.style.fontWeight='';
  DYK.style.color='';
  Science.style.fontWeight='';
  Science.style.color='';
  Research.style.fontWeight='';
  Research.style.color='';
  Consultants.style.fontWeight='';
  Consultants.style.color='';
  ContactUs.style.fontWeight='';
  ContactUs.style.color='';
}
function expandcontent2() {
  expandcontent('table2',this)
  td1.background='img/qxp/Main/TabNavList.png';
  td2.background='';
  td3.background='';
  td4.background='';
  td5.background='';
  td6.background='';
  td7.background='';
  td8.background='';
  News.style.fontWeight='';
  News.style.color='';
  Benefits.style.fontWeight='';
  Benefits.style.color='';
  Highlights.style.fontWeight='bold';
  Highlights.style.color='#007531';
  DYK.style.fontWeight='';
  DYK.style.color='';
  Science.style.fontWeight='';
  Science.style.color='';
  Research.style.fontWeight='';
  Research.style.color='';
  Consultants.style.fontWeight='';
  Consultants.style.color='';
  ContactUs.style.fontWeight='';
  ContactUs.style.color='';
}
function expandcontent3() {
  expandcontent('table3',this)
  td1.background='';
  td2.background='';
  td3.background='img/qxp/Main/TabNavList.png';
  td4.background='';
  td5.background='';
  td6.background='';
  td7.background='';
  td8.background='';
  News.style.fontWeight='';
  News.style.color='';
  Benefits.style.fontWeight='';
  Benefits.style.color='';
  Highlights.style.fontWeight='';
  Highlights.style.color='';
  DYK.style.fontWeight='bold';
  DYK.style.color='#007531';
  Science.style.fontWeight='';
  Science.style.color='';
  Research.style.fontWeight='';
  Research.style.color='';
  Consultants.style.fontWeight='';
  Consultants.style.color='';
  ContactUs.style.fontWeight='';
  ContactUs.style.color='';
}
function expandcontent4() {
  expandcontent('table4',this)
  td1.background='';
  td2.background='';
  td3.background='';
  td4.background='img/qxp/Main/TabNavList.png';
  td5.background='';
  td6.background='';
  td7.background='';
  td8.background='';
  News.style.fontWeight='';
  News.style.color='';
  Benefits.style.fontWeight='';
  Benefits.style.color='';
  Highlights.style.fontWeight='';
  Highlights.style.color='';
  DYK.style.fontWeight='';
  DYK.style.color='';
  Science.style.fontWeight='bold';
  Science.style.color='#007531';
  Research.style.fontWeight='';
  Research.style.color='';
  Consultants.style.fontWeight='';
  Consultants.style.color='';
  ContactUs.style.fontWeight='';
  ContactUs.style.color='';
}
function expandcontent5() {
  expandcontent('table5',this)
  td1.background='';
  td2.background='';
  td3.background='';
  td4.background='';
  td5.background='img/qxp/Main/TabNavList.png';
  td6.background='';
  td7.background='';
  td8.background='';
  News.style.fontWeight='';
  News.style.color='';
  Benefits.style.fontWeight='';
  Benefits.style.color='';
  Highlights.style.fontWeight='';
  Highlights.style.color='';
  DYK.style.fontWeight='';
  DYK.style.color='';
  Science.style.fontWeight='';
  Science.style.color='';
  Research.style.fontWeight='bold';
  Research.style.color='#007531';
  Consultants.style.fontWeight='';
  Consultants.style.color='';
  ContactUs.style.fontWeight='';
  ContactUs.style.color='';
}
function expandcontent6() {
  expandcontent('table6',this)
  td1.background='';
  td2.background='';
  td3.background='';
  td4.background='';
  td5.background='';
  td6.background='img/qxp/Main/TabNavList.png';
  td7.background='';
  td8.background='';
  News.style.fontWeight='';
  News.style.color='';
  Benefits.style.fontWeight='';
  Benefits.style.color='';
  Highlights.style.fontWeight='';
  Highlights.style.color='';
  DYK.style.fontWeight='';
  DYK.style.color='';
  Science.style.fontWeight='';
  Science.style.color='';
  Research.style.fontWeight='';
  Research.style.color='';
  Consultants.style.fontWeight='bold';
  Consultants.style.color='#007531';
  ContactUs.style.fontWeight='';
  ContactUs.style.color='';
}
function expandcontent7() {
  expandcontent('table7',this)
  td1.background='';
  td2.background='';
  td3.background='';
  td4.background='';
  td5.background='';
  td6.background='';
  td7.background='img/qxp/Main/TabNavList.png';
  td8.background='';
  News.style.fontWeight='';
  News.style.color='';
  Benefits.style.fontWeight='';
  Benefits.style.color='';
  Highlights.style.fontWeight='';
  Highlights.style.color='';
  DYK.style.fontWeight='';
  DYK.style.color='';
  Science.style.fontWeight='';
  Science.style.color='';
  Research.style.fontWeight='';
  Research.style.color='';
  Consultants.style.fontWeight='';
  Consultants.style.color='';
  ContactUs.style.fontWeight='bold';
  ContactUs.style.color='#007531';
}
function expandcontent8() {
  expandcontent('table8',this)
  td1.background='';
  td2.background='';
  td3.background='';
  td4.background='';
  td5.background='';
  td6.background='';
  td7.background='';
  td8.background='img/qxp/Main/TabNavList.png';
  News.style.fontWeight='';
  News.style.color='';
  Benefits.style.fontWeight='bold';
  Benefits.style.color='#007531';
  Highlights.style.fontWeight='';
  Highlights.style.color='';
  DYK.style.fontWeight='';
  DYK.style.color='';
  Science.style.fontWeight='';
  Science.style.color='';
  Research.style.fontWeight='';
  Research.style.color='';
  Consultants.style.fontWeight='';
  Consultants.style.color='';
  ContactUs.style.fontWeight='';
  ContactUs.style.color='';
}

//////end home page tabs//////