

	function launchWebInteractionWithData(wiTemplate, wiRouteCode, customerName, webinterhostname, doAuth, ceccauthcommandURL, camserviceentity, camservicetype, camstartlevel)
	{
        if ( top.name == null || top.name == "" ) {
             top.name="HSBC Internet Banking";
        }

        if(top.webInteractionWCWindow != null && !top.webInteractionWCWindow.closed) {
            top.webInteractionWCWindow.focus();
        } else {

            var ceccWidth = Math.min(screen.availHeight, 720);
            var ceccHeight = Math.min(screen.availHeight-28, 640);
            var ceccFeatures = "screenX=0,left=0,screenY=0,top=0,";
            ceccFeatures += "scrollbars,resizable,";
            ceccFeatures += "width="+ceccWidth+",height="+ceccHeight;

			// wi host address comes from webinteraction.properties file
			// in test it is www.uniphitest.hsbc.co.uk
			// in live it is www.ecs621.hsbc.co.uk
			var ceccURL = "https://"+webinterhostname+"/wi/servlet/HSBCHelpRequest";

			// web interaction specific items that are built from the
			// parameters supplied in the href.
			ceccURL += "?WI_TemplateName=/"+wiTemplate;
			ceccURL += "&WI_BusinessApplicationID="+wiRouteCode;
			ceccURL += "&ASPECT_CALL_ROUTECODE="+wiRouteCode;
        		ceccURL += "&WI_BrowserShareWindowName="+top.name;
	            	ceccURL += "&t="+(new Date()).getTime();

			ceccURL += "&DoAuth="+doAuth;

			// this url is built dynamically by the WebInteractionView
			// it consists of the internal URL of the CEE P2G server, the sessionid, and the CECCAuth Command URL
			ceccURL += "&AuthURL="+ceccauthcommandURL;
            		//ceccURL += "&AuthCookie="+document.cookie;
            		ceccURL += "&AuthCookie="+encodeURIComponent(document.cookie);

            		// CAM Service Entity and Type - taken from CAM
			ceccURL += "&CAMServiceEntity="+camserviceentity;
			ceccURL += "&CAMServiceType="+camservicetype;

			// The current CAM level, obtained from CAM when the page is output.
			// When the button is clicked, WebInter compares this with the value returned from
			// the AuthURL above. If it has dropped, then a 'You have been logged out' error is displayed.
			ceccURL += "&CAMStartLevel="+camstartlevel;

			// customer name is not available in CAM
			// hopefully region specific 2G can supply this in the href
			ceccURL += "&CUSTOMERNAME="+customerName;
			//ceccURL += "&CUSTOMERNAME="+encodeURIComponent(document.customerName);

            top.webInteractionWCWindow = window.open(ceccURL, "ContactMeWebChat", ceccFeatures);
        }
        // return false so that when javascript is enabled the
        // 'JavascriptNotEnabled' page is not launched.
        return false;
}