// Show/Hide Layer same call
function loginLayer(whichLayer)
{
	if (document.getElementById)
	{
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
	}
	else if (document.all)
	{
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
	else if (document.layers)
	{
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
	}
}
// Show Layer only
function showLayer(whichLayer)
{
	if (document.getElementById)
	{
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "block":"block";
	}
	else if (document.all)
	{
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "block":"block";
	}
	else if (document.layers)
	{
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "block":"block";
	}
}
// Hide Layer only
function hideLayer(whichLayer)
{
	if (document.getElementById)
	{
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "none":"none";
	}
	else if (document.all)
	{
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "none":"none";
	}
	else if (document.layers)
	{
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "none":"none";
	}
}
// image Swap functions
// 1. For images 'show' & 'hide'
function switchImage(x) {
  var imgUp = "images/hide.gif";
  var imgDown = "images/show.gif";

  if (document.images[x].src.indexOf(imgUp) != -1) {
    document.images[x].src = imgDown;
  } else {
    document.images[x].src = imgUp;
  } 
}
// 2. For images of + & -
function swapImage(x) {
  var imgUp = "images/up.gif";
  var imgDown = "images/down.gif";

  if (document.images[x].src.indexOf(imgUp) != -1) {
    document.images[x].src = imgDown;
  } else {
    document.images[x].src = imgUp;
  } 
}
/* 
function hideAll1() { 
	if (document.getElementById('topnav1')) {
	showLayer('topnav1');
	hideLayer('topnav2'); 
	hideLayer('topnav3'); 
	hideLayer('topnav4'); 
	hideLayer('topnav5'); 
	hideLayer('topnav6'); 
	//Put all layers used in the nav here. 
	}
}
function hideAll2() { 
	if (document.getElementById('topnav2')) {
	showLayer('topnav2');
	hideLayer('topnav1'); 
	hideLayer('topnav3'); 
	hideLayer('topnav4'); 
	hideLayer('topnav5');
	hideLayer('topnav6'); 
	}
}
function hideAll3() { 
	if (document.getElementById('topnav3')) {
	showLayer('topnav3');
	hideLayer('topnav1'); 
	hideLayer('topnav2'); 
	hideLayer('topnav4'); 
	hideLayer('topnav5'); 
	hideLayer('topnav6'); 
	}
}
function hideAll4() { 
	if (document.getElementById('topnav4')) {
	showLayer('topnav4');
	hideLayer('topnav1'); 
	hideLayer('topnav2'); 
	hideLayer('topnav3'); 
	hideLayer('topnav5'); 
	hideLayer('topnav6'); 
	}
}
function hideAll5() { 
	if (document.getElementById('topnav5')) {
	showLayer('topnav5');
	hideLayer('topnav1'); 
	hideLayer('topnav2'); 
	hideLayer('topnav3'); 
	hideLayer('topnav4'); 
	hideLayer('topnav6'); 
	}
}
function hideAll6() { 
	if (document.getElementById('topnav6')) {
	showLayer('topnav6');
	hideLayer('topnav1'); 
	hideLayer('topnav2'); 
	hideLayer('topnav3'); 
	hideLayer('topnav4'); 
	hideLayer('topnav5'); 
	}
}
function navSelector() {
	showLayer('topnav5')
}
*/

function blog_window(emaillink) {

var link = emaillink;

window.open("/blogcomment.aspx?" + (link),"blogs","width=350,height=310,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=0,status=0,copyhistory=0,maximise=no,left=200,top=220");
		
}

function email_window(emaillink) {

var link = emaillink;

window.open("/email.aspx?" + (link),"email","width=350,height=310,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=0,status=0,copyhistory=0,maximise=no,left=200,top=220");
		
}