﻿ tabnames=["tab1","tab2","tab3"];
  
 function switch_to(thisname)
 {
  
  window._gaq=window._gaq || [];
  try
  {
   valid=false;
   for (i in tabnames)
   {valid= valid || thisname==tabnames[i]}
   if(!valid) throw new exception("Tab ID is not among defined possibilities");
   
   for (i in tabnames)
   {
    document.getElementById(tabnames[i]+"_tab").setAttribute("class","tab");
		 if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById(tabnames[i]+"_tab").style.borderColor="#303060 #303060 #303060 #303060";		  document.getElementById(tabnames[i]+"_tab").style.backgroundImage="url('/img/mini_inv.png')";}
   }
   document.getElementById(thisname+"_tab").setAttribute("class","tab active");
		if(navigator.appName=="Microsoft Internet Explorer"){document.getElementById(thisname+"_tab").style.borderColor="#303060 #303060 #f2d6b1 #303060";document.getElementById(thisname+"_tab").style.backgroundImage="url('/img/mini_activ.png')";}
   
   for (i in tabnames)
   {
    document.getElementById(tabnames[i]+"_main").style.display="none";
   }
   document.getElementById(thisname+"_main").style.display="block";
  }
  catch (ex) {_gaq.push(["_trackEvent","Error",ex]);return false;} //Add GA Event tracking
  var l=document.location;
  _gaq.push(["_trackPageview",l.pathname+l.search+"#"+thisname]);
  return false;
 }
 
 function popupimage(link_object,ev)
 {
  ev=window.event?window.event:ev;
  if(link_object.href && !ev.shiftKey && !ev.ctrlKey)
  {
   window.open (link_object.href, "mywindow","location=0,status=0,width=820,height=680");
   return false;
  } 
  return true;
 }
