// JavaScript Document

var currentLink=99;

var bt1= new Image();
bt1.src="diagram/ams_off.gif";
var bt2= new Image();
bt2.src="diagram/crm_off.gif";
var bt3= new Image();
bt3.src="diagram/email_marketing_off.gif";
var bt4= new Image();
bt4.src="diagram/gp_inventory_off.gif";
var bt5= new Image();
bt5.src="diagram/great_plains_off.gif";
var bt6= new Image();
bt6.src="diagram/internet_off.gif";
var bt7= new Image();
bt7.src="diagram/micros_pos_off.gif";
var bt8= new Image();
bt8.src="diagram/opentee_off.gif";
var bt9= new Image();
bt9.src="diagram/sales_contact_mngm_off.gif";
var bt10= new Image();
bt10.src="diagram/scorecard_off.gif";
var bt11= new Image();
bt11.src="diagram/stromberg_off.gif";
var bt12= new Image();
bt12.src="diagram/stromberg_off.gif";

    

var bt1_on= new Image();
bt1_on.src="diagram/ams_on.gif";
var bt2_on= new Image();
bt2_on.src="diagram/crm_on.gif";
var bt3_on= new Image()
bt3_on.src="diagram/email_marketing_on.gif";
var bt4_on= new Image()
bt4_on.src="diagram/gp_inventory_on.gif";
var bt5_on= new Image();
bt5_on.src="diagram/great_plains_on.gif";
var bt6_on= new Image();
bt6_on.src="diagram/internet_on.gif";
var bt7_on= new Image();
bt7_on.src="diagram/micros_pos_on.gif";
var bt8_on= new Image();
bt8_on.src="diagram/opentee_on.gif";
var bt9_on= new Image();
bt9_on.src="diagram/sales_contact_mngm_on.gif";
var bt10_on= new Image();
bt10_on.src="diagram/scorecard_on.gif";
var bt11_on= new Image();
bt11_on.src="diagram/stromberg_on.gif";
var bt12_on= new Image();
bt12_on.src="diagram/stromberg_on.gif";
    

function changeBtn(n,over)
 {

     if(n!=currentLink)
     {
      if (over==0)
       {
		   
		 if (n==1) {document.Bt1.src=bt1.src}
         if (n==2) {document.Bt2.src=bt2.src}
         if (n==3) {document.Bt3.src=bt3.src}
         if (n==4) {document.Bt4.src=bt4.src}
         if (n==5) {document.Bt5.src=bt5.src}
         if (n==6) {document.Bt6.src=bt6.src}
         if (n==7) {document.Bt7.src=bt7.src}
         if (n==8) {document.Bt8.src=bt8.src}
		 if (n==9) {document.Bt9.src=bt9.src}
         if (n==10) {document.Bt10.src=bt10.src}
         if (n==11) {document.Bt11.src=bt11.src}
if (n==12) {document.Bt12.src=bt12.src}
       }  
       if (over==1)
       {
		 if (n==1) {document.Bt1.src=bt1_on.src}
         if (n==2) {document.Bt2.src=bt2_on.src}
         if (n==3) {document.Bt3.src=bt3_on.src}
         if (n==4) {document.Bt4.src=bt4_on.src}
         if (n==5) {document.Bt5.src=bt5_on.src}
         if (n==6) {document.Bt6.src=bt6_on.src}
         if (n==7) {document.Bt7.src=bt7_on.src}
         if (n==8) {document.Bt8.src=bt8_on.src}
		 if (n==9) {document.Bt9.src=bt9_on.src}
         if (n==10) {document.Bt10.src=bt10_on.src}
         if (n==11) {document.Bt11.src=bt11_on.src}
if (n==12) {document.Bt12.src=bt12_on.src}
       }  
     }
                          
 }
 
  function activeBtn(m)
 {
   
         currentLink=m
          
         if (m==0) {document.Bt0.src=bt0_on.src}
         else {document.Bt0.src=bt0.src}
		 if (m==1) {document.Bt1.src=bt1_on.src}
         else {document.Bt1.src=bt1.src}
         if (m==2) {document.Bt2.src=bt2_on.src}
         else {document.Bt2.src=bt2.src}
         if (m==3) {document.Bt3.src=bt3_on.src}
         else {document.Bt3.src=bt3.src}
         if (m==4) {document.Bt4.src=bt4_on.src}
         else {document.Bt4.src=bt4.src}
         if (m==5) {document.Bt5.src=bt5_on.src}
         else {document.Bt5.src=bt5.src}
         if (m==6) {document.Bt6.src=bt6_on.src}
         else {document.Bt6.src=bt6.src}
         if (m==7) {document.Bt7.src=bt7_on.src}
         else {document.Bt7.src=bt7.src}
         if (m==8) {document.Bt8.src=bt8_on.src}
         else {document.Bt8.src=bt8.src}
		 if (m==9) {document.Bt9.src=bt9_on.src}
         else {document.Bt9.src=bt9.src}
         if (m==10) {document.Bt10.src=bt10_on.src}
         else {document.Bt10.src=bt10.src}
         if (m==11) {document.Bt11.src=bt11_on.src}
         else {document.Bt11.src=bt11.src}
 if (m==12) {document.Bt12.src=bt12_on.src}
 else {document.Bt12.src=bt12.src}
    
  }
 

var currentLayer = '';
var currentMenu = '';
var currentClient = 'client1';

function showMenu(layer, left, top) {
	if(layer == currentMenu)
	return;
	
 if (document.layers) {
	    if(currentMenu != '')
			document.layers[currentMenu].visibility='hide';
			 
	 	var l = document.layers[layer];
        l.visibility='show';
		l.left = (window.innerWidth / 2) + left;
	    l.top = top;
   }
   else if (document.all) {
	   
	  if(currentMenu != '') 
      	document.all(currentMenu).style.visibility='hidden';
	  
	  var s = document.all(layer).style;
      s.visibility='visible';
	  s.pixelLeft = (document.body.clientWidth / 2) + left;
	  s.pixelTop = top;
   }
   else if (document.getElementById) {
	  if(currentMenu != '')
	      document.getElementById(currentMenu).style.visibility='hidden';
		  
      var s = document.getElementById(layer).style;
	  s.left = (window.innerWidth / 2) + left - 8 + 'px';
	  s.top = top + 'px';
	  s.visibility='visible';
   }
   currentMenu = layer;
}

function hideMenu(layer) {
 if (document.layers) {
         document.layers[layer].visibility='hide';
	     
   }
   else if (document.all) {
   
      document.all(layer).style.visibility='hidden';
   
   }
   else if (document.getElementById) {
      document.getElementById(layer).style.visibility='hidden';
	  
	}
 currentMenu = ''
}

function setCurrentLayer(layer) {
	
 if(layer == currentLayer)
	return;
	
 if (document.layers) {
         document.layers[layer].visibility='show';
		
	     if(currentLayer != '')
		 {
			 document.layers[currentLayer].visibility='hide';
			 
		 }
   }
   else if (document.all) {
      document.all(layer).style.visibility='visible';
	  
	  if(currentLayer != '')
	  {
      	document.all(currentLayer).style.visibility='hidden';
	  }
	  
   }
   else if (document.getElementById) {
      document.getElementById(layer).style.visibility='visible';
	  if(currentLayer != '')
	  {
		  document.getElementById(currentLayer).style.visibility='hidden';
  		  
	  }
   }
   currentLayer = layer;
}

function hideCurrentLayer(layer) {
	
 if (document.layers) {
         document.layers[layer].visibility='hide';
	     
   }
   else if (document.all)  {
      document.all(layer).style.visibility='hidden';
   
   }
   else if (document.getElementById) {
      document.getElementById(layer).style.visibility='hidden';
	  
	}
 currentLayer = '';

}

function amouseover(n2,color)
  {
    var elem2 = document.all.item(n2)
    elem2.style.background =color
  }
  
function clientInfo(n)
  {
	  
   var  id = 'client' + n
   
   setCurrentLayer(id)
   currentClient = id;
  }

