
//A function to get the parameters from URL string
function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}



/*function popUpAIPCalc(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=740,height=410,left = 460,top = 320');");
}
*/



function openRIA(l_country_code,l_app_id)
{

var l_day = new Date();
var l_id = l_day.getTime();



  if(l_country_code =='ae')
  {

    if(l_app_id == "rp")
    {
      window.open("http://www.standardchartered.ae/RichApps/RiskProfiler/index.html",l_id,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=410,left=160,top=220');
    }
    if(l_app_id == "hc")
    {
      //window.location = "FinHealthCheck/index.html";
      window.open("http://www.standardchartered.ae/RichApps/FinHealthCheck/index.html",l_id,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=410,left=160,top=220');
    }
  }

  if(l_country_code =='my')
  {

    if(l_app_id == "rp")
    {
      window.open("http://www.standardchartered.com.my/RichApps/RiskProfiler/index.html",l_id,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=410,left=160,top=220');
    }
    if(l_app_id == "hc")
    {
      //window.location = "FinHealthCheck/index.html";
      window.open("http://www.standardchartered.com.my/RichApps/FinHealthCheck/index.html",l_id,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=410,left=160,top=220');
    }
  }


  if(l_country_code =='in')
  {

    if(l_app_id == "rp")
    {
      //window.location = "http://www.google.com/";
      window.open("http://www.standardchartered.co.in/RichApps/RiskProfiler/index.html",l_id,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=410,left=160,top=220');
    }
    if(l_app_id == "hc")
    {
      //window.location = "FinHealthCheck/index.html";
      window.open("http://www.standardchartered.co.in/RichApps/FinHealthCheck/index.html",l_id,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=740,height=410,left=160,top=220');
    }
  }





}



