//helper function to open popup windows
function popWin( url, title, width, height ) {
  var v_url = url;
  var params = 'toolbar=yes,location=no,status=yes,scrollbars=yes,resizable=yes';
  //append popup parameters:
  if( width ) params += ',width=' + width + ',height=' + height;
  var newWindow = window.open( v_url, title, params );
} //popWin()
function removeQuestionMark( url ) {
  var v_url = url;
  if( v_url.lastIndexOf("?")!=-1 && v_url.lastIndexOf("?") == ( v_url.length-1 ) ) {
    v_url = v_url.substr( 0, v_url.length-1 );
  } //if
  return v_url;
} //removeQuestionMark()

function googleTrack(arg1,arg2,arg3){
//alert(arg1+'\n'+arg2+'\n'+arg3);
 null; //FIX ME: add Google Track here
 var z=0;
} //googleTrack

//FireClick tracking, following are tracked (what==>how):
//popups==>media, external links==>ad, documents==>download
function track(_link, type) {
  var v_url=_link.href;
  var v_name=_link.name;
  //if no friendly name exists, use href value
  if(v_name=="")v_name=v_url;
  //only allow type: ad, media, download. If ad, make sure the link is external
  /*if((type=='ad' && v_url.match(v_hostname)==null)
    || type=='media' || type=='download'){pageTracker._trackEvent('Download',type,v_name);return fc_click(v_name, type);}*/
} //track()

//load function to check current browser and take action.
  (window.attachEvent) ? window.attachEvent('onload', initCheckers ) : window.addEventListener('load', initCheckers, false);

function initCheckers(){
  var browser = getBrowser();
  if (browser == "ie6"){
//alert('in ie6');
    var cookieData = getCookie("BrowserInfo");
    if(cookieData == null){
     setCookie("BrowserInfo",browser,"","","");
	   popWin("http://www.transunion.com/corporate/ie6redirect.page","",800,600);
    }
  }
}
  //=============================COOKIES==============================
function setCookie(sName, sValue, oExpires, sPath, sDomain, bSecure) {
  var sCookie = sName + "=" + encodeURIComponent(sValue);
  if (oExpires) sCookie += "; expires=" + oExpires.toGMTString();
  if (sPath) sCookie += "; path=" + sPath;
  if (sDomain) sCookie += "; domain=" + sDomain;
  if (bSecure) sCookie += "; secure";
  document.cookie = sCookie;
} //setCookie()

function getCookie(sName) {
  var sRE = "(?:; )?" + sName + "=([^;]*);?";
  var oRE = new RegExp(sRE);
  return (oRE.test(document.cookie)) ? decodeURIComponent(RegExp["$1"]) : null;
} //getCookie()



