Rebuilding an ASCII City +--+
+--+ |  | +--+ +--+
|  | |  | |  | |  |
+--+ +--+ +--+ +--+


The people of ASCIIville are rebuilding their city and are sketching out new blueprints. Your job is to draw their new city based on how many buildings they want.

The input will be how many buildings there are. Each building is half the hight of the input (rounded up if odd), not including the top and bottom of the building. 

Let's draw a basic example of 4


+--+ +--+ +--+ +--+
|  | |  | |  | |  |
|  | |  | |  | |  |
+--+ +--+ +--+ +--+


As you can see here, there are two |s in every building because the input was four. But there's a catch! (meaning the example above is incorrect, and the example at the top of this post is the real output for 4)

For each building that isn't a prime number, its height goes down by one. If the number is divisible by 3, 5, or 10, it goes down one more. If it's divisible by two or more of those numbers, the amount deducted adds up (10 is divisible by 10 and 5, and it's not a prime, so it gets deducted by 3). 

Let's look at an example with an input of 5.


     +--+
+--+ |  | +--+ +--+ +--+
|  | |  | |  | |  | |  |
|  | |  | |  | |  | |  |
+--+ +--+ +--+ +--+ +--+


Here's an example of 7


     +--+                     +--+
+--+ |  | +--+ +--+ +--+      |  |
|  | |  | |  | |  | |  | +--+ |  |
|  | |  | |  | |  | |  | |  | |  |
|  | |  | |  | |  | |  | |  | |  |
+--+ +--+ +--+ +--+ +--+ +--+ +--+


And an example of 10


     +--+                     +--+
+--+ |  | +--+ +--+ +--+      |  | +--+
|  | |  | |  | |  | |  | +--+ |  | |  | +--+
|  | |  | |  | |  | |  | |  | |  | |  | |  | +--+
|  | |  | |  | |  | |  | |  | |  | |  | |  | |  |
|  | |  | |  | |  | |  | |  | |  | |  | |  | |  |
+--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+ +--+


And back to 6


     +--+
+--+ |  | +--+ +--+ +--+
|  | |  | |  | |  | |  | +--+
|  | |  | |  | |  | |  | |  |
+--+ +--+ +--+ +--+ +--+ +--+


Rules:


If a number gets deducted so much that it's height is less than or equal to zero, it is not shown but a space is left for it (I don't believe this is possible, 6 is the closest I've found to reaching zero).
Trailing spaces are allowed.
The width of each building must be 2.
Your input can be from stdin or encoded into the program.
Your program must be a full program, no functions.
Your program must be able 4-15 builds. 0-3 and negative numbers aren't needed and are not specified to do anything, meaning they can throw an error, print garbage, or do nothing.
CJam, 68 66 58 55 bytes

This is too long for now. But a start.

ri:K"!;tK"206b4b&lt;{S5*a*"+--+ "a:I+K)2/)"|  | "e]I+}%zN*


UPDATE: Now hardcoding for inputs till 15 instead of calculating the offset. Suggestion by Sp3000

Try it online here