self.name='icogno';
var popupWin=null;
var popupUrl=window.location.protocol+'//aiperson.icogno.com/joan2?bot=icogno&tts=yes&ttsdirect=no&aityping=no&script=oYmMWMKLABOCMACEGIUE&poptarget=icogno&3';
var popupW=265;
var popupH=490;
document.domain=document.domain.substring(document.domain.indexOf('.')+1);

function icognoPop(){
var w=400,h=300;if(document.all||document.layers){w=self.screen.availWidth;h=self.screen.availHeight;}
var tPos=(h-popupH)-(4*h/100);var lPos=(w-popupW)-(1*w/100);
var f="resizable=no,location=no,toolbar=no,status=no,scrollbars=no,menubar=no,titlebar=no,width="+popupW+",height="+popupH+",left="+lPos+",top="+tPos+",screenX="+lPos+",screenY="+tPos;
popupWin=open("","popupWin",f);
if(!popupWin||popupWin.closed||!popupWin.say){eval("popupWin="+"window."+"open(popupUrl,'popupWin','"+f+"');");return false}else{popupWin.focus();return true}}

function dataValue(p1,p2,p3){
if(top!=self){window.parent.dataValue(p1,p2,p3)}else{
if(icognoPop()){popupWin.dataValue(p1,p2,p3)}else{setTimeout("popupWin.dataValue('"+p1+"','"+p2+"','"+p3+"')",8000)}}}
function say(p1){
if(top!=self){window.parent.say(p1)}else{
if(icognoPop()){popupWin.say(p1)}else{setTimeout("popupWin.say('"+p1+"')",8000)}}}

function changeLocation(loc){
//add validation if required
//copy any url parameters from the existing location to the new one
var currentLoc=window.location.href;
var parameters='';
var questionMarkIndex=currentLoc.indexOf('?');
if(questionMarkIndex>0){
  parameters=currentLoc.substring(questionMarkIndex+1);
  if(loc.indexOf('?')>0){
    loc+='&'+parameters;
  }else{
    loc+='?'+parameters;
  }
}
window.location.replace(loc);
}
