function mover(){
	document.getElementById('search_div').style.overflow='visible';
}
function mout(){
	document.getElementById('search_div').style.overflow='hidden';
}

/* function openwind(id){
	window.open("http://cardstour.com/ads/adv_click.php?b="+id, "new_window", "status=0,toolbar=0,location=0, menubar=0,directories=0, width=800,height=600");
	} */

    var i1=0

function add_files(td_id){

    i1++;

    var d=document.getElementById(td_id);

    

    a=document.createElement('a');

    a.setAttribute('onclick',"rem_files('"+td_id+"','"+i1+"')");

    a.setAttribute('id','a'+i1);

    a.setAttribute('style','cursor:pointer');

    a.innerHTML='remove';

    

    inp=document.createElement('input');

    inp.setAttribute('type','file');

    inp.setAttribute('id','inp'+i1);

    inp.setAttribute('name','file1[]');

    

    if(td_id=='downloads'){

    lab=document.createElement('label');

    lab.innerHTML='upload file(s):';

    inp1=document.createElement('input');

    inp1.setAttribute('type','text');

    inp1.setAttribute('id','inp'+i1);

    inp1.setAttribute('name','file[]');

    d.parentNode.insertBefore(inp1,d);

    d.parentNode.insertBefore(lab,d);

    }

    

    d.parentNode.insertBefore(inp,d);

    d.parentNode.insertBefore(a,d);
	
	var br=document.createElement('br');

    br.setAttribute('id','br'+i1);

    d.parentNode.insertBefore(br,d);

}



function rem_files(td_id,id){

    while(document.getElementById('inp'+id))document.getElementById('inp'+id).parentNode.removeChild(document.getElementById('inp'+id));

    while(document.getElementById('a'+id))document.getElementById('a'+id).parentNode.removeChild(document.getElementById('a'+id));

    while(document.getElementById('br'+id))document.getElementById('br'+id).parentNode.removeChild(document.getElementById('br'+id));

 }

