
function copyinfo(i,c) {
document.getElementById('enable_'+i).value=document.getElementById('enable_'+c).value;
document.getElementById('name_'+i).value=document.getElementById('name_'+c).value;
document.getElementById('url_'+i).value=document.getElementById('url_'+c).value;
document.getElementById('imgurl_'+i).value=document.getElementById('imgurl_'+c).value;
document.getElementById('expired_'+i).value=document.getElementById('expired_'+c).value;
document.getElementById('desc_'+i).value=document.getElementById('desc_'+c).value;
}


function cleaninfo(x) {
document.getElementById('enable_'+x).value=0;
document.getElementById('name_'+x).value='';
document.getElementById('url_'+x).value='';
document.getElementById('imgurl_'+x).value='';
document.getElementById('expired_'+x).value='';
document.getElementById('desc_'+x).value='';
}

function move_ads(w,u) {
//var d = document.getElementById;
var j = 0;
if (w == 'up') { j = u - 1; }
if (w == 'down') { j = u + 1; }

document.getElementById('mv_enable').value = document.getElementById('enable_'+u).value;
document.getElementById('mv_name').value = document.getElementById('name_'+u).value;
document.getElementById('mv_url').value = document.getElementById('url_'+u).value;
document.getElementById('mv_imgurl').value = document.getElementById('imgurl_'+u).value;
document.getElementById('mv_expdate').value = document.getElementById('expired_'+u).value;
document.getElementById('mv_desc').value = document.getElementById('desc_'+u).value;

document.getElementById('enable_'+u).value = document.getElementById('enable_'+j).value;
document.getElementById('name_'+u).value = document.getElementById('name_'+j).value;
document.getElementById('url_'+u).value = document.getElementById('url_'+j).value;
document.getElementById('imgurl_'+u).value = document.getElementById('imgurl_'+j).value;
document.getElementById('expired_'+u).value = document.getElementById('expired_'+j).value;
document.getElementById('desc_'+u).value = document.getElementById('desc_'+j).value;

document.getElementById('enable_'+j).value = document.getElementById('mv_enable').value;
document.getElementById('name_'+j).value = document.getElementById('mv_name').value;
document.getElementById('url_'+j).value = document.getElementById('mv_url').value;
document.getElementById('imgurl_'+j).value = document.getElementById('mv_imgurl').value;
document.getElementById('expired_'+j).value = document.getElementById('mv_expdate').value;
document.getElementById('desc_'+j).value = document.getElementById('mv_desc').value;

document.getElementById('mv_f').value = u;
document.getElementById('mv_t').value = j;
document.ads_form.submit();
}
