function unhide(divID) {
	var item = document.getElementById(divID);
	if (item) {
		item.className=(item.className=='visible')?'invisible':'visible';
	}
}

function openpopupwin(mypage,w,h,position) {
	var myname = "genpopup";

	if( mypage == "faq" ) {
		mypage = "/public/faq.asp#" + position;
	}else if( mypage == "terms" ) {
		mypage = "/public/terms.asp";
	}else if( mypage == "privacy" ) {
		mypage = "/public/privacy.asp";
	}else if( mypage == "demo" ) {
		mypage = "/publicHC/movies/mailshots_movie.html";
	}else if( mypage == "demo2" ) {
		mypage = "/publicHC/movies2/mailshots_movie2.html";
	}else if(screen.width){
	  var winl = (screen.width-w)/2;
	  var wint = (screen.height-h)/2;
  }else{
		winl = 0;
		wint = 0;
	}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;

  var settings = "";
  settings += "height=" + h + ",";
  settings += "width=" + w + ",";
  settings += "top=" + wint + ",";
  settings += "left=" + winl + ",";
  settings += "scrollbars=yes,";
  settings += "resizable=1";

  win = window.open(mypage,myname,settings);
  win.window.focus();
}

function openGlobalHelp() {

	var pagePathString = document.location.pathname;
	pagePathString = pagePathString.replace("/public/", "").toLowerCase();

	var mypage = "/userMods/_INCtemplateGlobalHelp_.asp?currpage=" + pagePathString.toString();
	var myname = "globalhelp";

	var hwidth = 784;
	var hheight = 630;

	  if(screen.width){
		  var winl = (screen.width-hwidth)/2;
		  var wint = (screen.height-hheight)/2;
	  }else{
			winl = 0;
			wint = 0;
		}
	  if (winl < 0) winl = 0;
	  if (wint < 0) wint = 0;

	  var settings = ""
	  settings += "height=" + hheight + ",";
	  settings += "width=" + hwidth + ",";
	  settings += "top=" + wint + ",";
	  settings += "left=" + winl + ",";
	  settings += "scrollbars=yes,";
	  settings += "resizable=1";

	  win = window.open(mypage,myname,settings);
	  win.window.focus();
}

function toggleLayer(whichLayer)
{
	if (document.getElementById)
	{
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"none";
	}
	else if (document.all)
	{
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"none";
	}
	else if (document.layers)
	{
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"none";
	}
}

