var Exchange = true;
var Sharepoint = false;
var products = new Array();
var headerImages = new Array();
var links = new Array();
headerImages['exchange'] = 'images/background/header/exchange.jpg';
headerImages['sharepoint'] = 'images/background/header/sharepoint.jpg';

links['exchange'] = new Array();
links['sharepoint'] = new Array();
//------Type links HERE-----------
//------exchange-----------------
links['exchange'][1] = 'exchange-hosting.html';
links['exchange'][2] = 'exchange-hosting-ayrintilar.html';
links['exchange'][3] = 'exchange-hosting-planlar.html';
//-------sharepoint--------------
links['sharepoint'][1] = 'sharepoint-hosting.html';
links['sharepoint'][2] = 'sharepoint-hosting.html';
links['sharepoint'][3] = 'sharepoint-hosting-planlar.html';
//---------------------------------




var preload = new Array();

window.onload = dropList;
function dropList(){
  var root = document.getElementById('Drop');
  var list = document.getElementById('DropListSmall');
    
  
  var listRoot = document.getElementById('DropRoot');
  var Root = document.getElementById('DropMenu');
  
  if(navigator.appName == "Microsoft Internet Explorer"){
	  
    listRoot.onmouseover = function(){ Root.style.display = 'block';  }
    listRoot.onmouseout = function(){ Root.style.display = 'none';}
	root.onmouseover = function(){ list.style.visibility = 'visible';  }
    root.onmouseout = function(){ list.style.visibility = 'hidden';}    
  
  }
  products['exchange'] = document.getElementById('ExchangeLink');
  products['sharepoint'] = document.getElementById('SharepointLink');
  
  products['exchange'].onmouseover = function(){showProduct('exchange')};
  products['sharepoint'].onmouseover = function(){showProduct('sharepoint')};
  
  preloadImages();  
}

function preloadImages(){
  for(i in headerImages){
     preload[i] = new Image();
     preload[i].src = headerImages[i];
  }
  
  
}


function showProduct(product){
  var l1 = document.getElementById('link1');
  var l2 = document.getElementById('link2');
  var l3 = document.getElementById('link3');
 
  switch(product){
    case 'exchange':
      if(!Exchange){
         document.getElementById('Sharepoint').className = 'shapeInactive';
         document.getElementById('Exchange').className = 'shapeActive';
         document.getElementById('Product').src = preload['exchange'].src; 
         document.getElementById('ProductText').className = 'bottomTextExchange';
         document.getElementById('ProductHeader').className = 'microsoft-exchange';
         l1.href = links['exchange'][1];
         l2.href = links['exchange'][2];
         l3.href = links['exchange'][3];
         Exchange = true;
         Sharepoint = false;
      }
      break;
    case 'sharepoint':
      if(!Sharepoint){
       document.getElementById('Sharepoint').className = 'shapeActive';
       document.getElementById('Exchange').className = 'shapeInactive';
       document.getElementById('Product').src = preload['sharepoint'].src; 
       document.getElementById('ProductText').className = 'bottomTextSharepoint';
       document.getElementById('ProductHeader').className = 'microsoft-sharepoint';
       l1.href = links['sharepoint'][1];
       l2.href = links['sharepoint'][2];
       l3.href = links['sharepoint'][3];
       Exchange = false;
       Sharepoint = true;
      }
     break;
  }
}



