// Filename		: close_tns_intercept.js
// Path			: /www/bankofamerica/data/surveys/scripts
// Description		: This file contains code to close the survey
// Original Author	: GDC Dev Team

// Change History:
// Date		Author		SIMON WR	Description
// 02/22/05    	GDC Dev Team	13812       	Created.


<!--

function close_survey_and_redirect(url)
{
 close_survey_popup();
  window.location.href = url;
}

function close_survey_popup()
{
  if(window.name=='SurveyParentTnsIntercept')
  {
  newWin = window.open("","InterceptPopupWindow","height=1,width=1,top=3000,left=3000");
  newWin.close();
  var expdate = new Date ();
  expdate.setTime (expdate.getTime() + (1000 * 60 * 60 * 24 * 30 * 6));
  setClientCookie("SURVEY_SHOWN_IN_LAST_6_MONTHS", "N", expdate,"/",".bankofamerica.com");
  }
}

function setClientCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

-->
