function writeHugWebBugHTML(afk_html,currentTimeMilli_html) {
    //Record the browser name.
    var browserInfo_html = navigator.appName + "--";
    //Record the exact version number if IE or Netscape only.
    if (browserInfo_html.indexOf("Microsoft") != -1) {
        //IE
        browserInfo_html += navigator.userAgent.match(/MSIE \d+.\d+/);
    } else if (browserInfo_html.indexOf("Netscape") != -1) {
        //Netscape
        browserInfo_html += navigator.userAgent.match(/Netscape.*/);
    }

    //Record the platform name.
    browserInfo_html += "--" + navigator.platform;

    //Remove all spaces because their ASCII value, %20, gets printed.
    browserInfo_html = browserInfo_html.replace(/ /g,"");

    var hugBugUrl = "<img src=" + location.protocol + "//" + webBugURL + "/" + currentTimeMilli + "/index.wbg?||1||||" + afk_html + "||" + pageName_html + "||null||" + browserInfo_html + "||||30||||||||||||||||||||||||||||" + " width='1' height='1'>";
    document.write(hugBugUrl);
    
    
}

function writeHugWebBug_HTML(sid,afk_html,currentTimeMilli_html) {
    //Record the browser name.
    var browserInfo_html = navigator.appName + "--";
    //Record the exact version number if IE or Netscape only.
    if (browserInfo_html.indexOf("Microsoft") != -1) {
        //IE
        browserInfo_html += navigator.userAgent.match(/MSIE \d+.\d+/);
    } else if (browserInfo_html.indexOf("Netscape") != -1) {
        //Netscape
        browserInfo_html += navigator.userAgent.match(/Netscape.*/);
    }

    //Record the platform name.
    browserInfo_html += "--" + navigator.platform;

    //Remove all spaces because their ASCII value, %20, gets printed.
    browserInfo_html = browserInfo_html.replace(/ /g,"");

    var hugBugUrl = "<img src=" + location.protocol + "//" + webBugURL + "/" + currentTimeMilli + "/index.wbg?||1||" + sid + "||" + afk_html + "||" + pageName_html + "||null||" + browserInfo_html + "||||30||||||||||||||||||||||||||||" + " width='1' height='1'>";
    document.write(hugBugUrl);
    
    
}

function openProdDetail(prodDetailPage){
	var url = document.location.href;
	var url_array = url.split("/");
	var afk = url_array[5];

	window.open('../../../pxp/hug/generated/productdetail/'+prodDetailPage+'.html?afk='+afk,"myWin",'toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=545,height=379')
}
	
var url = document.location.href;
var url_array = url.split("/");
var afk_html = url_array[5];

var pageName_html = url_array[6];
if (pageName_html.indexOf("?") != -1) {
    var lastIndex = pageName_html.indexOf("?");
    pageName_html = pageName_html.substring(0,lastIndex);
}

var my_date_html = new Date();
currentTimeMilli_html = my_date_html.getTime();



