function fixUrl(url_string)
{
if (url_string.indexOf("assets.nsf")==-1)
{
url_string=url_string.replace(/\//g,"-");
url_string="/echannel/content.nsf/vwAcctglink/"+url_string.substring(1);
}
return(url_string);
}
function setCookieSM(name, value, expiredays, path, domain)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
var curCookie = name + "=" + (value) +
((expiredays) ? "; expires=" + exdate.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "");
document.cookie = curCookie;
}
function getCookieSM(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1)
{
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end))
}
}
return ""
}
function setAABSRegFormCookieTest()
{
var dm=location.hostname;
setCookieSM('MemberID_',ValidationID_val,365000,'/',dm);
}
function setAABSRegFormCookie()
{
var dm="echannelstg.ey.com";
setCookieSM('MemberID_',(document.getElementsByName('ValidationID_')[0].value),365000,'/',dm);
}
function checkAABSCookie(PopupWindow)
{
MemberID_=getCookieSM("MemberID_");
ValidationID_=getCookieSM("ValidationID_");
url=location.href;
if (ValidationID_!="")
{
Delete_Cookie('MemberID_','/',"ey.com");
setCookieSM('MemberID_',ValidationID_,365000,'/',"ey.com");
Delete_Cookie('ValidationID_','/',"ey.com");
Delete_Cookie('AABSRegFormFilled','/',"ey.com");
}
if (url.indexOf("MemberID_")!=-1)
{
cookieVal=url.substring(url.lastIndexOf("MemberID_")+10);
setCookieSM('MemberID_',cookieVal,365000,'/',"ey.com");
}
else if (MemberID_=="")
{
document.write("");
}
}
/* Start - Webtrends */
function dcsVar(){
var dCurrent=new Date();
WT.tz=dCurrent.getTimezoneOffset()/60*-1;
if (WT.tz==0){
WT.tz="0";
}
WT.bh=dCurrent.getHours();
WT.ul=navigator.appName=="Netscape"?navigator.language:navigator.userLanguage;
if (typeof(screen)=="object"){
WT.cd=screen.colorDepth;
WT.sr=screen.width+"x"+screen.height;
}
if (typeof(navigator.javaEnabled())=="boolean"){
WT.jo=navigator.javaEnabled()?"Yes":"No";
}
if (ContentPageTitle){
WT.ti=ContentPageTitle;
}
WT.js="Yes";
if (typeof(gVersion)!="undefined"){
WT.jv=gVersion;
}
WT.sp="@@SPLITVALUE@@";
DCS.dcsdat=dCurrent.getTime();
DCS.dcssip=window.location.hostname;
DCS.dcsuri=window.location.pathname;
if (window.location.search){
DCS.dcsqry=window.location.search;
}
if ((window.document.referrer!="")&&(window.document.referrer!="-")){
if (!(navigator.appName=="Microsoft Internet Explorer"&&parseInt(navigator.appVersion)<4)){
DCS.dcsref=window.document.referrer;
}
}
DCS.dcsaut = "-";
WT.dcs_id = gDcsId;
}
function A(N,V){
return "&"+N+"="+dcsEscape(V);
}
function dcsEscape(S){
if (typeof(RE)!="undefined"){
var retStr = new String(S);
for (R in RE){
retStr = retStr.replace(RE[R],R);
}
return retStr;
}
else{
return escape(S);
}
}
function dcsCreateImage(dcsSrc){
if (document.images){
gImages[gIndex]=new Image;
gImages[gIndex].src=dcsSrc;
gIndex++;
}
else{
document.write('
');
}
}
function dcsMeta(){
var myDocumentElements;
if (document.all){
myDocumentElements=document.all.tags("meta");
}
else if (document.documentElement){
myDocumentElements=document.getElementsByTagName("meta");
}
if (typeof(myDocumentElements)!="undefined"){
for (var i=1;i<=myDocumentElements.length;i++){
myMeta=myDocumentElements.item(i-1);
if (myMeta.name){
if (myMeta.name.indexOf('WT.')==0){
WT[myMeta.name.substring(3)]=myMeta.content;
}
else if (myMeta.name.indexOf('DCSext.')==0){
DCSext[myMeta.name.substring(7)]=myMeta.content;
}
else if (myMeta.name.indexOf('DCS.')==0){
DCS[myMeta.name.substring(4)]=myMeta.content;
}
}
}
}
}
function dcsTag(){
var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+(gDcsId==""?'':'/'+gDcsId)+"/dcs.gif?";
for (N in DCS){
if (DCS[N]){
P+=A(N,DCS[N]);
}
}
for (N in WT){
if (WT[N]){
P+=A("WT."+N,WT[N]);
}
}
for (N in DCSext){
if (DCSext[N]){
P+=A(N,DCSext[N]);
}
}
if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){
P=P.substring(0,2040)+"&WT.tu=1";
}
dcsCreateImage(P);
}
function clearWTVars(){
DCS.dcsuri = "";
WT.oss_r = "";
WT.oss = "";
if(DCSext) {
DCSext.entrytype = "";
DCSext.linktitle = "";
DCSext.country = "";
DCSext.language = "";
DCSext.organization = "";
DCSext.taxonomy = "";
DCSext.sitepath = "";
DCSext.searchdomain = "";
}
}
function WebTrends(url){
url=fixUrl(url);
clearWTVars();
dcsVar();
dcsMeta();
WT.ti=document.title;
DCSext.linktitle = "";
DCSext.country = "";
DCSext.language = "";
DCSext.organization = "";
DCSext.taxonomy = "";
DCSext.sitepath = "";
DCS.dcsuri= url;
dcsTag();
}
function WebTrends_5(url, taxonomy, linktitle){
url=fixUrl(url);
clearWTVars();
dcsVar();
dcsMeta();
DCSext.entrytype = "link";
DCSext.linktitle = decodeURIComponent(linktitle);
//DCSext.country = themeCountry;
//DCSext.language = themeLang;
//DCSext.organization = organization;
DCS.dcsuri= url;
dcsTag();
//WT.ti=document.title;
WT.ti=linktitle;
//alert (WT.ti);
}
function WebTrends_generic_5(url, taxonomy, linktitle, entrytype){
url=fixUrl(url);
clearWTVars();
dcsVar();
dcsMeta();
DCSext.entrytype = entrytype;
DCSext.linktitle = decodeURIComponent(linktitle);
DCSext.country = themeCountry;
DCSext.language = themeLang;
DCSext.organization = organization;
DCS.dcsuri= url;
WT.ti=document.title;
dcsTag();
}
function WebTrends_OurLocations_5(url, taxonomy, linktitle, entrytype, locCountry, locState, locCity){
url=fixUrl(url);
clearWTVars();
dcsVar();
dcsMeta();
DCSext.entrytype = entrytype;
DCSext.linktitle = decodeURIComponent(linktitle);
DCSext.country = themeCountry;
DCSext.language = themeLang;
DCSext.organization = organization;
DCSext.locCity = locCity;
DCSext.locState = locState;
DCSext.locCountry = locCountry;
DCS.dcsuri= url;
WT.ti=document.title;
dcsTag();
}
function WebTrends_Search_5(searchTerm, searchDomain){
clearWTVars();
dcsVar();
dcsMeta();
WT.oss=searchTerm;
WT.ti=document.title;
DCS.dcsuri= location.href;
DCSext.entrytype = "search";
DCSext.searchdomain= searchDomain;
DCSext.country = themeCountry;
DCSext.language = themeLang;
DCSext.organization = organization;
dcsTag();
}
function WebTrends_SearchResult_5(searchTerm, noOfSearchResults){
clearWTVars();
dcsVar();
dcsMeta();
WT.oss=searchTerm;
WT.ti=document.title;
WT.oss_r=noOfSearchResults;
DCS.dcsuri= location.href;
DCSext.entrytype = "searchresult";
DCSext.country = themeCountry;
DCSext.language = themeLang;
DCSext.organization = organization;
dcsTag();
}
function generic_OurLocations_WT(url, taxonomy, linktitle, target, entrytype, locCountry, locState, locCity) {
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
WebTrends_OurLocations_5(url, taxonomy, linktitle, entrytype, locCountry, locState, locCity);
}
function generic_WT(url, taxonomy, linktitle, target, entrytype){
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
WebTrends_generic_5(url, taxonomy, linktitle, entrytype);
url=fixUrl(url);
if ( url != null && url != ""){
if (url.toLowerCase().indexOf('/publication/vwluassets/') > -1) {
if (target=="_self" || target=="_top") {
location.href=url;
return false;
} else {
return open_doc_iqlinks(url);
}
} else {
url = window.ECHPVW?ECHPVW(url):url;
if (target=="_blank") {
return open_doc_iqlinks(url);
} else {
location.href=url;
return false;
}
}
}
}
function generic_link_WT_direct(url, linktitle){
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
WebTrends_5(url, '', linktitle);
location.href=url;
return false;
}
function generic_link_WT_pdf(url, blankval, linktitle){
WT.dl=20;
WT.ti=linktitle;
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
WebTrends_5(url, '', linktitle);
location.href=url;
return false;
}
function generic_campaign_WT(url, taxonomy, linktitle){
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
//This function is used only for pdf documents
DCSext.contentCountry = "";
DCSext.contentLanguage = "";
WebTrends_5(url, taxonomy, linktitle);
if ( url != null && url != ""){
location.replace(url);
}
}
function generic_link_WT(url, taxonomy, linktitle, target){
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
WebTrends_5(url, taxonomy, linktitle);
if ( url != null && url != ""){
if (url.toLowerCase().indexOf('/publication/vwluassets/') > -1) {
if (target=="_self" || target=="_top") {
location.href=url;
return false;
} else {
return open_doc_iqlinks(url);
}
} else {
url = (window.ECHPVW?ECHPVW(url):url);
if (target=="_blank") {
return open_doc_iqlinks(url);
} else {
location.href=url;
return false;
}
}
}
}
function generic_search_WT(searchTerm, searchDomain, actionURL, frmObj){
WebTrends_Search_5(searchTerm, searchDomain);
//frmObj.action = actionURL;
frmObj.submit();
}
function generic_searchresult_WT(searchTerm, noOfSearchResults){
WebTrends_SearchResult_5(searchTerm, noOfSearchResults);
}
function copyToClipBoard(data){
var clipRet = false;
try{
clipRet = window.clipboardData.setData("Text",data);
}
catch(e){
}
finally{
return clipRet;
}
}
function generic_link_ctrl_image(url){
url=fixUrl(url);
try{
if (event && (event.ctrlKey)){
if (url && url != ""){
if (copyToClipBoard(decodeURIComponent(url))){
event.cancelBubble = true;
event.returnValue = false;
return false;
}
}
}
}
catch(e){
}
WebTrends(url);
if ( url != null && url != ""){
if ( url.substr(0,1) == "/" ){
location.href=url;
return false;
}
else{
return open_doc_iqlinks(url);
}
}
}
function generic_link(url){
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
WebTrends(url);
if ( url != null && url != ""){
if ( url.substr(0,1) == "/" ){
location.href=url;
return false;
}
else{
return open_doc_iqlinks(url);
}
}
}
function generic_link_options(url, taxonomy, linktitle, name,features){
url=fixUrl(url);
if (url.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
WebTrends_5(url, taxonomy, linktitle);
if ( url != null && url != ""){
return open_doc_iqlinks_options(url,name,features);
}
}
function open_doc_iqlinks_options(appURL,name,features){
appURL=fixUrl(appURL);
if (appURL.indexOf("alert://") != -1){
displayAlert(appURL);
return false;
}
var docWind = window.open(appURL, name, features);
docWind.focus();
return false;
}
function open_doc_iqlinks(appURL){
appURL=fixUrl(appURL);
if (appURL.indexOf("alert://") != -1){
displayAlert(url);
return false;
}
if (appURL.toLowerCase().indexOf(".exe")>1){
args = (decodeURIComponent(appURL));
arrArgs = args.split(",");
if(arrArgs.length==3){
LaunchIt(arrArgs[0],arrArgs[1],arrArgs[2]);
}
else(alert (msg0));
}
else if((appURL.toLowerCase().indexOf("mailto")>=0)||(appURL.toLowerCase().indexOf("notes:"))>=0){
location.href = appURL;
}
else{
var docWind = window.open(appURL, "", "");
docWind.focus();
}
}
function LaunchIt(appPath, appKey, appCommonName){
var ws;
try{
ws = new ActiveXObject("WScript.Shell");
}
catch(e){
alert(msg1);
return;
}
try{
ws.run(appPath);
}
catch(e){
try{
;
regKey=ws.RegRead(decodeURIComponent(appKey));
}
catch(e){
alert(appCommonName + msg2 );
return;
}
alert(appCommonName + msg3);
}
}
/* NOT USING IN ECHANNEL */
function Launchnotes(db){
var ws;
try{
ws = new ActiveXObject("WScript.Shell");
}
catch(e){
alert(msg1);
return;
}
try{
ws.run("notes.exe " + db, 1, true);
ws.AppActivate("Lotus Notes");
}
catch(e){
var notesdir;
try{
notesdir=ws.RegRead("HKEY_LOCAL_MACHINE\\Software\\Ernst & Young LLP\\EY/Knowledge Web\\Installation\\NotesDll");
}
catch(e){
alert(msg4);
return;
}
try{
notesdir = notesdir.toLowerCase();
var pos = notesdir.indexOf("nnotes.dll");
notesdir = notesdir.substring(0, pos);
ws.run(notesdir +"notes.exe " + db, 1, true);
ws.AppActivate("Lotus Notes");
}
catch(e){
alert(msg4);
}
}
}
/* End- Webtrends */