function rollover(tid,name,val){
if(selectedtab[tid]==val) return;
 celldesc=document.getElementById(name+val);
 celldesc.className="sosdn";
}

function rollout(tid,name,val){
if(selectedtab[tid]==val) return;
 celldesc=document.getElementById(name+val);
 celldesc.className="sosup";
}

function sostabselect(tid, tname, dname, val, pageId) {
    //alert(pageId);

//if(selectedtab[tid]==val) return;
  celldesc=document.getElementById(tname+selectedtab[tid]);
  celldesc.className="sosup";
  divinfo=document.getElementById(dname+selectedtab[tid]);
  divinfo.style["display"]="none";
  divinfo.style["visibility"]="hidden";
 
  celldesc=document.getElementById(tname+val);
  celldesc.className="sosdn";
  divinfo=document.getElementById(dname+val);
  divinfo.style["display"]="block";
  divinfo.style["visibility"] = "visible";
  if (val == 1) {      
      var url = "https://strade.sharekhan.com/rmmweb/content/trade_login.jsp?id="+ pageId;
      divinfo.innerHTML = '<iframe id="TrdLoginFrame" style="width: 100%; " name="TrdLoginFrame" align="absMiddle" src=\''+ url +'\' frameborder="0"></iframe>';
  }
  if (val == 2) {
      if(offlineErrorId != "5")
      {
          divinfo.innerHTML = '<div id="divOfflineErrorMessage" style="color:Red; text-align:center;">&nbsp;</div><iframe id="LoginGround1_TrdGroundFrame" style="width: 100%; text-align:left;" name="TrdGroundFrame" align="absMiddle" src="https://strade.sharekhan.com/eodweb/branch/offline_login.jsp" frameborder="0"></iframe>';
      }
      else
      {
        divinfo.innerHTML = '<div id="divOfflineErrorMessage" style="color:Red; text-align:center;">Login Failed. Please check your Login Id and Password!!</div><iframe id="LoginGround1_TrdGroundFrame" style="width: 100%; text-align:left;" name="TrdGroundFrame" align="absMiddle" src="https://strade.sharekhan.com/eodweb/branch/offline_login.jsp" frameborder="0"></iframe>';
      }
  }
  selectedtab[tid]=val;
}
