Possible positions are top, bottom, left, right, full, center, window.
Added switch for pos selection
"if statements are generally faster than switch statements when there are just one or two conditions to be evaluated. When there are more than two conditions, and the conditions are simple (not ranges), the switch statement tends to be faster. This is because the amount of time it takes to execute a single condition in a switch statement is often less than it takes to execute a single condition in an if statement, making the switch statement optimal only when there are a larger number of conditions." --> http://oreilly.com/server-administration/excerpts/even-faster-websites/writing-efficient-javascript.html#the_fastest_conditionals
Possible positions are top, bottom, left, right, full, center, window. Added switch for pos selection
"if statements are generally faster than switch statements when there are just one or two conditions to be evaluated. When there are more than two conditions, and the conditions are simple (not ranges), the switch statement tends to be faster. This is because the amount of time it takes to execute a single condition in a switch statement is often less than it takes to execute a single condition in an if statement, making the switch statement optimal only when there are a larger number of conditions." --> http://oreilly.com/server-administration/excerpts/even-faster-websites/writing-efficient-javascript.html#the_fastest_conditionals