function remove_photo(id,pagekey)
{
    if(confirm("Are you sure you want to delete this photo?"))
    {
      location.href = "/admin.php?remove_photo=" + id + "&PageKey=" + pagekey;
    }
}

function remove_text(id,pagekey)
{
    if(confirm("Are you sure you want to delete this text?"))
    {
      location.href = "/admin.php?remove_text=" + id + "&PageKey=" + pagekey;
    }
}

function edit_text(id,pagekey)
{
    colw = window.open("add_column_text.php?ContentID=" + id +"&PageKey=" + pagekey , "colw","width=650,height=600,resize=1","colw","width=650,height=600,resize=1")
    colw.focus();
}

function edit_video(id,pagekey)
{
    colw = window.open("add_column_video.php?ContentID=" + id +"&PageKey=" + pagekey , "colw","width=650,height=600,resize=1","colw","width=650,height=600,resize=1")
    colw.focus();
}

function remove_video(id,pagekey)
{
  if(confirm("Are you sure you want to delete this video?"))
  {
    location.href = "/admin.php?remove_video=" + id + "&PageKey=" + pagekey;
  }
}


function remove_pdf(id,pagekey)
{
  if(confirm("Are you sure you want to delete this pdf?"))
  {
    location.href = "/admin.php?remove_pdf=" + id + "&PageKey=" + pagekey;
  }
}

function edit_press(id)
{
  var pwin = window.open('/add_press_release.php?id=' + id,'pwin','width=700,height=650,scrollbars=1');
  pwin.focus();
}

function delete_press(id)
{
  if(confirm("Are you sure you want to delete this press release?"))
  {
    location.href = '/add_press_release.php?delete=' + id ;
  }
}

function duplicate_row(rowid,pageid) {
	if(confirm("Are you sure you want to copy this row to the selected page?")) {
		location.href = "/admin.php?duplicate_row=" + rowid + "&pageid=" + pageid;
	}
}
