function popUP(mypage, myname, w, h, scroll, titlebar) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

function checkUploads(lang) {
	ups = document.getElementById("file1").value
	ups += document.getElementById("file2").value
	ups += document.getElementById("file3").value
	ups += document.getElementById("file4").value
	ups += document.getElementById("file5").value

	if (ups != "") {
		baseUrl = "/pgbar.php";
		sid = document.form_upload.sessionid.value;
		iTotal = escape("-1");
		baseUrl += "?iTotal=" + iTotal;
		baseUrl += "&iRead=0";
		baseUrl += "&iStatus=1";
		baseUrl += "&sessionid=" + sid;
		baseUrl += "&lang=" + lang;
	
		popUP(baseUrl,"Uploader",460,250,false,false);
		return true;
	} else {
		error = new Array();
		error['english'] = "You don't have selected a file for upload!";
		error['german']  = "Sie haben keine Datei zum Upload ausgewählt!";
		
		alert (error[lang]);
  	return false;
	}
}

function checkSecureUpload() {
	if (document.getElementById("RecipientEmail").value == "") {
		alert ("Please enter the Recipient's email!");
		return false;
	} else {
		if (document.getElementById("SecureFile").value == "") {
			alert ("Please choose a file to upload!");
			return false;
		} else {
			return true;
		}
	}
}
