 s.prop1=""
 s.prop2=""
 s.prop3=""
 s.prop4=""
 s.prop5=""

if (document.question_form) {
  s.eVar4 = document.question_form.question_box.value;
  s.eVar4 = s.eVar4.toLowerCase();
}

if (s.products == "" || !s.products) {
  s.products = checkprodview();
  if (s.products != "") {
    s.events = "prodView";
  }
}

if (!s.eVar3 || s.eVar3 == "") {
  s.eVar3 = getLoginStatus();
  s.prop1 = getLoginStatus();
}

if (checkRegEvent() == 1) {
    s.events = "event1";
} else if (checkLoginEvent() == 1) {
    s.events = "event2";
}


/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code=s.t();if(s_code)document.write(s_code)

function checkprodview() {

  if (location.pathname == "/apps/commerce/developer/standard/") {
    return("Subscriptions;SVC0070");
  } else if (location.pathname == "/apps/commerce/rha/appserver/") {
    return("Subscriptions;SVC0184");
  } else if (location.pathname == "/apps/commerce/rha/cluster/") {
    return("Subscriptions;SVC0042");
  } else if (location.pathname == "/apps/commerce/rha/gfs/") {
    return("Subscriptions;SVC0080");
  } else if (location.pathname == "/apps/commerce/rhel/server/") {
    return("Subscriptions;SVC0020,SubscriptionsSV0021,Subscriptions;SV0030,Subscriptions;SV0031");
  } else if (location.pathname == "/apps/commerce/rhel/as/") {
    return("Subscriptions;SVC0020,Subscriptions;SVC0060,Subscriptions;SVC0081,Subscriptions;SVC0021,Subscriptions;SVC0022,Subscriptions;SVC0023,Subscriptions;SVC0024,Subscriptions;SVC0025,Subscriptions;SVC0026,Subscriptions;SVC0027,Subscriptions;SVC0028,Subscriptions;SVC0029");
  } else if (location.pathname == "/apps/commerce/rhel/client/") {
    return("Subscriptions;SVC0164,Subscriptions;SVC0165,Subscriptions;SVC0036,Subscriptions;SVC00037");
  } else if (location.pathname == "/apps/commerce/rhel/desktop/") {
    return("Subscriptions;SVC0164,Subscriptions;SVC0165");
  } else if (location.pathname == "/apps/commerce/rhel/es/") {
    return("Subscriptions;SVC0030,Subscriptions;SVC0031,Subscriptions;SVC0032,Subscriptions;SVC0033,Subscriptions;SVC0034,Subscriptions;SVC0035");
  } else if (location.pathname == "/apps/commerce/rhel/ws/") {
    return("Subscriptions;SVC0036,Subscriptions;SVC0037,Subscriptions;SVC0038,Subscriptions;SVC0039,Subscriptions;SVC0040,Subscriptions;SVC0041");
  } else if (location.pathname == "/apps/commerce/rhn/") {
    return("Subscriptions;SVC0060,Subscriptions;SVC0082,Subscriptions;SVC0081");
  } else if (location.pathname == "/software/rhel/compare/client/") {
    return("Subscriptions;SVC0164,Subscriptions;SVC0165");
  } else if (location.pathname == "/software/rhel/compare/server/asprem/") {
    return("Subscriptions;SVC0021,Subscriptions;SVC0021,Subscriptions;SVC0060,Subscriptions;SVC0021,Subscriptions;SVC0081");
  } else if (location.pathname == "/software/rhel/compare/z/") {
    return("Subscriptions;SVC0028,Subscriptions;SVC0029");
  } else if (location.pathname == "html/solutions/partners/hwp/buy/index.html") {
    return("Subscriptions;SVC0178");
  } else if (location.pathname == "/training/elearning/catalog/certification/rhce.html") {
    return("eLearning;BUN0079,eLearning;RHE0199,eLearning;RHE0200,eLearning;RHE0201,eLearning;RHE0202,eLearning;BUN0080,eLearning;RHE0203,eLearning;RHE0204,eLearning;RHE0205,eLearning;RHE0206,eLearning;BUN0081,eLearning;RHE0207,eLearning;RHE0208,eLearning;RHE0209,eLearning;RHE0210");
  } else if (location.pathname == "/training/elearning/catalog/certification/sunforjava2.html") {
    return("eLearning;RHE0156,eLearning;BUN0071,eLearning;RHE0152,eLearning;RHE0155,eLearning;RHE0157,eLearning;RHE0156");
  } else if (location.pathname == "/training/elearning/catalog/certification/sunforjava_jdk.html") {
    return("eLearning;RHE0021");
  } else if (location.pathname == "/training/elearning/catalog/index.html") {
    return("eLearning;BUN0078,eLearning;RHE0197,eLearning;RHE0198,eLearning;BUN0079,eLearning;RHE0199,eLearning;RHE0200,eLearning;RHE0201,eLearning;RHE0202,eLearning;BUN0080,eLearning;RHE0203,eLearning;RHE0204,eLearning;RHE0205,eLearning;RHE0206,eLearning;BUN0081,eLearning;RHE0207,eLearning;RHE0208,eLearning;RHE0209,eLearning;RHE0210,eLearning;BUN0001,eLearning;RHE0122,eLearning;RHE0123,;,eLearning;BUN0002,eLearning;RHE0119,eLearning;RHE0120,eLearning;RHE0121,eLearning;BUN0076,eLearning;RHE0158,eLearning;RHE0160,eLearning;BUN0077,eLearning;RHE0159,eLearning;RHE0158,eLearning;RHE0160,eLearning;BUN0071,eLearning;RHE0152,eLearning;RHE0155,eLearning;RHE0157,eLearning;BUN0068,eLearning;RHE0149,eLearning;RHE0150,eLearning;RHE0156,eLearning;BUN0069,eLearning;RHE0148,eLearning;RHE0195,eLearning;RHE0151,eLearning;RHE0161,eLearning;RHE0162,eLearning;RHE0163,eLearning;BUN0072,eLearning;RHE0167,eLearning;RHE0170,eLearning;RHE0171,eLearning;RHE0164,eLearning;RHE0165,eLearning;RHE0168,eLearning;RHE0166,eLearning;RHE0169,eLearning;BUN0073,eLearning;RHE0177,eLearning;RHE0178,eLearning;BUN0074,eLearning;RHE0181,eLearning;RHE0182,eLearning;RHE0183,eLearning;RHE0184,eLearning;BUN0075,eLearning;RHE0179,eLearning;RHE0180,eLearning;BUN0070,eLearning;RHE0192,eLearning;RHE0193,eLearning;RHE0141,eLearning;RHE0140,eLearning;RHE0142,eLearning;RHE0143,eLearning;RHE0144,eLearning;RHE0196,eLearning;RHE0194,eLearning;RHE0146,eLearning;RHE0147,eLearning;RHE0067,eLearning;RHE0190,eLearning;RHE0191");
  } else if (location.pathname == "/training/elearning/catalog/rhl.html") {
    return("eLearning;BUN0062,eLearning;RHE0047,eLearning;RHE0048,eLearning;BUN0066,eLearning;RHE0132,eLearning;RHE0133,eLearning;RHE0134,eLearning;RHE0135,eLearning;BUN0061,eLearning;RHE0136,eLearning;RHE0137,eLearning;RHE0138,eLearning;RHE0139");
  } else if (location.pathname == "/training/elearning/catalog/courses/ebusiness_architecture.html") {
    return("eLearning;RHE0143");
  } else if (location.pathname == "/training/elearning/catalog/courses/ebusiness_elements.html") {
    return("eLearning;RHE0144");
  } else if (location.pathname == "/training/elearning/catalog/courses/ecommerce_fundamentals.html") {
    return("eLearning;RHE0142");
  } else if (location.pathname == "/training/elearning/catalog/courses/it_client_server.html") {
    return("eLearning;RHE0146");
  } else if (location.pathname == "/training/elearning/catalog/courses/it_network_security.html") {
    return("eLearning;RHE0091");
  } else if (location.pathname == "/training/elearning/catalog/courses/it_project_management.html") {
    return("eLearning;RHE0194");
  } else if (location.pathname == "/training/elearning/catalog/courses/it_strategies.html") {
    return("eLearning;RHE0067");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_2fund1.html") {
    return("eLearning;RHE0152");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_2fund2.html") {
    return("eLearning;RHE0155");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_2gui_fund.html") {
    return("eLearning;RHE0157");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_beans_customizing.html") {
    return("eLearning;RHE0150");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_beans_intro.html") {
    return("eLearning;RHE0149");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_cert_2.html") {
    return("eLearning;RHE0156");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_enterprise_ejb.html") {
    return("eLearning;RHE0158");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_enterprise_ejb2.html") {
    return("eLearning;RHE0158");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_enterprise_entity.html") {
    return("eLearning;RHE0160");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_enterprise_entity2.html") {
    return("eLearning;RHE0160");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_jdbc_fundamentals.html") {
    return("eLearning;RHE0153");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_readerswriters.html") {
    return("eLearning;RHE0195");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_servlets.html") {
    return("eLearning;RHE0159");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_streams.html") {
    return("eLearning;RHE0148");
  } else if (location.pathname == "/training/elearning/catalog/courses/java_webprog.html") {
    return("eLearning;RHE0151");
  } else if (location.pathname == "/training/elearning/catalog/courses/linux_netadmin1.html") {
    return("eLearning;RHE0183");
  } else if (location.pathname == "/training/elearning/catalog/courses/linux_netadmin2.html") {
    return("eLearning;RHE0184");
  } else if (location.pathname == "/training/elearning/catalog/courses/linux_shell_basic.html") {
    return("eLearning;RHE0179");
  } else if (location.pathname == "/training/elearning/catalog/courses/linux_sysadmin1.html") {
    return("eLearning;RHE0181");
  } else if (location.pathname == "/training/elearning/catalog/courses/linux_sysadmin2.html") {
    return("eLearning;RHE0182");
  } else if (location.pathname == "/training/elearning/catalog/courses/net_security_fund.html") {
    return("eLearning;RHE0147");
  } else if (location.pathname == "/training/elearning/catalog/courses/networking_essentials_i.html") {
    return("eLearning;RHE0161");
  } else if (location.pathname == "/training/elearning/catalog/courses/networking_essentials_ii.html") {
    return("eLearning;RHE0162");
  } else if (location.pathname == "/training/elearning/catalog/courses/networking_essentials_iii.html") {
    return("eLearning;RHE0163");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_analysis1.html") {
    return("eLearning;RHE0167");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_analysis2.html") {
    return("eLearning;RHE0170");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_corba_fund.html") {
    return("eLearning;RHE0166");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_corba_wjava.html") {
    return("eLearning;RHE0169");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_design.html") {
    return("eLearning;RHE0171");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_design_intro.html") {
    return("eLearning;RHE0164");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_design_patterns.html") {
    return("eLearning;RHE0165");
  } else if (location.pathname == "/training/elearning/catalog/courses/object_uml_fund.html") {
    return("eLearning;RHE0168");
  } else if (location.pathname == "/training/elearning/catalog/courses/perl_5intro.html") {
    return("eLearning;RHE0192");
  } else if (location.pathname == "/training/elearning/catalog/courses/perl_web_advanced.html") {
    return("eLearning;RHE0193");
  } else if (location.pathname == "/training/elearning/catalog/courses/programming_fundamentals.html") {
    return("eLearning;RHE0196");
  } else if (location.pathname == "/training/elearning/catalog/courses/rdd_analysis.html") {
    return("eLearning;RHE0141");
  } else if (location.pathname == "/training/elearning/catalog/courses/rdd_modeling.html") {
    return("eLearning;RHE0140");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_desktop1.html") {
    return("eLearning;RHE0197");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_desktop2.html") {
    return("eLearning;RHE0198");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_intro1.html") {
    return("eLearning;RHE0199");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_intro2.html") {
    return("eLearning;RHE0200");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_intro3.html") {
    return("eLearning;RHE0201");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_intro4.html") {
    return("eLearning;RHE0202");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_intro_windows.html") {
    return("eLearning;RHE0211");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_netservicesa.html") {
    return("eLearning;RHE0207");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_netservicesb.html") {
    return("eLearning;RHE0208");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_securitya.html") {
    return("eLearning;RHE0209");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_securityb.html") {
    return("eLearning;RHE0210");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_sysadmin1a.html") {
    return("eLearning;RHE0203");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_sysadmin1b.html") {
    return("eLearning;RHE0204");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_sysadmin2a.html") {
    return("eLearning;RHE0205");
  } else if (location.pathname == "/training/elearning/catalog/courses/rhl_sysadmin2b.html") {
    return("eLearning;RHE0206");
  } else if (location.pathname == "/training/elearning/catalog/courses/unix_fundamentals_i.html") {
    return("eLearning;RHE0177");
  } else if (location.pathname == "/training/elearning/catalog/courses/unix_fundamentals_ii.html") {
    return("eLearning;RHE0178");
  } else if (location.pathname == "/training/elearning/catalog/courses/xml_advanced_enterprise.html") {
    return("eLearning;RHE0191");
  } else if (location.pathname == "/training/elearning/catalog/courses/xml_fundamentals.html") {
    return("eLearning;RHE0190");
  } else if (location.pathname == "/training/elearning/catalog/series/java_2_intro.html") {
    return("eLearning;BUN0071");
  } else if (location.pathname == "/training/elearning/catalog/series/java_beans.html") {
    return("eLearning;BUN0068");
  } else if (location.pathname == "/training/elearning/catalog/series/java_ent.html") {
    return("eLearning;BUN0077");
  } else if (location.pathname == "/training/elearning/catalog/series/java_entbeans.html") {
    return("eLearning;BUN0076");
  } else if (location.pathname == "/training/elearning/catalog/series/java_net.html") {
    return("eLearning;BUN0069");
  } else if (location.pathname == "/training/elearning/catalog/series/linux_admin.html") {
    return("eLearning;BUN0074");
  } else if (location.pathname == "/training/elearning/catalog/series/linux_shell.html") {
    return("eLearning;BUN0075");
  } else if (location.pathname == "/training/elearning/catalog/series/object_analysis.html") {
    return("eLearning;BUN0072");
  } else if (location.pathname == "/training/elearning/catalog/series/rhl_desktop.html") {
    return("eLearning;BUN0078");
  } else if (location.pathname == "/training/elearning/catalog/series/rhl_intro.html") {
    return("eLearning;BUN0079");
  } else if (location.pathname == "/training/elearning/catalog/series/rhl_intro_windows.html") {
    return("eLearning;BUN0082");
  } else if (location.pathname == "/training/elearning/catalog/series/rhl_networking.html") {
    return("eLearning;BUN0081");
  } else if (location.pathname == "/training/elearning/catalog/series/rhl_sysadmin.html") {
    return("eLearning;BUN0080");
  } else if (location.pathname == "/training/elearning/catalog/series/unix.html") {
    return("eLearning;BUN0073");
  } else if (location.pathname == "/training/elearning/catalog/series/web_perl.html") {
    return("eLearning;BUN0070");
  } else if (location.pathname == "/training/elearning/catalog/topic/database.html") {
    return("eLearning;RHE0141,eLearning;RHE0140");
  } else if (location.pathname == "/training/elearning/catalog/topic/ebusiness.html") {
    return("eLearning;RHE0142,eLearning;RHE0143,eLearning;RHE0144");
  } else if (location.pathname == "/training/elearning/catalog/topic/general_programming.html") {
    return("eLearning;RHE0196");
  } else if (location.pathname == "/training/elearning/catalog/topic/it_management.html") {
    return("eLearning;RHE0194,eLearning;RHE0146,eLearning;RHE0147,eLearning;RHE0067");
  } else if (location.pathname == "/training/elearning/catalog/topic/java.html") {
    return("eLearning;BUN0076,eLearning;RHE0158,eLearning;RHE0160,eLearning;BUN0077,eLearning;RHE0159,eLearning;RHE0158,eLearning;RHE0160,eLearning;BUN0071,eLearning;RHE0152,eLearning;RHE0155,eLearning;RHE0157,eLearning;BUN0068,eLearning;RHE0149,eLearning;RHE0150,eLearning;RHE0156,eLearning;BUN0069,eLearning;RHE0148,eLearning;RHE0195,eLearning;RHE0151,eLearning;RHE0153");
  } else if (location.pathname == "/training/elearning/catalog/topic/linux.html") {
    return("eLearning;BUN0073,eLearning;RHE0177,eLearning;RHE0178,eLearning;BUN0074,eLearning;RHE0181,eLearning;RHE0182,eLearning;RHE0183,eLearning;RHE0184,eLearning;BUN0075,eLearning;RHE0179,eLearning;RHE0180");
  } else if (location.pathname == "/training/elearning/catalog/topic/networking.html") {
    return("eLearning;RHE0161,eLearning;RHE0162,eLearning;RHE0163");
  } else if (location.pathname == "/training/elearning/catalog/topic/object.html") {
    return("eLearning;BUN0072,eLearning;RHE0167,eLearning;RHE0170,eLearning;RHE0171,eLearning;RHE0164,eLearning;RHE0165,eLearning;RHE0168,eLearning;RHE0166,eLearning;RHE0169");
  } else if (location.pathname == "/training/elearning/catalog/topic/rh_linux.html") {
    return("eLearning;BUN0078,eLearning;RHE0197,eLearning;RHE0198,eLearning;BUN0079,eLearning;RHE0199,eLearning;RHE0200,eLearning;RHE0201,eLearning;RHE0202,eLearning;BUN0082,eLearning;RHE0211,eLearning;RHE0199,eLearning;RHE0200,eLearning;RHE0201,eLearning;RHE0202,eLearning;BUN0080,eLearning;RHE0203,eLearning;RHE0204,eLearning;RHE0205,eLearning;RHE0206,eLearning;BUN0081,eLearning;RHE0207,eLearning;RHE0208,eLearning;RHE0209,eLearning;RHE0210");
  } else if (location.pathname == "/training/elearning/catalog/topic/web.html") {
    return("eLearning;BUN0070,eLearning;RHE0192,eLearning;RHE0193");
  } else {
    return("");
  }
}

function checkLoginEvent()
{
  var omni_login_value = getCookie("omni_login");
  if (omni_login_value) {
    deleteCookie( "omni_login", "/", "redhat.com" ) ;
    return(1);
  }

  return(0);
}

function checkRegEvent()
{
  var omni_reg_value;


  omni_reg_value = getCookie("omni_reg");
  if (omni_reg_value == 1) {
      deleteCookie( "omni_reg", "/", "redhat.com" ) ;
      deleteCookie( "omni_login", "/", "redhat.com" ) ;
      return(1);
  }
  return(0);
}

function getLoginStatus()
{
  var free_status;
  var paid_status;
  var rh_auth_value;
  var omni_login_value;
  var return_status;

  return_status = "Browser"
  rh_auth_value = getCookie("rh_auth_token");

  rh_sso_value = getCookie("rh_sso");
  rh_user_value = getCookie("rh_user");

  if (rh_sso_value == "") {
    return("Browser")
  }

  if (rh_user_value) {
    var rh_user_array = rh_user_value.split("|");
    var login_status = rh_user_array[2];
  }

  if (login_status == "member") {
    return("Logged in");
  }
  if (login_status == "customer") {
    return("Customer");
  }

  return (return_status);
}


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 setCookie( name, value, expires, path, domain, secure ) 
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct 
expires time, the current script below will set 
it for x number of days, to make it for hours, 
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
  expires = expires * 1000 * 60 * 60;
}

var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}
			
// this deletes the cookie when called
function deleteCookie( name, path, domain ) {
if ( getCookie( name ) ) document.cookie = name + "=" +
  ( ( path ) ? ";path=" + path : "") +
  ( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

