function addLoadEvent(i_func) { if (typeof i_func == 'function') { if (document.addEventListener) { document.addEventListener('DOMContentLoaded', i_func, false); } else if (window.attachEvent) { window.attachEvent('onload', i_func); } else if (typeof window.onload == 'function') { var old_func = window.onload; window.onload = function () { old_func(); i_func(); } } else { window.onload = i_func; } } } function addEvent(obj, event, func, useCapture) { if (obj.addEventListener) { obj.addEventListener(event, func, typeof useCapture == 'undefined' ? false : useCapture); } else if (obj.attachEvent) { obj.attachEvent('on' + event, func); } else { obj['on' + event] = func; } } function setAttribute(obj, key, value) { if (obj.setAttribute) { obj.setAttribute(key, value); } else { obj[key] = value; } } function getAttribute(obj, key) { var res = ''; if (obj.getAttribute) { res = obj.getAttribute(key); } else { res = obj[key]; } return res; } function SendAnalyticsEvent(i_category, i_action, i_label, i_value) { var category = typeof i_category == 'string' ? i_category : ''; var action = typeof i_action== 'string' ? i_action: ''; var label = typeof i_label== 'string' ? i_label: ''; var value = typeof i_value== 'string' ? i_value: ''; pageTracker._trackEvent(category, action, label, value); } /*Send Unica wrapper function */ function SendUnicaCode(msg) { try { ntptEventTag("ev=" + msg); } catch (err) { } } /* Add new sCut parameter */ function AddsCutParam(paramName, value) { sCut= sCut+ paramName + "=" + value + "&"; } /* Check that browser is IE */ function IsIEBrowser() { if (navigator.appVersion.indexOf("IE") > 0) { return true; } return false; } function IsIE8Browser() { if (navigator.appVersion.indexOf("IE 8") > 0) { return true; } return false; } function IsFFBrowser() { if (navigator.indexOf("Firefox") > 0) { return true; } return false; } /*Set background image in specified control*/ function setBGImage(control, bgImagePath) { if (control != null) { control.style.backgroundImage = "url('" + bgImagePath + "')"; } } /* Toggles element display */ function toggleElement(id) { elem = document.getElementById(id); elem.style.display= (elem.style.display=="none") ? "block":"none"; } /* Position xpos, ypos of background image */ function positionBackground(control,xpos,ypos) { control.style.backgroundPosition=xpos+"px "+ypos+"px"; } /* Fetches query string value */ function fetchParameterValue(param) { query_str = window.location.search.substring(1); pairs = query_str.split("&"); for (i=0; i= MM_contentVersion; } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) { document.write(' \n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next \n'); document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n'); document.write(' \n'); } function showFlash(flashPath,flashWidth, flashHeight) { document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); } function OpenAndDownload(i_location, i_brand) { var location = typeof i_location == 'undefined' ? 0 : parseInt(i_location); location = (isNaN(location) || location <= 0 ? '0000' : location.toString()); var brand = typeof i_brand == 'undefined' ? 'reef' : i_brand; //unica try { ntptAddPair("dl", location); SendUnicaCode('download_' + brand); } catch(err) {} // if download process already started -> doesn't show exit popup in future showExitPopup = false; setDownloadStatus(); var sURLreg = "/downloadclient.htm?dl=" + location + "&DownloadBrand=" + brand; if ('conversion' in window) { if (conversion.is_running) { conversion.reportConversionGoal(brand); } sURLreg += conversion.getSt() + conversion.getMkw(); } sURLreg += '&' + sCut + getDlp(); var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; if (is_chrome) { window.location.href = sURLreg; } else { window.open(sURLreg, "popDown", "width=620,height=150,top=0,left=0"); } } function OpenLiveCasino(i_location) { var location = typeof i_location == 'undefined' ? 0 : parseInt(i_location); location = (isNaN(location) || location <= 0 ? '4679' : location.toString()); try { ntptAddPair("dl", location); SendUnicaCode('nodownload_livecasino'); } catch(err){} var filename = "$$LiveCasinoURL$$?mode=3&LangID=en&dl=" + location + "&skin=5&brand=0"; if ('conversion' in window) { if (conversion.is_running) { conversion.reportConversionGoal('livecasino'); } filename += conversion.getSt() + conversion.getMkw(); } filename += '&' + sCut + getDlp(); var w = 801; var h = 571; var l = (window.screen.width-w)/2; var t = (window.screen.height-h)/2; var opened = window.open(filename, "Offline", "resizable=no,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h); } function NoDownloadPoker(i_location, i_bannerID) { var location = typeof i_location == 'undefined' ? 0 : parseInt(i_location); location = (isNaN(location) || location <= 0 ? '0000' : location.toString()); var banner = typeof i_bannerID == 'undefined' ? null : getBanner(i_bannerID); try { ntptAddPair("dl", location); SendUnicaCode('nodownload_888poker'); } catch(err){} //if NOT from landing page (out of the frame) if (window.name != "") { setDownloadStatus(); } var filename = "$$NDLPokerURL$$?dl=" + location + "&skin=4&brand=1&langid=en&"; if ('conversion' in window) { if (conversion.is_running) { conversion.reportConversionGoal('poker-ndl'); } filename += conversion.getSt() + conversion.getMkw(); } filename += '&' + sCut + getDlp(); var w = 820; var h = 565; var l = (window.screen.width-w)/2; var t = (window.screen.height-h)/2; var opened = window.open(filename, null, "height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,resize=no,left="+l+",top="+t); if (!opened && banner != null) { banner.openWindow(filename, null, "height=" + h + ",width=" + w + ",status=no,toolbar=no,menubar=no,location=no,resize=no,left="+l+",top="+t); } } function NoDownloadCasino(i_location, i_bannerID) { var location = typeof i_location == 'undefined' ? 0 : parseInt(i_location); location = (isNaN(location) || location <= 0 ? '0000' : location.toString()); var banner = typeof i_bannerID == 'undefined' ? null : getBanner(i_bannerID); try { ntptAddPair("dl", location); SendUnicaCode('nodownload_reef'); } catch(err){} var skin = (typeof rlCountry == 'string' && rlCountry == 'gbr') ? '0' : '0'; var filename = "http://safe-iplay.com/casino/application/ViewActual.html?dl=" + location + '&skin=' + skin + '&mode=2&brand=2&LangID=en'; if ('conversion' in window) { if (conversion.is_running) { conversion.reportConversionGoal('casino-ndl'); } filename += conversion.getSt() + conversion.getMkw(); } filename += '&' + sCut + getDlp(); setDownloadStatus(); var w = 801; var h = 571; var l = (window.screen.width-w)/2; var t = (window.screen.height-h)/2; var opened = window.open(filename, "Offline", "resizable=no,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h); if (!opened && banner != null) { banner.openWindow(filename ,"Offline","resizable=no,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h); } } function getDlp() { var dlp = ''; try { dlp = encodeURIComponent(document.location.href); dlp = dlp.replace(/\./gi, "%2E"); } catch (err) { } return (dlp != '' ? ('&dlp=' + dlp) : ''); } function setDownloadStatus() { setCookie('downloaded', '1', '/'); } function setCookie(name, value) { var argv = setCookie.arguments; var argc = setCookie.arguments.length; var path = (argc > 2) ? argv[2] : null; var expires = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } function openDL() { OpenAndDownload('6248', 'reef') } /* Methods of Entry Popup window */ function SetupEntryPopupPosition(entryPopupObject) { try { entryPopupObject.style.top = (document.body.clientHeight - 200) / 2; } catch (e) {/* do nothing */} } // Closes entry popup (hide it and background (WhiteSpace)) // Parameters: // popupID - identifier of the popup window. function ClosePopup(popupID) { try { var entryPopupDiv= document.getElementById(popupID); if(entryPopupDiv != null) { entryPopupDiv.style.visibility = "hidden"; } var entryPopupWS= document.getElementById(popupID + "WhiteSpace"); if(entryPopupWS != null) { entryPopupWS.style.visibility = "hidden"; } } catch(e) {/* do nothing */} } /* Methods represent ExpandableDiv logic */ // Expands expandable div // Parameters: // expTitleDiv - title div element // expTextDiv - rich text div element function expandExpDiv(expTitleDiv, expTextDiv) { expTextDiv.style.display = 'block'; var spans = expTitleDiv.getElementsByTagName('div'); for (var i = 0; i < spans.length; i++) { if (spans[i].className == 'plus') { spans[i].style.display = 'none'; } else if (spans[i].className == 'minus') { spans[i].style.display = 'inline'; } } } // Collapses expandable div // Parameters: // expTitleDiv - title div element // expTextDiv - rich text div element function collapseExpDiv(expTitleDiv, expTextDiv) { expTextDiv.style.display = 'none'; var spans = expTitleDiv.getElementsByTagName('div'); for (var i = 0; i < spans.length; i++) { if (spans[i].className == 'plus') { spans[i].style.display = 'inline'; } else if (spans[i].className == 'minus') { spans[i].style.display = 'none'; } } } // Expands or collapses expandable div // Parematers: // expDiv - div element, must contains title and rich text divs function toggleExpDiv(expDiv) { if (expDiv) { var title = null; var text = null; var innerDivs = expDiv.getElementsByTagName('div'); // get title and rich text divs for (var i = 0; i < innerDivs.length; i++) { if (innerDivs[i].className == 'expandableTitle') { title = innerDivs[i]; } else if (innerDivs[i].className == 'expandableRichText Closed') { text = innerDivs[i]; } } if (title && text) { if (text.style.display == 'none' || text.style.display == '') { expandExpDiv(title, text); } else { collapseExpDiv(title, text); } } } } function OpenAndSetLocationDlg(divToOpenID,srcElm, align ) { CloseAllMenus(); var dlgDiv = document.getElementById(divToOpenID); if (dlgDiv != null) { dlgDiv.style.display = "block"; //the addition of Number + "px" is for FF var left ; if (align == 'left') left = Number(GetPosX(srcElm)); else if (align == 'right') left = Number((GetPosX(srcElm) - (dlgDiv.offsetWidth - srcElm.offsetWidth ))); if (IsIE8Browser()) { left = left - 1; } dlgDiv.style.left = left + "px"; var top = Number(GetPosY(srcElm) + srcElm.offsetHeight ); if (IsIEBrowser()) { top = top -1; } dlgDiv.style.top = top + "px"; OpenDlg(dlgDiv,srcElm.id); } } function OpenDlg(dlgDiv, srcElmID) { dlgDiv.style.display = "block"; var srcElm = document.getElementById(srcElmID); if(srcElm != null) { var color; try { color = dlgDiv.currentStyle.backgroundColor; } catch(err) { color = document.defaultView.getComputedStyle(dlgDiv, '').getPropertyValue("background-color"); } srcElm.style.backgroundColor = color; } } function CloseDlg(dlgDiv,srcElmID) { //alert('divToCloseID=' + divToCloseID); //if(event.srcElement.tagName == "DIV" && event.srcElement.id == divToCloseID) { //var dlgDiv= document.getElementById(divToCloseID); //dlgDiv.style.visibility = "hidden"; if (dlgDiv != null) { dlgDiv.style.display = "none"; } } /*else { var txt = document.getElementById("debug"); txt.innerText = txt.innerText+event.srcElement.tagName + ' ' + event.srcElement.id + ' ' ; }*/ var srcElm = document.getElementById(srcElmID); srcElm.style.backgroundColor = ''; //alert('CloseDlg'); } function CloseAllMenus() { var divList,i; // loop through all images of the document divList=document.getElementsByTagName("div"); for(i=0;i7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; function getBanner(bannerID){ return document.getElementById(bannerID); } function listening(bannerID){ var flashInitFunc = bannerID + 'Init()'; eval(flashInitFunc); } function ready(bannerID){ var version = '1.0'; try { version = eval(bannerID + 'FlashBannerVersion'); } catch(err) {} if ( version =='1.1'){ var flashEl = document.getElementById(bannerID); bannerID = bannerID.replace("ID",""); var el = document.getElementById(bannerID); nextObject(el).style.display='none'; el.style.width =flashEl.width; el.style.height =flashEl.height; } else{ bannerID = bannerID.replace("ID",""); var el = document.getElementById(bannerID); el.style.backgroundImage = "none"; } } function error(bannerID, id, value) { var version = '1.0'; try { version = eval(bannerID + 'FlashBannerVersion'); } catch(err) {} if (version=='1.1') { // show loader image in any error case - return it back to the front // In case of error id = 6 remain presenting the flash if(id != 6) { var el = document.getElementById(bannerID); el.style.display='none'; nextObject(el).style.display='block'; } } else { // show loader image in any error case - return it back to the front //alert("error (" + id + ")" + value); // In case of error id = 6 remain presenting the flash if(id != 6) { var bgIMGID = bannerID + "BG"; var el = document.getElementById(bannerID); el.style.backgroundImage="url"+"('"+document.getElementById(bgIMGID).value+"')"; } } } function ExtendedJSLinkWithRegLink(link, unicaEvent, jsLink, sCut) { var sURL = link; if (sCut != "") { var pos = sURL.indexOf("?"); if (pos < 0) // if link url doesn't contains '?' already { sURL += "?" + sCut; } else { sURL += "&" + sCut; } } if (unicaEvent != null && unicaEvent != "") { try { ntptEventTag("ev=" + unicaEvent); } catch (err) { } } if (jsLink != null && jsLink != "") { eval(jsLink); } document.location.href = sURL; } function ExtendedJSLink(unicaEvent, jsLink) { if (unicaEvent != null && unicaEvent != "") { try { ntptEventTag("ev=" + unicaEvent); } catch (err) { } } if (jsLink != null && jsLink != "") { eval(jsLink); } } function ExtendedRegularLink(link, unicaEvent, sCut) { var sURL = link; if (sCut != "") { var pos = sURL.indexOf("?"); if (pos < 0) // if link url doesn't contains '?' already { sURL += "?" + sCut; } else { sURL += "&" + sCut; } } if (unicaEvent != null && unicaEvent != "") { try { ntptEventTag("ev=" + unicaEvent); } catch (err) { } } document.location.href = sURL; } function ExtendedRegularLinkNewWindow(link, unicaEvent, sCut) { var sURL = link; if (sCut != "") { var pos = sURL.indexOf("?"); if (pos < 0) // if link url doesn't contains '?' already { sURL += "?" + sCut; } else { sURL += "&" + sCut; } } if (unicaEvent != null && unicaEvent != "") { try { ntptEventTag("ev=" + unicaEvent); } catch (err) { } } window.open(sURL); } function nextObject (obj) { var n = obj; do n = n.nextSibling; while (n && n.nodeType != 1); return n; } function OpenChat(){ startChatWithEscalation('', '', 'CUSTOMER', null, null, null);} ///////////////////////////////////////////////// // // // KANA Response Live Functions // // Version $Revision: 1.1 $ // // // // Copyright (c) 2004 - KANA Inc. // // All Rights Reserved. Patent Pending. // // // ///////////////////////////////////////////////// //=================================================================== // Default IChannel And Server locations // 1. Set the gIChannelID value to be the value of your default iChannel. // 2. If you have an on-premise solution, set the gServer value to be // the fully qualified domain name of the web server running KANA Response Live. //=================================================================== var gIChannelID = "Default"; var gServer = "router.conavigator.com"; //=================================================================== // startMeetMe launches the basic Conav application w/o DSP // // IChannelID: IChannelID for interaction // AttachedData: Company-specific data to attach to customer's acocunt // CustomerName: the name of the customer requesting live help // ConenctToName: the id of the rep to whom the customer is connecting //=================================================================== function startMeetMe(iChannelID, attachedData, customerName, connectToName, server) { window.startVarApp = startConavVarApp; window.getWinProperties = getConavWinProperties; setServerDomain(server); setCustomerName(customerName); setConnectToName(connectToName); launchRegularStartPage(iChannelID, attachedData); } //=================================================================== // startDSPMeetMe launches the Conav application using Dynamic Start Page // // IChannelID: IChannelID for interaction // AttachedData: Company-specific data to attach to customer's acocunt // CustomerName: the name of the customer requesting live help // ConenctToName: the id of the rep to whom the customer is connecting //=================================================================== function startDSPMeetMe(iChannelID, attachedData, customerName, connectToName, server) { window.startVarApp = startConavVarApp; window.getWinProperties = getConavWinProperties; setServerDomain(server); setCustomerName(customerName); setConnectToName(connectToName); launchDynamicStartPage(iChannelID, attachedData); } //=================================================================== // startDirectCall launches the Direct Call application // // IChannelID: IChannelID for interaction // AttachedData: Company-specific data to attach to customer's acocunt //=================================================================== function startDirectCall(iChannelID, attachedData, server) { window.startVarApp = startDirectCallVarApp; window.getWinProperties = getCallbackWinProperties; setServerDomain(server); launchDynamicStartPage(iChannelID, attachedData); } //=================================================================== // startCallback launches the Basic Callback application // // IChannelID: IChannelID for interaction // AttachedData: Company-specific data to attach to customer's acocunt //=================================================================== function startCallback(iChannelID, attachedData, server) { window.startVarApp = startCallbackVarApp; window.getWinProperties = getCallbackWinProperties; setServerDomain(server); launchDynamicStartPage(iChannelID, attachedData); } //=================================================================== // startCallbackExtended launches the Callback application for a given // customer telephone number. // // IChannelID: IChannelID for interaction // AttachedData: Company-specific data to attach to customer's acocunt // customerName: name of the customer // telephoneNumber: Telephone number // countryCode: Telephone Country Code // //=================================================================== function startCallbackExtended(iChannelID, attachedData, customerName, telephoneNumber, countryCode, server) { window.gTelephoneNumber = telephoneNumber; window.gCountryCode = countryCode; window.gCustomerName = customerName; window.startVarApp = startCustomCallbackVarApp; window.getWinProperties = getCallbackWinProperties; setServerDomain(server); launchDynamicStartPage(iChannelID, attachedData); } //==================================================================================== //==================================================================================== //==================================================================================== // Private Functions and variables for KANA Use Only // Do not modify or call these functions. //==================================================================================== //==================================================================================== //==================================================================================== var gHelpWindow = "help"; var gLaunchUrl; var gAttachedData; var gConnectToName = ""; var gCustomerName = ""; var gAppType = ""; var gConavHtdocsPath = "/CONAV/HTD/"; var gHTTP = "http://"; var gHTTPS = "https://"; function setIChannelID(iChannelID) { if(typeof(iChannelID) == "undefined" || iChannelID == null) return; window.gIChannelID = iChannelID; } function getIChannelID() { return window.gIChannelID; } function setServerDomain(server) { if(typeof(server) == "undefined" || server == null ) return; window.gServer = server; } function getServerDomain() { return window.gServer; } function setLaunchUrl(url) { window.gLaunchUrl = url; } function getLaunchUrl() { return window.gLaunchUrl; } function getHelpWindowName() { return window.gHelpWindow; } function setConnectToName(connectToName) { if(typeof(connectToName) == "undefined" || connectToName == null) return; window.gConnectToName = connectToName; } function getConnectToName() { return window.gConnectToName; } function setCustomerName(customerName) { if(typeof(customerName) == "undefined" || customerName == null) return; window.gCustomerName = customerName; } function getCustomerName() { return window.gCustomerName; } function setAttachedData(attachedData) { window.gAttachedData = attachedData; } function getAttachedData() { return window.gAttachedData; } function getConavHtdocsPath() { return window.gConavHtdocsPath; } function launchRegularStartPage(iChannelID, attachedData) { launchStartPage(iChannelID, attachedData, "invokeRegularStartPage()"); } function launchDynamicStartPage(iChannelID, attachedData) { launchStartPage(iChannelID, attachedData, "invokeDynamicStartPage()"); } function launchStartPage(iChannelID, attachedData, launchFunctionStr) { setIChannelID(iChannelID); setAttachedData(attachedData); //the ssl check cannot be made with opera 5. if( window.location.protocol == "http:" && !isOpera() ) { checkSSLEnabled(launchFunctionStr); } else { eval(launchFunctionStr); } } function checkSSLEnabled(launchFunctionStr) { var testImg = new Image(1,1); testImg.onerror = new Function("handleNoSSL()"); testImg.onload = new Function(launchFunctionStr); testImg.src = gHTTPS + getServerDomain() + getConavHtdocsPath() + getIChannelID() + "/shared/images/blank.gif?time=" + (new Date()).getTime(); } function invokeDynamicStartPage() { if(typeof(isHipboneSharedWindow) != "undefined") { launchRecursiveErrorMessage(); return; } if(isMacButNotNetscape()) { startVarApp(); return; } var link = "responseLiveLauncher.html?ichannel=" + escape(getIChannelID()) + "&host=" + escape(getServerDomain()) + "&apptype=" + gAppType + getAttachedDataQueryParam(); launchWindow(link); } function invokeRegularStartPage() { if(typeof(isHipboneSharedWindow) != "undefined") { launchRecursiveErrorMessage(); return; } startVarApp(); } function startConavVarApp() { var link = gHTTPS + getServerDomain() + getConavHtdocsPath() + getIChannelID() + "/StartConavPage?time=" + (new Date()).getTime() + "&NAME=" + escape(getCustomerName()) + "&CONNECT_TO=" + escape(getConnectToName()) + getAccountSpecificQueryParam(); launchWindow(link); } function startDirectCallVarApp() { var link = gHTTPS + getServerDomain() + getConavHtdocsPath() + getIChannelID() + "/login/oem/callback/n_to_p.thtml?METHOD=phoneCallBack.thtml"; launchWindow(link); } function startCallbackVarApp() { var link = gHTTPS + getServerDomain() + getConavHtdocsPath() + getIChannelID() + "/login/oem/callback/n_to_p.thtml"; launchWindow(link); } function startCustomCallbackVarApp() { var link = gHTTPS + getServerDomain() + getConavHtdocsPath() + getIChannelID() + "/login/oem/callback/n_to_p.thtml?" + "PHONE_NUMBER=" + escape(gTelephoneNumber) + "&COUNTRY_CODE=" + escape(gCountryCode) + "&CUSTOMER_NAME=" + escape(gCustomerName) + "&TIME=" + (new Date()).getTime(); launchWindow(link); } function launchRecursiveErrorMessage() { var link = gHTTP + getServerDomain() + getConavHtdocsPath() + getIChannelID() + "/login/recursiveConav.thtml"; launchWindow(link); } function handleNoSSL() { var link = gHTTP + getServerDomain() + getConavHtdocsPath() + getIChannelID() + "/login/sslDisabled.thtml"; launchWindow(link); } function getConavWinProperties() { return 'scrollbars=yes,resizable=' + (isNetscape()?'no':'yes') + ',width=270,height=400,screenX=10,screenY=10,top=10,left=10'; } function getCallbackWinProperties() { return 'scrollbars=yes,resizable=' + (isNetscape()?'no':'yes') + ',width=300,height=430,screenX=10,screenY=10,top=10,left=10'; } function getAttachedDataQueryParam() { var attachedDataQStr = ""; if(getAttachedData()) { attachedDataQStr = "&ATTACHED_DATA=" + escape(getAttachedData()); } return attachedDataQStr; } function getAccountSpecificQueryParam() { var attachedDataQStr = ""; if(getAttachedData()) { attachedDataQStr = "&ACCTSPECIFIC=" + escape(getAttachedData()); } return attachedDataQStr; } //=================================================================== // AOL-safe window.open() //=================================================================== function launchWindow(launchUrl) { setLaunchUrl(launchUrl); if(isAOL()) { var scriptletHTML = ""; document.body.insertAdjacentHTML('BeforeEnd', scriptletHTML); return; } window.open(getLaunchUrl(), getHelpWindowName(), getWinProperties()); } function isNetscape() { return (navigator.appName.indexOf("Netscape")!=-1); } function isAOL() { return (navigator.appVersion.indexOf("AOL")!=-1); } function isOpera() { return (navigator.userAgent.indexOf("Opera")>-1); } function isMac() { return (navigator.userAgent.indexOf("Mac")>-1); } function isMacButNotNetscape() { return (isMac() && !isNetscape()); } ///////////////////////////////////////////////// // // // KANA Response Live Chat Functions // // Version $Revision: 1.1 $ // // // // Copyright (c) 2004 - KANA Inc. // // All Rights Reserved. Patent Pending. // // // ///////////////////////////////////////////////// //====================================================================== // Uncomment and set gAfterLaunchURL to the url of the page you want // to display after launching live help chat //====================================================================== //var gAfterLaunchURL="http://www.kana.com"; var gChatWindowWidth = 300; var gChatWindowHeight = 500; var gChatWindowProperties = "width=" + gChatWindowWidth + ",height=" + gChatWindowHeight + ",menubar=no,location=no,directories=no,status=no,toolbar=no,scrollbars=auto,resizable=yes,screenX=10,screenY=10,left=10,top=10"; var gDSPLauncherPageName = "responseLiveLauncher.html"; var gHTTP = "http://"; var gHTTPS = "https://"; function startChat(iChannel, server_name, attached_data, custom_values, agent_only_values, go_immediately_into_queue) { var chatLaunchMode = "CHAT_ONLY"; launchChat(iChannel, server_name, attached_data, custom_values, agent_only_values, go_immediately_into_queue, chatLaunchMode); } function startChatAndCobrowse(iChannel, server_name, attached_data, custom_values,agent_only_values, go_immediately_into_queue) { var chatLaunchMode = "COBROWSE"; launchChat(iChannel, server_name, attached_data, custom_values, agent_only_values, go_immediately_into_queue, chatLaunchMode); } function startChatWithEscalation(iChannel, server_name, attached_data, custom_values,agent_only_values, go_immediately_into_queue) { var chatLaunchMode = "COBROWSE_ESCALATION"; launchChat(iChannel, server_name, attached_data, custom_values, agent_only_values, go_immediately_into_queue, chatLaunchMode); } function launchChat(iChannel, serverName, attachedData, prefillValues, agentOnlyValues, enterOnQueuePage, chatLaunchMode) { if (isAOL()) { saveChatParamaters(window, iChannel, serverName, attachedData, prefillValues, agentOnlyValues, enterOnQueuePage, chatLaunchMode); var scriptletHTML = ""; document.body.insertAdjacentHTML('BeforeEnd', scriptletHTML); return; } openInitialWindow(); finishLaunchingChat(iChannel, serverName, attachedData, prefillValues, agentOnlyValues, enterOnQueuePage, chatLaunchMode) } function finishLaunchingChat(iChannel, serverName, attachedData, prefillValues, agentOnlyValues, enterOnQueuePage, chatLaunchMode) { var chatWin = getChatWindow(); saveChatParamaters(chatWin, iChannel, serverName, attachedData, prefillValues, agentOnlyValues, enterOnQueuePage, chatLaunchMode); if (alreadyConavigating()) { handleRecursiveLaunch(iChannel, serverName, chatWin); return; } if (browserDoesNotSupportDOM2() || isIEonMac()) { handleUnsupportedBrowser(iChannel, serverName, chatWin); return; } if (!areCookiesEnabled()) { handleDisabledCookies(iChannel, serverName, chatWin); return; } if(window.location.protocol == "https:") createAndSubmitForm(); else checkSSLEnabledAndSubmit(iChannel, serverName); } function createAndSubmitForm() { var chatWin = getChatWindow(); var launchChatForm = createForm(chatWin.serverName, chatWin); // add this parameter to use dsp addFormField(launchChatForm, chatWin, "DSP_LAUNCHER_PAGE_NAME", gDSPLauncherPageName); addFormField(launchChatForm, chatWin, "CHAT_WINDOW_WIDTH", gChatWindowWidth); addFormField(launchChatForm, chatWin, "CHAT_WINDOW_PROPERTIES", gChatWindowProperties); addFormField(launchChatForm, chatWin, "ICHANNEL_ID", chatWin.iChannel); addFormField(launchChatForm, chatWin, "ATTACHED_DATA", chatWin.attachedData); addFormField(launchChatForm, chatWin, "ENTER_ON_QUEUE_PAGE", chatWin.enterOnQueuePage); addFormField(launchChatForm, chatWin, "CHAT_LAUNCH_MODE", chatWin.chatLaunchMode); addFormField(launchChatForm, chatWin, "AGENT_VISIBLE_DATA", createAgentVisibleDataString(chatWin.agentOnlyValues)); var prefillValues = chatWin.prefillValues; for (prefillItem in prefillValues) { addFormField(launchChatForm, chatWin, prefillItem, prefillValues[prefillItem]); } launchChatForm.submit(); } function openInitialWindow() { var newWin = window.open("", getChatWindowName(), getWinProperties()); newWin.document.write("Live Chat"); newWin.document.close(); setChatWindow(newWin); } function createForm(serverName, win) { var launchChatForm = win.document.createElement("form"); launchChatForm.method = "post"; launchChatForm.target = "_self"; launchChatForm.action = gHTTPS + serverName + "/CONAV/CHAT/ChatPreLaunch"; win.document.body.appendChild(launchChatForm); return launchChatForm; } var DATA_SEPARATOR = "_HB_"; function createAgentVisibleDataString(agentOnlyValues) { var agentVisibleData = ""; for (agentItem in agentOnlyValues) { if(isNonEmptyString(agentVisibleData)) agentVisibleData += DATA_SEPARATOR; agentVisibleData += agentItem + DATA_SEPARATOR + agentOnlyValues[agentItem]; } return agentVisibleData; } function addFormField(launchChatForm, win, name, value) { if(!isNonEmptyString(name) || !isNonEmptyString(value)) return; var elementObj = win.document.createElement("input"); elementObj.type = "hidden"; elementObj.name = name; elementObj.value = value; launchChatForm.appendChild(elementObj); } function alreadyConavigating() { return (typeof(isHipboneSharedWindow) != "undefined"); } function handleRecursiveLaunch(iChannel, serverName, win) { win.location.href = gHTTPS + serverName + "/CONAV/chat/errorpages/recursiveConav.jsp?ICHANNEL_ID=" + iChannel; } function browserDoesNotSupportDOM2() { return (null == document.getElementById); } function handleUnsupportedBrowser(iChannel, serverName, win) { win.location.href = gHTTPS + serverName + "/CONAV/CHAT/ChatPreLaunch?ICHANNEL_ID=" + iChannel; } function areCookiesEnabled() { var time = (new Date()).getTime(); setTestCookie(time); if (theCookieIsSet(time)) { removeTestCookie(time); return true; } return false; } function setTestCookie(value) { document.cookie = "hbcookietest=" + value; } function theCookieIsSet(value) { var theCookieString = document.cookie; return (isNonEmptyString(theCookieString) && theCookieString.indexOf(value) > -1); } function removeTestCookie(value) { document.cookie = "hbcookietest=" + value + "; expires=Fri, 02-Jan-1970 00:00:00 GMT"; } function handleDisabledCookies(iChannel, serverName, win) { win.location.href = gHTTP + serverName + "/CONAV/chat/errorpages/cookiesDisabled.jsp?ICHANNEL_ID=" + iChannel; } function checkSSLEnabledAndSubmit(iChannel, serverName) { createAndSubmitForm(); var testImg = new Image(1,1); testImg.onerror = function() { handleChatNoSSL(iChannel, serverName); } testImg.src = gHTTPS + serverName + "/CONAV/HTD/Default/shared/images/blank.gif?time=" + (new Date()).getTime(); } function handleChatNoSSL(iChannel, serverName) { var link = gHTTP + serverName + "/CONAV/chat/errorpages/sslDisabled.jsp?ICHANNEL_ID=" + iChannel; window.open(link, getChatWindowName(), getWinProperties()); getChatWindow().close(); } function saveChatParamaters(chatWin, iChannel, serverName, attachedData, prefillValues, agentOnlyValues, enterOnQueuePage, chatLaunchMode) { chatWin.iChannel = iChannel; chatWin.serverName = serverName; chatWin.attachedData = attachedData; chatWin.prefillValues = prefillValues; chatWin.agentOnlyValues = agentOnlyValues; chatWin.enterOnQueuePage = enterOnQueuePage; chatWin.chatLaunchMode = chatLaunchMode; } function setAOLChatWindow(chatWin) { setChatWindow(chatWin); with (window) { finishLaunchingChat(iChannel, serverName, attachedData, prefillValues, agentOnlyValues, enterOnQueuePage, chatLaunchMode); } } var gChatLaunchWindow = null; function setChatWindow(chatWin) { window.gChatLaunchWindow = chatWin; } function getChatWindow() { return window.gChatLaunchWindow; } function getChatWindowName() { return "_blank"; } function getWinProperties() { return gChatWindowProperties; } function isAOL() { return (navigator.appVersion.toLowerCase().indexOf("aol")!=-1); } function isIE() { return (navigator.userAgent.toLowerCase().indexOf("msie")!=-1); } function isMac() { return (navigator.userAgent.toLowerCase().indexOf("mac")!=-1); } function isIEonMac() { return (isIE() && isMac()) } function isNonEmptyString(str) { if(null == str || str == "") return false; return true; } function goToAfterLaunchUrl() { if(typeof(window.gAfterLaunchURL) == "undefined") return; window.location.href = window.gAfterLaunchURL; } function OpenRightNow(url) { // var w = 580; // var h = 700; // var l = (window.screen.width-w)/2; // var t = (window.screen.height-h)/2; // window.open(url,"faq","resizable=no,status=no,scrollbars=yes,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h); // window.open(url, 'faq'); windowFeatures = "scrollbars=1,top=0,left=0,resizable=yes,width="+(screen.width)+",height="+(screen.height); newWindow=window.open(url,'faq',windowFeatures) newWindow.focus(); } function OpenRightNow888(){OpenRightNow("$$OpenRightNow888URL$$");} function OpenRightNowPoker(){OpenRightNow("$$OpenRightNowPokerURL$$");} function OpenRightNowCasino(){OpenRightNow("$$OpenRightNowCasinoURL$$");} function OpenRightNowBingo(){OpenRightNow("$$OpenRightNowBingoURL$$");} function OpenRightNowSport(){OpenRightNow("$$OpenRightNowSportURL$$");} function OpenRightNowGames(){OpenRightNow("$$OpenRightNowGamesURL$$");} function OpenNRS() { if (arguments.length >= 7 && sTestDataXML.length > 0 && sNRSDomain.length > 0) { // appending mandatory parameters var targetURL = sNRSDomain + "?" + "rl=" + arguments[0] + "&brand=" + arguments[1] + "&version=" + arguments[2] + "&orientation=" + arguments[3] + "&subbrand=" + arguments[4] + "&mode=" + arguments[5] + "&platform=" + arguments[6]; // appending non-mandatory parameters if (nSerial.length > 0) { // appending the language from session targetURL += "&sr=" + nSerial; } // appending non-mandatory parameters if (arguments[7] != null) { // appending the language from input parameters targetURL += "&lang=" + arguments[7]; } else if (sLanguage.length > 0) { // appending the language from session targetURL += "&lang=" + sLanguage; } if (arguments[8] != null) { // appending the skin parameter targetURL += "&skin=" + arguments[8]; } // appending the test data xml targetURL += "&testdata=" + sTestDataXML; // opening the NRS page in separate window window.open(targetURL.toLowerCase(), "NRSPage", "status=1, location=1, resizable=1", false); } return false; } var conversion = { 'is_running' : false, 'st' : null, 'mkw' : null, 'is_stage' : location.href.indexOf('http://stage-') == 0, 'check_valid_parameters' : function () { var is_valid = true; is_valid = is_valid && 'test_id' in conversion_data && conversion_data.test_id; is_valid = is_valid && 'phase' in conversion_data && conversion_data.phase; is_valid = is_valid && 'combination' in conversion_data && conversion_data.combination; is_valid = is_valid && 'st' in conversion_data && conversion_data.st; is_valid = is_valid && ((conversion_data.type == 'optimizer' && 'trackcode' in conversion_data && conversion_data.trackcode.match(/^\d{9,}$/)) || (conversion_data.type == 'conversion')); return is_valid; }, 'sanitize_type' : function () { var type = 'conversion'; if ('type' in conversion_data) { switch (conversion_data.type) { case 'optimizer': type = conversion_data.type; break; default: break; } } return type; }, 'init' : function () { // if data not present, get it from the cookie if (!('conversion_data' in window)) { var data_from_cookie = conversion.getDataFromCookie(); if (!isEmpty(data_from_cookie)) { window.conversion_data = data_from_cookie; } } // check if conversion data is valid and conversion is running if ('conversion_data' in window) { conversion.is_running = 'is_running' in conversion_data && conversion_data.is_running; // check and set default type for the experiment conversion_data.type = conversion.sanitize_type(); if (conversion.is_running && conversion.check_valid_parameters()) { conversion.createSt(); conversion.createMkw(); } if (!('from_cookie' in conversion_data && conversion_data.from_cookie)) { if (conversion_data.type == 'conversion') { conversion.reportConversionTest(); } conversion.setDataToCookie(); if ('init' in conversion_data && typeof conversion_data.init == 'function') { conversion_data.init(); } } } }, 'createMkw' : function () { conversion.mkw = conversion_data.st; var mkw_remove_regex = /&mkw=[^&]*&/i; sCut = sCut.replace(mkw_remove_regex, '&'); }, 'getMkw' : function () { return (conversion.mkw ? ('&mkw=' + conversion.mkw) : ''); }, 'createSt' : function () { try { var st = parseInt(conversion_data.st); if (!isNaN(st)) { conversion.st = st.toString(); } } catch (err) { conversion.st = null; } var st_regex_remove = /&st=[^&]*&/i; sCut = sCut.replace(st_regex_remove, '&'); }, 'getSt' : function () { return (conversion.st ? ('&st=' + conversion.st) : ''); }, 'getDataFromCookie' : function () { var conversion_data = {}; var cookie_conversion_data = getCookie('conversion_data'); if (cookie_conversion_data != null) { var data_arr = cookie_conversion_data.split('&'); for (var i in data_arr) { var pair = data_arr[i].split('='); if (pair.length > 1 && pair[0]) { conversion_data[pair[0]] = pair[1]; } } conversion_data['from_cookie'] = true; } return conversion_data; }, 'setDataToCookie' : function () { var conversion_str = ''; for (var key in conversion_data) { if (typeof conversion_data[key] != 'function') { if (key == 'from_cookie') { continue; } conversion_str += key + '=' + conversion_data[key] + '&'; } } if (conversion_str[conversion_str.length - 1] == '&') { conversion_str = conversion_str.substr(0, conversion_str.length - 1); } var date = new Date(); date.setTime(date.getTime() + 7200000); setCookie('conversion_data', conversion_str, '/', date); }, 'reportConversionTest' : function () { var action = 'test' + (conversion.is_stage ? '-stage' : ''); try { if (conversion_data.type == 'optimizer') { if ('gwoTracker' in window && '_trackPageview' in gwoTracker && conversion.trackcode != '') { gwoTracker._trackPageview('/' + conversion_data.trackcode + '/test'); } } else { if ('pageTracker' in window && '_trackEvent' in pageTracker && conversion.mkw != '') { var category = 'conversion/testid' + conversion_data.test_id + '_phase' + conversion_data.phase + '/' + conversion_data.combination; pageTracker._trackEvent(category, action); } } } catch (err) { } }, 'reportConversionGoal' : function (i_product) { var product = typeof i_product == 'string' ? i_product : 'casino'; var action = 'goal' + (conversion.is_stage ? '-stage' : ''); try { if (conversion_data.type == 'optimizer') { if ('gwoTracker' in window && '_trackPageview' in gwoTracker && conversion.trackcode != '') { gwoTracker._trackPageview('/' + conversion_data.trackcode + '/goal'); } } else { if ('pageTracker' in window && '_trackEvent' in pageTracker && conversion.mkw != '') { var category = 'conversion/testid' + conversion_data.test_id + '_phase' + conversion_data.phase + '/' + conversion_data.combination; pageTracker._trackEvent(category, action, product); } } } catch (err) { } } }; addLoadEvent(conversion.init); openExitPage = function () { if ( getCookieStatus('show_exit_popup') == true){ if(getCookieStatus('downloaded') == false ){ //set the download link to RCC - need to add DL nuber var w = 800; var h = 600; var l = (window.screen.width-w)/2; var t = (window.screen.height-h)/2; var exitpopup = window.open("/exitpopup.htm", "exitpopup", "resizable=no,status=no,scrollbars=no,toolbar=no,menubar=no,left=" + l + ",top=" + t + ",width=" + w + ",height=" + h); setDownloadStatus(); } } } function mouseDown(e){ var theEvent = e || window.event; var ref = ""; var srcEl = theEvent.srcElement || theEvent.target; //check if the element that was pressed was an anchor while ((srcEl != null) && (srcEl.tagName != "A") && (srcEl.tagName != "AREA") && (srcEl.tagName != "BODY")) srcEl = srcEl.parentElement || srcEl.parentNode; //DO NOT show exit popup (clicked on inner link or entry popup - #) if ( (srcEl.tagName == "A") || (srcEl.tagName == "AREA") &&(srcEl != null) && ( (srcEl.href).indexOf("#") == -1 ) && srcEl.href != window.location.href ) { setCookie('show_exit_popup', '0', '/'); } } //show exit popup - initiate setCookie('show_exit_popup', '1', '/'); //bind before unload event ... close window addEvent(window, 'beforeunload', openExitPage); addLoadEvent(function () { addEvent(document.body, 'mousedown', mouseDown); }); function getCookieStatus(cookieName) { if( getCookie(cookieName)== '1' ) return true; else return false; }