// JavaScript Document
// script for Framing FAQ Help page tab controls

function writefrFAQTabs(){
if(document.getElementById){
document.write('<div id="frfaqtabs"><a href="#" onClick="setTabs(\'g\')" onMouseOver="hltTabs(\'frfaqgentab\')" onMouseOut="unhltTabs(\'frfaqgentab\')"><img src="..\/images\/bt_frfaqgen_on.gif" alt="General " name="frfaqgentab" width="70" height="20" border="0" id="frfaqgentab"><\/a><a href="#" onClick="setTabs(\'e\')" onMouseOver="hltTabs(\'frfaqexhtab\')" onMouseOut="unhltTabs(\'frfaqexhtab\')"><img src="..\/images\/bt_frfaqexh_off.gif" alt="Exhibition" name="frfaqexhtab" width="82" height="20" border="0" id="frfaqexhtab"><\/a><a href="#" onClick="setTabs(\'p\')" onMouseOver="hltTabs(\'frfaqportab\')" onMouseOut="unhltTabs(\'frfaqportab\')"><img src="..\/images\/bt_frfaqpor_off.gif" alt="Portfolio" name="frfaqportab" width="73" height="20" border="0" id="frfaqportab"><\/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 showItx(what,stat){
var owhich=what;
obj=document.getElementById(owhich).style.display;
if (obj=="block") obj="none";
else if (obj=="" || obj=="none") obj="block";		
document.getElementById(owhich).style.display=obj;
}
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('frfaqgentab','','../images/bt_frfaqgen_off.gif',1);showIt('faqgene','hide');}
else if (GenState==1) {MM_swapImage('frfaqgentab','','../images/bt_frfaqgen_on.gif',1);showIt('faqgene','show');}
else if (GenState==2) {showIt('frfaqgentab','hide');}
if 	(ExhState==0) {MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_off.gif',1);showIt('faqexhi','hide');}
else if (ExhState==1) {MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_on.gif',1);showIt('faqexhi','show');}
else if (ExhState==2) {showIt('frfaqexhtab','hide');}
if 	(PorState==0) {MM_swapImage('frfaqportab','','../images/bt_frfaqpor_off.gif',1);showIt('faqport','hide');}
else if (PorState==1) {MM_swapImage('frfaqportab','','../images/bt_frfaqpor_on.gif',1);showIt('faqport','show');}
else if (PorState==2) {showIt('frfaqportab','hide');}
}
}

function setTabs(wOn) {
var actTab = wOn;
if (actTab =='g') {
  if (GenState !=2) {GenState=1;MM_swapImage('frfaqgentab','','../images/bt_frfaqgen_on.gif',1);showIt('faqgene','show');}
  if (ExhState !=2) {ExhState=0;MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_off.gif',1);showIt('faqexhi','hide');}
  if (PorState !=2) {PorState=0;MM_swapImage('frfaqportab','','../images/bt_frfaqpor_off.gif',1);showIt('faqport','hide');}

}
else if (actTab == 'e') {
  if (GenState !=2) {GenState=0;MM_swapImage('frfaqgentab','','../images/bt_frfaqgen_off.gif',1);showIt('faqgene','hide');}
  if (ExhState !=2) {ExhState=1;MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_on.gif',1);showIt('faqexhi','show');}
  if (PorState !=2) {PorState=0;MM_swapImage('frfaqportab','','../images/bt_frfaqpor_off.gif',1);showIt('faqport','hide');}

}
else if (actTab == 'p') {
  if (GenState !=2) {GenState=0;MM_swapImage('frfaqgentab','','../images/bt_frfaqgen_off.gif',1);showIt('faqgene','hide');}
  if (ExhState !=2) {ExhState=0;MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_off.gif',1);showIt('faqexhi','hide');}
  if (PorState !=2) {PorState=1;MM_swapImage('frfaqportab','','../images/bt_frfaqpor_on.gif',1);showIt('faqport','show');}

}
}

function hltTabs (wHlt) {
var imgID = wHlt;
if (imgID=='frfaqgentab'){MM_swapImage('frfaqgentab','','../images/bt_frfaqgen_h.gif',1);}
if (imgID=='frfaqexhtab'){MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_h.gif',1);}
if (imgID=='frfaqportab'){MM_swapImage('frfaqportab','','../images/bt_frfaqpor_h.gif',1);}
}

function unhltTabs (wHlt) {
var imgID = wHlt;
if (imgID=='frfaqgentab'){
  if (GenState==0){MM_swapImage('frfaqgentab','','../images/bt_frfaqgen_off.gif',1);}
  if (GenState==1){MM_swapImage('frfaqgentab','','../images/bt_frfaqgen_on.gif',1);}
}
if (imgID=='frfaqexhtab'){
  if (ExhState==0){MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_off.gif',1);}
  if (ExhState==1){MM_swapImage('frfaqexhtab','','../images/bt_frfaqexh_on.gif',1);}
}
if (imgID=='frfaqportab'){
  if (PorState==0){MM_swapImage('frfaqportab','','../images/bt_frfaqpor_off.gif',1);}
  if (PorState==1){MM_swapImage('frfaqportab','','../images/bt_frfaqpor_on.gif',1);}
}
}