// Function for expanding and collapsing containers
function toggleContainer(n) 
{
  dvs=document.getElementsByTagName('div');
  ims=document.getElementsByTagName('img');
  info=document.getElementById('ctl00_CPH_Order_togglecontainer'+n);
  pic=document.getElementById('ShowHide'+n);
  
if(info.className=='expanded') {
   info.className='collapsed';
   pic.src='../App_Themes/default/images/icons/icn-box-plus.png';
}
else {
   info.className='expanded';
   pic.src='../App_Themes/default/images/icons/icn-box-minus.png';
  }
  
  if (n==1)//Login
  {
    info=document.getElementById('ctl00_CPH_Order_togglecontainer2');
    info.className = 'collapsed';
    pic = document.getElementById('ShowHide2');
    pic.src='../App_Themes/default/images/icons/icn-box-plus.png';
  }
  if (n==2)//Register
  {
    info=document.getElementById('ctl00_CPH_Order_togglecontainer1');
    info.className = 'collapsed';
    pic = document.getElementById('ShowHide1');
    pic.src='../App_Themes/default/images/icons/icn-box-plus.png';
}

}

function LimitTheLength(TxBxId,maxlength)
    {
       var TxBx = $get(TxBxId);
       if(TxBx.value.length > maxlength)
       {
        alert('Length Exceeded the Specified Limit');
        TxBx.value=TxBx.value.substring(0,maxlength);
       }
    }

  function CheckExpireDate(month,year)//CreditCardrs
{

var ddlMonth=$get(month);
var ddlYear = $get(year);
var dt=new Date();
var CurrYear=dt.getFullYear();
var CurrMonth=dt.getMonth();
if(ddlYear.value == CurrYear )
{
    if (ddlMonth.value <(CurrMonth+1) )
    {
    ddlMonth.value=CurrMonth+1;
    }
 
}
}

 