function mikchat(KfilterDepartmentID) {

  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }

  var docWidth = (myWidth-599)/2;
  var docHeight = (myHeight-679)/2;

  // get session id, not stored in cookie for some reason
  // added global variable to kayako template 2/17/12
  var ksid = k4sessionid;
  
  // default to general dept 1/9/12
  KfilterDepartmentID = parseInt(KfilterDepartmentID);
  if(KfilterDepartmentID == 0 || isNaN(KfilterDepartmentID)) KfilterDepartmentID = 1;
  
  // set skill based on dept 1/16/12 from reprouter
  var KSkillID = '';
  if(KfilterDepartmentID == 4) KSkillID = 5;
  if(KfilterDepartmentID == 3) KSkillID = 4;
  
  
  var miq = escape(document.kchatform.kchatquestion.value.replace( new RegExp( "\n", "g" ), " " ));
  var min = escape(document.kchatform.kchatfullname.value);
  var mie = escape(document.kchatform.kchatemail.value);
  var mip = escape(document.kchatform.kchatphone.value);
  _chatWindowURL = 'https://www.fastcolorprinter.com/k/visitor/index.php?/LiveChat/Chat/Request/_proactive=0/_filterDepartmentID='+KfilterDepartmentID+'/_routechatskillid='+KSkillID+'/_fullName='+min+'/_email='+mie+'/_phonenumber='+mip+'/_subject='+miq+'/_sessionID='+ksid+'/_promptType=chat';
  chatwindow = window.open(_chatWindowURL,"customerchat", "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=1,width=599,height=679,left="+docWidth+",top="+docHeight);
  chatwindow.focus();
}


