// JavaScript Document
// script for A-Z page tab controls
function writeeFAQTabs(){
if(document.getElementById){
document.write('<div id="faqtabs"><a href="#" onClick="setTabs(\'g\')" onMouseOver="hltTabs(\'faqgentab\')" onMouseOut="unhltTabs(\'faqgentab\')"><img src="..\/images\/bt_faqgen_off.gif" alt="General" name="faqgentab" width="75" height="17" border="0" id="faqgentab"><\/a><a href="#" onClick="setTabs(\'e\')" onMouseOver="hltTabs(\'faqexhtab\')" onMouseOut="unhltTabs(\'faqexhtab\')"><img src="..\/images\/bt_faqexh_on.gif" alt="Exhibition" name="faqexhtab" width="80" height="17" border="0" id="faqexhtab"><\/a><a href="#" onClick="setTabs(\'p\')" onMouseOver="hltTabs(\'faqportab\')" onMouseOut="unhltTabs(\'faqportab\')"><img src="..\/images\/bt_faqpor_off.gif" alt="Portfolio" name="faqportab" width="80" height="17" border="0" id="faqportab"><\/a><\/div>');}
}

function writepFAQTabs(){
if(document.getElementById){
document.write('<div id="faqtabs"><a href="#" onClick="setTabs(\'g\')" onMouseOver="hltTabs(\'faqgentab\')" onMouseOut="unhltTabs(\'faqgentab\')"><img src="..\/images\/bt_faqgen_off.gif" alt="General" name="faqgentab" width="75" height="17" border="0" id="faqgentab"><\/a><a href="#" onClick="setTabs(\'e\')" onMouseOver="hltTabs(\'faqexhtab\')" onMouseOut="unhltTabs(\'faqexhtab\')"><img src="..\/images\/bt_faqexh_off.gif" alt="Exhibition" name="faqexhtab" width="80" height="17" border="0" id="faqexhtab"><\/a><a href="#" onClick="setTabs(\'p\')" onMouseOver="hltTabs(\'faqportab\')" onMouseOut="unhltTabs(\'faqportab\')"><img src="..\/images\/bt_faqpor_on.gif" alt="Portfolio" name="faqportab" width="80" height="17" border="0" id="faqportab"><\/a><\/div>');}
}

function goTabs() {
var whichTab = window.location.hash;
if(whichTab==""){
  if (GenState !=2) {
	GenState="1";
  	if (ExhState !=2) {ExhState="0";}
  	if (PorState !=2) {PorState="0";}
  }
}
if(whichTab=="#g"){
  if (GenState !=2) {
	GenState="1";
  	if (ExhState !=2) {ExhState="0";}
  	if (PorState !=2) {PorState="0";}
  }
}
else if(whichTab=="#e"){
  if (ExhState !=2) {
	ExhState="1";
  	if (GenState !=2) {GenState="0";}
  	if (PorState !=2) {PorState="0";}
  }
}
else if(whichTab=="#p"){
  if (PorState !=2) {
	PorState="1";
  	if (GenState !=2) {GenState="0";}
  	if (ExhState !=2) {ExhState="0";}
  }
}
}

function showIt(what,stat){
var owhich=what;
var ostat=stat;
var obj="";
if (ostat=="hide") obj="none";
else if (ostat=="show") obj="block";		
document.getElementById(owhich).style.display=obj;
}

function initTabs() {
if(document.getElementById){
if 	(GenState==0) {MM_swapImage('faqgentab','','../images/bt_faqgen_off.gif',1);showIt('faqgene','hide');}
else if (GenState==1) {MM_swapImage('faqgentab','','../images/bt_faqgen_on.gif',1);showIt('faqgene','show');}
else if (GenState==2) {showIt('faqgentab','hide');}
if 	(ExhState==0) {MM_swapImage('faqexhtab','','../images/bt_faqexh_off.gif',1);showIt('faqexhi','hide');}
else if (ExhState==1) {MM_swapImage('faqexhtab','','../images/bt_faqexh_on.gif',1);showIt('faqexhi','show');}
else if (ExhState==2) {showIt('faqexhtab','hide');}
if 	(PorState==0) {MM_swapImage('faqportab','','../images/bt_faqpor_off.gif',1);showIt('faqport','hide');}
else if (PorState==1) {MM_swapImage('faqportab','','../images/bt_faqpor_on.gif',1);showIt('faqport','show');}
else if (PorState==2) {showIt('faqportab','hide');}
}
}

function setTabs(wOn) {
var actTab = wOn;
if (actTab =='g') {
  if (GenState !=2) {GenState=1;MM_swapImage('faqgentab','','../images/bt_faqgen_on.gif',1);showIt('faqgene','show');}
  if (ExhState !=2) {ExhState=0;MM_swapImage('faqexhtab','','../images/bt_faqexh_off.gif',1);showIt('faqexhi','hide');}
  if (PorState !=2) {PorState=0;MM_swapImage('faqportab','','../images/bt_faqpor_off.gif',1);showIt('faqport','hide');}

}
else if (actTab == 'e') {
  if (GenState !=2) {GenState=0;MM_swapImage('faqgentab','','../images/bt_faqgen_off.gif',1);showIt('faqgene','hide');}
  if (ExhState !=2) {ExhState=1;MM_swapImage('faqexhtab','','../images/bt_faqexh_on.gif',1);showIt('faqexhi','show');}
  if (PorState !=2) {PorState=0;MM_swapImage('faqportab','','../images/bt_faqpor_off.gif',1);showIt('faqport','hide');}

}
else if (actTab == 'p') {
  if (GenState !=2) {GenState=0;MM_swapImage('faqgentab','','../images/bt_faqgen_off.gif',1);showIt('faqgene','hide');}
  if (ExhState !=2) {ExhState=0;MM_swapImage('faqexhtab','','../images/bt_faqexh_off.gif',1);showIt('faqexhi','hide');}
  if (PorState !=2) {PorState=1;MM_swapImage('faqportab','','../images/bt_faqpor_on.gif',1);showIt('faqport','show');}

}
}

function hltTabs (wHlt) {
var imgID = wHlt;
if (imgID=='faqgentab'){MM_swapImage('faqgentab','','../images/bt_faqgen_h.gif',1);}
if (imgID=='faqexhtab'){MM_swapImage('faqexhtab','','../images/bt_faqexh_h.gif',1);}
if (imgID=='faqportab'){MM_swapImage('faqportab','','../images/bt_faqpor_h.gif',1);}
}

function unhltTabs (wHlt) {
var imgID = wHlt;
if (imgID=='faqgentab'){
  if (GenState==0){MM_swapImage('faqgentab','','../images/bt_faqgen_off.gif',1);}
  if (GenState==1){MM_swapImage('faqgentab','','../images/bt_faqgen_on.gif',1);}
}
if (imgID=='faqexhtab'){
  if (ExhState==0){MM_swapImage('faqexhtab','','../images/bt_faqexh_off.gif',1);}
  if (ExhState==1){MM_swapImage('faqexhtab','','../images/bt_faqexh_on.gif',1);}
}
if (imgID=='faqportab'){
  if (PorState==0){MM_swapImage('faqportab','','../images/bt_faqpor_off.gif',1);}
  if (PorState==1){MM_swapImage('faqportab','','../images/bt_faqpor_on.gif',1);}
}
}
