//.......................................................................................................
function gotomenu() {
  location.href = document.getElementById('jump').value;
}
//.........................................
function del_confirm(del)
 {
    if(confirm('Are You sure to delete this Member Article?'))
    {
		 location.href = del;
	}
 }
//.................................
function ma_details(str)
{
  var arguments = 'resizable=yes, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=800,height=600,top=10,left=250';
  window.open(str, "_blank", arguments);

}

//...............................................................
function backto()
{
  window.opener.location.href = window.opener.location;
  window.close();
}
//......................................................................

// show pop up for path generation only for folder
function popup_veiw(str)
{
  var arguments = 'resizable=yes, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=800,height=600,top=10,left=250';
  window.open(str, "_blank", arguments);
}

function edit_win(str)
{
  var arguments = 'resizable=yes, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=800,height=750,top=10,left=10';
  window.open(str, "_blank", arguments);
}

// show pop up for path generation only for folder

function show_path(str)
{
  var arguments = 'resizable=yes, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=yes,status=no,menubar=no,width=600,height=600,top=10,left=250';
  window.open(str, "_blank", arguments);
}


function use_dir(str)
{
  window.opener.form1.path.value = str;
  window.close();
}

function use_file(str)
{
  window.opener.form1.filename.value = str;
  if(window.opener.form1.saveas)
  {  
	var path, total;
	path = str.split('/');
	total = path.length - 1;
	window.opener.form1.saveas.value = path[total];
  }
  window.close();
}

function test_connection()
{
  var arguments = 'resizable=no, toolbar=no,location=no,directories=no,addressbar=no,scrollbars=no,status=no,menubar=no,width=500,height=400,top=10,left=250';
  window.open('test-connection.php', "_blank", arguments);
}


// confirmation for deletion file or folder
function confirm_del(str)
{
  if (confirm('Are you sure to delete the file?\n All the contents of belong this file / dir will be deleted and will no longer exists.\n Please make sure you want to delete this file.\nPress "Ok" to delete the file and "Cancel" to Cancel the deletion process'))
  {
	   location.href = str;
  }
}


// set file permission mode
function confirm_set(str)
{
  if (confirm('Are you want to set this file permission mode to 0777?\n If so then it will be readable, writable and Executable. Plase make sure to set the permission.\n Press "OK" to set the Permission and "Cancel" to stop the process'))
  {
	   location.href = str;
  } 
}


function change_color(tr)
{
  if(document.all)
  {
     document.getElementById(tr).style.backgroundColor = '#D1DFFA';  
  }
}

//..................
function change_color1(tr)
{
  var no ;
  no = tr.substr(2,tr.length);
   if(document.all)
  {
    if( no%2 == 0)
	 document.getElementById(tr).style.backgroundColor = '#ffffff';  
    else
	document.getElementById(tr).style.backgroundColor = '#f5f6f7';  
  }
}

//...............................................................

function selectall(send) {
 var i; var sid; 
 for(i = 1; i < send+1; i++) { 
	sid = 're-'+i;
	document.getElementById(sid).checked = true;
  }
}

function deselectall(dend) {
 var j; var did;
 for(j = 1; j < dend+1; j++) { 
	did = 're-'+j;
	document.getElementById(did).checked = false;
  }
}
