function swapBringTop() {
  if (document.getElementById('B2topTxt').innerHTML != "bring to top")
   document.getElementById('B2topTxt').innerHTML = "bring to top"
 else 
   document.getElementById('B2topTxt').innerHTML = "send to back"  
}
function ReIndex(id) {
 if (document.getElementById(id).style.zIndex != "-10")
   document.getElementById(id).style.zIndex = "-10"
 else 
   document.getElementById(id).style.zIndex = "12"
}

function reveal(id) {
 if (document.getElementById(id).style.visibility != "visible") {
   document.getElementById(id).filters.revealTrans.Apply();
   document.getElementById(id).style.visibility = "visible";   
   document.getElementById(id).filters.revealTrans.Play();;
   }
   
 else {
   document.getElementById(id).style.visibility = "hidden";

   }
}


function swapAD(id) {
 if (document.getElementById(id).style.display != "block") {
   document.getElementById(id).style.display = "block";
   reveal('b2');
   }
   
 else {
   document.getElementById(id).style.display = "none";
   stopFilter('b2');
   }
}
function show(id) {
	document.getElementById(id).style.display = "block";
}
function hide(id) {
	document.getElementById(id).style.display = "none";
}

function CheckMaxGC() {
 width = parseInt(document.body.offsetWidth);
  //alert(width);
	
	if (width < 852) {
		document.getElementById('bannerAD').style.zIndex = "12";
		document.getElementById('bannerAD').style.right = "0";
		//show('B3topTxt');
		$("#B3topTxt").show();
	}
	else {
		if (width < 1226) {
		//show('B3topTxt');
		$("#B3topTxt").show();
		document.getElementById('bannerAD').style.zIndex = "-10";
		document.getElementById('bannerAD').style.right = ((width / 2) - 427);
		document.getElementById('bannerAD').style.right = "0";
		}
		else {
		//hide('B3topTxt');
		$("#B3topTxt").hide();
		document.getElementById('bannerAD').style.zIndex = "12";
		document.getElementById('bannerAD').style.right = "15";
		}
	}
}