
// Created on Dec 8, 2009 3:51:37 PM

var attempted=false;	// so multiple downloads work if first one established session

function getpres(id,t) {

	document.forms.presAuth.p.value=id;

	if ((!t)&&(!attempted)) {
  	var anch="plink"+id;
    var topValue= 0,leftValue= 0;
    obj=document.getElementById(anch);
    while(obj){
  		leftValue+= obj.offsetLeft;
  		topValue+= obj.offsetTop;
  		obj= obj.offsetParent;
    }
  	document.getElementById("pres").style.visibility="visible";
  	document.getElementById("pres").style.left=(leftValue+100)+"px";
  	document.getElementById("pres").style.top=(topValue-100)+"px";
  	document.forms.presAuth.email.focus();
  	attempted=true;
  }
  else {
  	document.presAuth.submit();
  }	
}

function closepres() {
	document.getElementById("pres").style.visibility="hidden";
}
