var pop=null;
function popClose()
{
    parent.pop.close();
}

function ChangeInfo()
{
    if(pop!=null) pop.close();
	pop=new Popup({contentType:1,isSupportDraging:false,isReloadOnClose:false,width:550,height:200});
	pop.setContents({"title":"修改安全信息 ",'contentUrl':'/Users/VIPCard/ChangeSafeInfo.aspx'});
	pop.build().show();
}

function ChangeLoginName()
{
    if(pop!=null) pop.close();
	pop=new Popup({contentType:1,isSupportDraging:false,isReloadOnClose:false,width:550,height:200});
	pop.setContents({"title":"修改登录名 ",'contentUrl':'/Users/VIPCard/ChangeLoginName.aspx'});
	pop.build().show();
}

function SmallLogin(returl)
{
    if(pop!=null) pop.close();
	pop=new Popup({contentType:1,isSupportDraging:false,isReloadOnClose:false,width:300,height:200});
	pop.setContents({"title":"用户登录 ",'contentUrl':'/SmallLogin.aspx?RetUrl='+returl});
	pop.build().show();
}

function reg(returl)
{

    top.location = '/Users/RegistByUsername.aspx?RetUrl='+returl;
    parent.pop.close();
}

function smallreg(returl)
{
    if(pop!=null) pop.close();
	pop=new Popup({contentType:1,isSupportDraging:false,isReloadOnClose:false,width:550,height:300});
	pop.setContents({"title":"用户登录 ",'contentUrl':'/smallreg.aspx?returl='+returl});
	pop.build().show();
}

function ResetSafeInfo()
{
    if(pop!=null) pop.close();
	pop=new Popup({contentType:1,isSupportDraging:false,isReloadOnClose:false,width:550,height:200});
	pop.setContents({"title":"重置支付密码 ",'contentUrl':'/Users/VIPCard/ResetSafeInfo.aspx'});
	pop.build().show();
}

function fn_GetRadioButtonListInfo()
{
    //取得RadioButtonList的集合
    var radListItems = document.all("RadioButtonList1");

    //弹出RadioButtonList的Item的个数
    var radListItesCount = radListItems.length - 1 ;
    
    var radListCheckedValue = "";
    //遍历Item的Text和Value
    for(var i = 1; i <=  radListItesCount ; i++ )
    {
        var itemInfo = "";
        itemInfo += "第" + i +"Item ";
        //Value
        itemInfo += " Value: "+ radListItems[i].value;
        //Text
        //itemInfo += " Text: "+ radListItems[i].nextSibling.innerText ;
        //或者
        itemInfo += " Text: "+ radListItems[i].parentElement.childNodes[1].innerText ;
        //是否是选中
        itemInfo += " 是否选中: "+ radListItems[i].checked;
        //
        if(radListItems[i].checked)
            radListCheckedValue = radListItems[i].value;
    }
        //alert(radListCheckedValue);
        var url =escape('/VipCard/operate.aspx?value='+radListCheckedValue);
        if(document.getElementById("hfUserName").value == "")
        {
            smallreg(url);
        }
        else
        {
            window.location="operate.aspx?value="+radListCheckedValue;
        }
}

function BuyCard()
{
    //取得RadioButtonList的集合
    var radListItems = document.all("RadioButtonList1");

    //弹出RadioButtonList的Item的个数
    var radListItesCount = radListItems.length - 1 ;
    
    var radListCheckedValue = "";
    //遍历Item的Text和Value
    for(var i = 1; i <=  radListItesCount ; i++ )
    {
        var itemInfo = "";
        itemInfo += "第" + i +"Item ";
        //Value
        itemInfo += " Value: "+ radListItems[i].value;
        //Text
        //itemInfo += " Text: "+ radListItems[i].nextSibling.innerText ;
        //或者
        itemInfo += " Text: "+ radListItems[i].parentElement.childNodes[1].innerText ;
        //是否是选中
        itemInfo += " 是否选中: "+ radListItems[i].checked;
        //
        if(radListItems[i].checked)
            radListCheckedValue = radListItems[i].value;
    }
        //alert(radListCheckedValue);
        var url =escape('/zhuanti/SooPay/operate.aspx?value='+radListCheckedValue);
        if(document.getElementById("hfUserName").value == "")
        {
            smallreg(url);
        }
        else
        {
            window.location="operate.aspx?value="+radListCheckedValue;
        }
}