
function Wmaplay(id){
window.open('<%=request.getContextPath()%>/column/playSong.jsp?'+id,'edenwindow','width=300,height=240,menubar=no,status=no ');
} 
function download(id){
window.open('<%=request.getContextPath()%>/column/download.jsp?'+id,'edenwindow1','width=300,height=240,menubar=no,status=no ');
} ﻿ 
function submitPlayList(itemform){
    itemform.action='submitPlayList.jsp';
    itemform.target=''; 
    itemform.submit();
    return;
}
function batchPlayToDelete(itemform){
    itemform.action='batchPlayToDelete.jsp';
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定歌曲");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定歌曲");

}
function batchSelectToDelete(itemform,nextPage){
    itemform.action='batchSelectToDelete.jsp?nextPage='+nextPage;
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定歌曲");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定歌曲");

}
function batchMessageToDelete(itemform,nextPage){
    itemform.action='batchMessageToDelete.jsp?nextPage='+nextPage;
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定短消息");
        return;
    }
    //如果check列表对象多于一个
    if (confirm("确定要删除该记录吗?" )){
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定短消息");
    }

}
function batchSelectToPlayList(itemform,nextPage){
    itemform.action='batchSelectToPlayList.jsp?nextPage='+nextPage;
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定歌曲");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定歌曲");

}
function batchToPlayList(itemform,nextPage){
    itemform.action='batchToPlayList.jsp?nextPage='+nextPage;
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定歌曲");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定歌曲");

}
function batchToSelectList(itemform,nextPage){
    itemform.action='batchToSelectList.jsp?nextPage='+nextPage;
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定歌曲");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定歌曲");

}
function change(itemform){
    itemform.action='<%=request.getContextPath()%>/column/playSong1.jsp';
    itemform.target='edenwindow';
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定歌曲");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            window.open('about:blank','edenwindow','width=300,height=240,menubar=no,status=no ')
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        window.open('about:blank','edenwindow','width=300,height=240,menubar=no,status=no ')
        itemform.submit();
        return;
        }
    }
        alert("请先选定歌曲");

}
function checkboxselect(itemname,checkstatus) {
 if(!itemname) return;
 if(!itemname.length) {
  itemname.checked=checkstatus;
 } else {
  for(var i=0;i<itemname.length;i++) {
   itemname[i].checked=checkstatus;
  }
 }
}
function addSelectList(itemform,nextPage){
    itemform.action='addSelectListSuccess.jsp?nextPage='+nextPage;
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定栏目");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定栏目");

}
function addPlayList(itemform,nextPage){
    itemform.action='addPlayListSuccess.jsp?nextPage='+nextPage;
    itemform.target=''; 
    //获得选择的check列表对象
    var checkIdObj = eval("itemform.checkbox");
    //判断对象是否为空
    if (checkIdObj == null) {
        alert("请先选定栏目");
        return;
    }
    //如果check列表对象多于一个
    if(checkIdObj.length){
        for (i=0; i<checkIdObj.length; i++) {
            if(checkIdObj[i].checked){
            itemform.submit();
            return;
            }
        }
    }
    //否则
    else{
        if(itemform.checkbox.checked){
        itemform.submit();
        return;
        }
    }
        alert("请先选定栏目");

}