﻿// JScript File

//Function to call the login validation from header
function OnLoginClick(url)
{
    //alert("In here");
    //document.forms[0].action = "https://www.identityguard.com/Pages/asp/IN_PostLogon.asp?path=header";
    document.forms[0].action = url;
    document.forms[0].method = "post";
    document.forms[0].submit();
    return true;
    
}

function popUp(URL) 
{
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=570,height=435,left = 340,top = 150');");
}

function OnAcceptClick()
{
    if (( location.hostname == "staging.identityguard.com" ) || ( location.hostname == "test.identityguard.com" )
        || ( location.hostname == "dev.identityguard.com" ))
    {
        document.forms[0].action = "https://test38.intersections.com/pages2/english/postlogon.asp";
    }
    else
    {
        document.forms[0].action = "https://www.identityguard.com/pages2/english/postlogon.asp";
    }
    document.forms[0].method = "post";
    var mar = document.forms[0].elements["ctl00$mainContent$marketingid"];
    var act = document.forms[0].elements["ctl00$mainContent$actioncode"];
    mar.name = "marketing_id";
    act.name = "action_code";
    document.forms[0].submit();
    return true;
}
