﻿// JScript 文件
//弹出编辑窗口

function index1000(id)
{
         window.document.getElementById("showDiv").style.height ="450px";
         window.document.getElementById("idBox").style.width ="650px";
         window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx?c_id="+id+"";
         window.box.Show();
         
        var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "单页图文";
}


function index1000not(id)
{
         window.document.getElementById("showDiv").style.height ="450px";
         window.document.getElementById("idBox").style.width ="650px";
         window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx?type=1&c_id="+id+"";
         window.box.Show();
         
        var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "单页图文";
}

//function sunHight()
//{
//     window.parent.document.getElementById("showDiv").style.height ="650px";
//}

function index1002(id)
{
         window.document.getElementById("showDiv").style.height ="450px";
         window.document.getElementById("idBox").style.width ="650px";
         window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx?type=2&id="+id+"";
         window.box.Show(); 
         
        var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "图文展示";   
}

function index1004()//回复留言，1121修改跳转页面为admin_re.aspx，原为plList.aspx
{
         window.document.getElementById("showDiv").style.height ="450px";
         window.document.getElementById("idBox").style.width ="650px";
         window.EditFrame.location.href="../../ConstructASP/Admin/admin_re.aspx";
         window.box.Show();    
         
         var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "回复留言";
}

function index100156(type)
{
    if(type=="1001")
    {
         window.document.getElementById("showDiv").style.height ="450px";
         window.document.getElementById("idBox").style.width ="650px";
         window.EditFrame.location.href="../../ConstructASP/News/NewsAdd.aspx";
         window.box.Show();   
         
         var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "编辑新闻";
    }
    else if(type=="1005")
    {
         window.document.getElementById("showDiv").style.height ="450px";
         window.document.getElementById("idBox").style.width ="650px";
         window.EditFrame.location.href="../../ConstructASP/EpicAndDown/EpicAndDownAdd.aspx";
         window.box.Show(); 
         
         var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "文件下载";
    }
}

//新闻编辑层
function newsAdd(id)
{
    window.document.getElementById("showDiv").style.height ="450px";
    window.document.getElementById("idBox").style.width ="650px";
    if(id<=0)
    {
        window.EditFrame.location.href="../../ConstructASP/News/NewsAdd.aspx";
    }
    else
    {
        window.EditFrame.location.href="../../ConstructASP/News/NewsAdd.aspx?id="+id;
    }
    
    var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "编辑新闻";
        
    window.box.Show();
}
//新闻添加
function newsAddT(cid)
{
    window.document.getElementById("showDiv").style.height ="450px";
    window.document.getElementById("idBox").style.width ="650px";
  
    window.EditFrame.location.href="../../ConstructASP/News/NewsAdd.aspx?c_id="+cid;

var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "添加新闻";

    window.box.Show();

}

//单页图文编辑层
function picAdd(id,cid)
{
    window.document.getElementById("showDiv").style.height ="450px";
    window.document.getElementById("idBox").style.width ="650px";
    if(id>0&&cid>0)
    {
        window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx?id="+id + "&c_id=" + cid;
    }
    else if(id<=0&&cid>0)
    {
        window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx?id=0&c_id=" + cid;
    }
    else
    {
        window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx"
    }
    
    var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "单页图文";
        
    window.box.Show();
}

//产品信息编辑层
function proAdd(id,cid)
{
    window.document.getElementById("showDiv").style.height ="450px";
    window.document.getElementById("idBox").style.width ="650px";
    if(id<=0 || cid<=0)
    {
        window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx";
    }
    else
    {
        window.EditFrame.location.href="../../ConstructASP/CPList/PicAdd.aspx?id="+id + "&c_id=" + cid;
    }
    
    var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "产品信息";
        
    window.box.Show();
}

//供求信息编辑层
function sdAdd(id)
{
    window.document.getElementById("showDiv").style.height ="450px";
    window.document.getElementById("idBox").style.width ="650px";
    if(id<=0)
    {
        window.EditFrame.location.href="../../ConstructASP/SAndD/SAndDAdd.aspx";
    }
    else
    {
        window.EditFrame.location.href="../../ConstructASP/SAndD/SAndDAdd.aspx?id="+id;
    }
    
    var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "供求信息";
        
    window.box.Show();
}

//回复留言编辑层
function messAdd(id)
{
    window.document.getElementById("showDiv").style.height ="150px";
    window.document.getElementById("idBox").style.width ="500px";
    if(id<=0)
    {
        window.EditFrame.location.href="../../ShowASP/Message/Message.aspx";
    }
    else
    {
        window.EditFrame.location.href="../../ShowASP/Message/reMessage.aspx?id="+id;
        //window.open('../../ShowASP/Message/reMessage.aspx?id='+id,'', 'alwaysRaised=1,dependent=1,resizable=0,scrollbars,width=350,height=150');
    }
    
    var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "回复留言";
        
    window.box.Show();
}

//新增文件下载
function downAdd(cid)
{
    window.document.getElementById("showDiv").style.height ="250px";
    window.document.getElementById("idBox").style.width ="720px";
//    if(id<=0)
//    {
//        window.EditFrame.location.href="../../../ConstructASP/EpicAndDown/EpicAndDownAdd.aspx";
//    }
//    else
//    {
        window.EditFrame.location.href="../../ConstructASP/EpicAndDown/EpicAndDownAdd.aspx?c_id="+cid;
        //window.open('../../ShowASP/Message/reMessage.aspx?id='+id,'', 'alwaysRaised=1,dependent=1,resizable=0,scrollbars,width=350,height=150');
//    }

var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "文件下载";
        
    window.box.Show();
}

//编辑文件下载
function downEdit(id)//<A HREF="../../../ShowASP/DownLoad/reDown.aspx">../../../ShowASP/DownLoad/reDown.aspx</A>
{
    window.document.getElementById("showDiv").style.height ="150px";
    window.document.getElementById("idBox").style.width ="550px";
    window.EditFrame.location.href="../../ShowASP/DownLoad/reDown.aspx?id=" + id;
    
    var lmTitle = window.document.getElementById("lmTitle");
        lmTitle.innerText = "文件下载";
        
     window.box.Show();
}

//删除单条记录
//function deleteById(id,cid)
//{
//    if(confirm("确认删除该记录吗？"))
//    {
//        document.getElementById("Hidden1").value="delete";
//        document.getElementById("hID").value=id;
//        
//        document.form1.submit();
////        deleteInfo2(id)
//        //ShowA("edittop");//
//        ShowA("editindextop");
//    }
//}





