var server_base_url = "http://leadindia.itimes.com"; var toi_base_url = "http://www.lead.timesofindia.com";function widget_url_append() {
  if (document.getElementById('widget_return_url')) {
    document.getElementById('return').value=window.location;
  }
}
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 gup_return(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 setActionPath(base_url) {
  if ( document.login_form.login.value == '' || document.login_form.login.value == null ) {
      document.getElementById('lead_login_error_message').style.display = 'block';
      document.getElementById('lead_login_error_message').innerHTML="Please Enter Username."
      return false;
  }
  else if ( document.login_form.passwd.value == '' || document.login_form.passwd.value == null ) {
      document.getElementById('lead_login_error_message').style.display = 'block';
      document.getElementById('lead_login_error_message').innerHTML="Please Enter Password."
      return false;
  }
  var lead_india_external = new Array('', 'About', 'Democracy', 'Peril', 'LeaderShipVaccum', 'MediaRoom', '', 'PoliticalBackground');

  var return_url = gup_return('return');
  if (return_url == "") {
    var return_main = gup_return('return_main');
    if (return_main == "") {
      return_url = window.location;
    } else {
      return_url = server_base_url+'/leadindia.php?return_main='+return_main;
    }

  } else {
    return_url = server_base_url+return_url;
  }
  var g_invite = gup('g_invite');
  if (g_invite != "") {
    return_url = return_url+'&g_invite='+g_invite;
  }
  var url = server_base_url+'/dologin.php?return='+return_url;
  var nru = toi_base_url+'/Home.aspx?err=2';
  url ="http://login.itimes.com/logonnew.aspx?ru="+url+"&IS=7b6527ab-2c4c-4ef2-b968-5cf6ab2b87dd&NS=leadindia&HS=eLLlf7iUvRfcNgaWnvg560RpPhI=&nru="+nru+"";
//url = "http://login.itimes.com/Logon.aspx?ru=http://leadindia.itimes.com/dologin.php?return="+return_url+"&IS=7b6527ab-2c4c-4ef2-b968-5cf6ab2b87dd&NS=leadindia&HS=eLLlf7iUvRfcNgaWnvg560RpPhI=&nru="+nru+"";
//        url = "http://login.itimes.com/logonnew.aspx?ru="+url+"&IS=6fff66bc-e4bf-4e62-9cf1-8a05cfcbdd75&ns=idiva&HS=pvkx41mrq4pnJy55YKDoHQfjvrQ%3d&nru="+nru+"";
//         url = "http://login.itimes.com/Logon.aspx?ru="+url+"&IS=6fff66bc-e4bf-4e62-9cf1-8a05cfcbdd75&NS=Times&HS=pvkx41mrq4pnJy55YKDoHQfjvrQ=";
  document.forms['login_form'].action=url;
  document.forms['login_form'].submit();
}
function show_why_register_lead() {
  txt = "Sign up so that you can participate in the Lead India '09 communities, blog, and win contests and quizzes. Become a part of this nationwide movement; pledge your support.Existing itimes members can use same username and password to signin.";
  show_help_tip('why_register_lead', txt, 80, 0);
   var hide_bubble = "document.getElementById('bubble_body').style.display='none';document.getElementById('bubble_body_green').style.display='none';";
  clear_bubble_hide = window.setTimeout(hide_bubble,3000);
}
function show_help_tip(field_id, text, a, b) {
  document.getElementById('bubble_body_green').style.display='block';
  document.getElementById('bubble_body').style.display='none';
  showToolTip_help(field_id, text, a, b);
}
function showToolTip_help(field_id, text, a, b){
  var field_obj = document.getElementById(field_id);
  var leftPos = findPosX(field_obj) + a;
  var rightPos = findPosY(field_obj) - b;
  var obj = document.getElementById('bubble_body_green');
  var obj2 = document.getElementById('bubble_text_green');
  obj2.innerHTML = text;
  obj.style.display = 'block';
  if(leftPos<0)leftPos = 0;
  obj.style.left = leftPos + 'px';
  var obj_height = obj.offsetHeight;
  var obj_width = obj.offsetWidth;
  obj.style.top = rightPos + 'px';
//   document.getElementById('bubble_iframe').style.top = rightPos+'px';
//   document.getElementById('bubble_iframe').style.left = (leftPos+10)+'px';
//   document.getElementById('bubble_iframe').style.display = 'block';
//   document.getElementById('bubble_iframe').style.height = obj_height+'px';
//   document.getElementById('bubble_iframe').style.width = (obj_width-15)+'px';
}
function findPosX(obj)
{
  var curleft = 0;
  if (obj.offsetParent)
  {
    while (obj.offsetParent)
    {
      curleft += obj.offsetLeft;
      obj = obj.offsetParent;
    }
  }
  else if (obj.x)
    curleft += obj.x;
  return curleft;
}

function findPosY(obj)
{
  var curtop = 0;
  if (obj.offsetParent)
  {
    while (obj.offsetParent)
    {
      curtop += obj.offsetTop
      obj = obj.offsetParent;
    }
  }
  else if (obj.y)
    curtop += obj.y;
  return curtop;
}
function display_lead_login_err () {
  var error_flag = gup('err');
  if (error_flag == '2') {
    document.getElementById('lead_login_error_message').innerHTML = 'Invalid user name or password';
    document.getElementById('lead_login_error_message').style.display='block';
  }
}
document.getElementById('lead_login_widget').innerHTML = '<wbr /><style type="text/css"><!--\n     .lead_col_a {\n        width:280px;/*285px, 315px(modified), 295px*/\n        float:left;\n        margin:0px;\n        padding:5px 0 0 18px;  /*0 0 0 18px; (modified)*/\n      }\n    *ht ml .lead_col_a {\n        padding:0 0 0 22px;\n         width:325px;/*285px*/\n      }\n      a img {\n        border:0;\n      }\n      .lead_heading {\n          float: left;\n          width: 100%;\n          height: 20px;\n          background:url(http://leadindia.itimes.com/Widgets/LoginWidget/images/module_header_bg.gif) no-repeat 0 2px;\n          font-size:22px;\n          font-family:Impact;\n          color:#000;\n        }\n        .lead_heading span {\n            float: left;\n            padding: 0 0 0 40px;\n            text-transform:uppercase;\n          }\n          .lead_heading strong {\n            float: right;\n            color: #993233;\n            font-size: 11px;\n            font-family: Arial;\n            padding: 6px 15px 0 0;\n          }\n          .lead_heading strong a:link,\n          .lead_heading strong a:active,\n          .lead_heading strong a:visited {\n            color: #993233;\n            text-decoration: underline;\n          }\n          .lead_heading strong a:hover {\n            text-decoration: none;\n          }\n.sign_module {\n  float: left;\n  width: 100%;\n  padding:10px 0;\n}\n.sign_module span {\n  float: left;\n  width: 100%;\n  padding:0 0 0;\n}\n.sign_module span label {\n  float: left;\n  width: 170px; /*190px;(modified)*/\n  padding:0;\n  font-size:10px;\n}\n.sign_module span dfn {\n  float: left;\n  width: 30%;\n  padding:0;\n}\n.sign_module span cite {\n  float: left;\n  width: 22%;\n  padding:0;\n  font-size:11px;\n  font-style:normal;\n  font-weight:bold;\n}\n.sign_module span code {\n  float: left;\n  width: 49%;\n  padding:0;\n  font-family:Arial;\n  font-size:11px;\n  font-size:10px;\n}\n.sign_module span code input {\n  float: left;\n  width: 120px;\n  padding:0;\n  font-family:Arial;\n  font-size:11px;\n  font-size:10px;\n}\n.sign_module span del {\n  float: left;\n  width: 21%;\n  padding:0;\n  text-decoration:none;\n  font-size:10px;\n}\n.sign_module span em {\n  float: left;\n  width: 100%;\n  padding:5px;\n  text-align:right;\n  font-style:normal;\n  text-decoration:none;\n  font-size:10px;\n}\n.sign_module span i {\n  float: left;\n  background:lime;\n}\n.sign_module span em .logo_bg {\n  background:url(http://leadindia.itimes.com/Widgets/LoginWidget/images/Poweredbyitimesbig.png) no-repeat;\n  width:128px;\n  height:23px;\n}\n*html .sign_module span em .logo_bg {\n  background:none;\n  filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=\'true\',src=\'http://leadindia.itimes.com/Widgets/LoginWidget/images/Poweredbyitimesbig.png\');\n}\n.sign_module .required {\ncolor: red;\nfont-family:Arial;\nfont-size:10px;\npadding:0 0 10px 20px;\n}\n\n.bubble-n {\n    margin:0;\n    padding:0;\n    width:170px;\n    float:left;\n}\n.bubble-n  div.col-a {\n    margin:0;\n    padding:0;\n    width:13px;\n    float:left;\n    position:relative;\n    top:3px;\n    left:1px;\n}\n.bubble-n  div.col-b {\n    margin:0;\n    padding:0 5px;\n    width:150px !important;\n    height:31px;\n    float:left;\n    background:#FEFECC;\n    border:1px solid #9C9C9C;\n    font-size:12px;\n}\n#lead_login_widget {\n  float:left;\n  width:100%;\n  margin:0;\n  padding:0;\n}\n-->\n</style>\n<div class="lead_col_a"><div class="lead_heading">\n  <span>SIGN UP</span>\n  <strong id ="why_register_lead"><a  onmouseover="show_why_register_lead();" style="cursor:pointer;text-decoration:underline;">Why Register?</a></strong>\n</div>\n<div class="sign_module">\n  <span>\n    <label style="font-size:11px; width:98%; font-family:arial;text-align:left;">Fight  for yourself <tt style="font-size:11px; width:98%; font-family:arial;text-align:left;color:#9E2F1C;">&amp; you fight for the nation.</tt></label><br />\n    <dfn style="width:95%; padding:2px 15px 0 0; text-align:right;"><a href="http://leadindia.itimes.com/registration.php"><img src="http://leadindia.itimes.com/Themes/Beta/images/registernow.gif" alt="Register Now" /></a></dfn>\n  </span>\n</div>\n<div class="lead_heading" style="margin-top:-15px; position:relative;">\n  <span>SIGN IN</span>\n</div>\n\n<div class="sign_module">\n    <span class="required" id="lead_login_error_message" style="display:none;"></span>\n          <form name="login_form" action="" method="post" id="it_peopleaggregator"  onsubmit="return setActionPath(\'http://leadindia.itimes.com/dologin.php?return=\');">\n        <i style="float:left;margin-top:-9px; position:relative; padding-left:5px; text-align:left;width:95%; font-size:10px; font-style:normal;color:#484848;font-family:Arial;"> Login using your itimes/indiatimes/alternative email id</i>                 \n         <span style="padding-left:5px;">\n          <cite style="font-size:10px; font-family:arial;">Email Id:</cite>\n          <code><input tabindex="11" type="text"  name="login" value="" id="username" class="lead_signin"/></code>\n          <del>&nbsp;</del>\n        </span>\n        <span style="padding-left:5px;">\n          <cite style="font-size:10px; font-family:arial;">Password:</cite>\n          <code><input tabindex="12" type="password" name="passwd" value="" id="password" class="lead_signin" /></code>\n          <del style="margin-left:-5px;">\n            <input style="border:0;" type="image" src="http://leadindia.itimes.com/Themes/Beta/images/sign-inBtn.gif" name="submit" value="Sign In" class="lead_signin_btn">\n          </del>\n        </span>\n       <span>\n         <em>\n          <i class="logo_bg">&nbsp;</i><!--<img style="text-align:left; float:left; " src="http://leadindia.itimes.com/Themes/Beta/images/Poweredbyitimesbig.png" alt="Power" />-->\n         <a href="http://leadindia.itimes.com/forgot_password.php" style="color: #993233;text-decoration:underline; float:right; padding-right:16px; font-size:10px; font-family:arial;">Forgot password?</a></em>\n        </span>\n      </form>\n        <i style="float:left;"><img src="http://leadindia.itimes.com/Themes/Beta/images/line.gif" alt="Line" /></i>\n</div>\n<div class="it_module_shift">&nbsp;</div></div><div id="bubble_body" style="width:auto;position:absolute;left:490px;top:220px;display:none;z-index:1000;">\n  <div class="bubble-n" style="z-index:30;">\n    <div class="col-a">\n      <img id = "rightarrow" src="http://leadindia.itimes.com/images/l-arrow-n.gif" />\n    </div>\n    <div class="col-b" style="width:202px;padding:0 0 5px 4px;height:auto;">\n       <b style="position:relative;top:5px;"><img src="http://leadindia.itimes.com/images/red-cross-img.gif" /></b> \n        <b style="position:relative;top:2px;font-weight:normal;" id="bubble_text">  </b>\n    </div>\n  </div>\n</div>\n<div id="bubble_body_green" style="width:auto;position:absolute;left:490px;top:220px;display:none;z-index:20;">\n  <div class="bubble-n" style="z-index:30;">\n    <div class="col-a" >\n      <img id = "rightarrow" src="http://leadindia.itimes.com/images/l-arrow-n.gif" />\n    </div>\n    <div class="col-b" style="width:202px;padding:0 0 5px 4px;height:auto;">\n        <b style="position:relative;top:2px;font-weight:normal;" id="bubble_text_green">  </b>\n    </div>\n  </div>\n</div>\n';document.write('<script type="text/javascript" language="javascript">display_lead_login_err();</script>');