function ppjs_image(imagen, ancho, alto)
{
	var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width="+(ancho+8)+", height="+(alto+8)+", top="+((screen.height/2)-(alto/2))+",left="+((screen.width/2)-(ancho/2))+" ";

popup1 = window.open ("popup.php?img="+imagen,"popup1",opciones);
return false;
}

function confirm_drop(num)
{
	var matriz = Array();
	matriz[0] = "Your record will be deleted.\nDo you wish to continue?";
	matriz[1] = "This will permanently remove your image.\nDo you wish to continue?";
	matriz[2] = "Your client password will be send.\nDo you wish to continue?";
	matriz[4] = "This will permanently remove your file.\nDo you wish to continue?";
	if(confirm(matriz[num]))
		return true;
	else
		return false;
}
function getXMLHTTPRequest() {
try {
req = new XMLHttpRequest();
} catch(err1) {
  try {
  req = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (err2) {
    try {
    req = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (err3) {
      req = false;
    }
  }
}
return req;
}

var http = getXMLHTTPRequest();

function obtImage(id, drop) {

 var myurl = '../dropImage.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl + "?rand=" + myRand + "&i=" + id + "&d=" + drop + "&send=dropImg";
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse;
  http.send(null);
}
function obtFile(id, drop) {

 var myurl = '../dropFile.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl + "?rand=" + myRand + "&i=" + id + "&d=" + drop + "&send=dropFile";
  http.open("GET", modurl, true);
  http.onreadystatechange = useHttpResponse;
  http.send(null);
}
function useHttpResponse() {

   if (http.readyState == 4) {
    if(http.status == 200) {
		var miTexto = http.responseText;
		document.getElementById('allFiles').innerHTML = miTexto;
    }
  } else {
  document.getElementById('allFiles').innerHTML += "";
  }
}
/*
var menuAgt = navigator.userAgent.toLowerCase();
var isGecko = (menuAgt.indexOf('gecko') != -1);
var imgwidth = 85;

if (screen.width==1024) imgwidth = 86;
else if (screen.width==1152) imgwidth = 88;
else if (screen.width==1280) imgwidth = 89;
else if (screen.width==1360) imgwidth = 90;
else if (screen.width==1600) imgwidth = 91;

/*document.getElementById('bgphoto').style.width = imgwidth + "%";
if (document.getElementById('bgphoto_dbl')) {
	document.getElementById('bgphoto_dbl').style.width = imgwidth + "%";
}*/
