// JavaScript Document

var activeLinkInfo = null;

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function setMainBackgroundImage(filename){
	var mainTableCell = new getObj('main');
	mainTableCell.style.backgroundImage = 'url(/images/faglar.gif)'
}

function switchVisibility(div){
	var divObj = new getObj(div);
	
	if (activeLinkInfo != null && activeLinkInfo != div){
		var oldDivObj = new getObj(activeLinkInfo);
		oldDivObj.obj.style.display = 'none';
	}
	
	if (divObj.obj.style.display == 'none'){
		divObj.obj.style.display = 'block';
		activeLinkInfo = div;
	}
	else{
		divObj.obj.style.display = 'none';
		activeLinkInfo = null;
	}
}