function printFloor(value) {
	floorParts = value.split(",");
	floorNum = floorParts[0];
	fileParts = floorParts[1].split(".");
	fileName = fileParts[0]+"_pdf.pdf";
	result = isThere("images/availability/floor"+floorNum+"/"+fileName);
	if(result == true){
		window.open("images/availability/floor"+floorNum+"/"+fileName);
	}else{
		alert("The file you have requested is currently not available.  Please try again later.");
	}
}

function isThere(url) {
	var req= new AJ(); // XMLHttpRequest object
	try {
		req.open("HEAD", url, false);
		req.send(null);		
		return req.status== 200 ? true : false;
	}
	catch (er) {
		return false;
	}
}

function AJ() {
	var obj;
	if (window.XMLHttpRequest) obj= new XMLHttpRequest(); 
	else if (window.ActiveXObject){
		try{
			obj= new ActiveXObject('MSXML2.XMLHTTP.3.0');
		}
		catch(er){
			try{
				obj= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(er){
				obj= false;
			}
		}
	}
	return obj;
}
