From 975b28552b104962598ea484d0bf6b11fdd1f6aa Mon Sep 17 00:00:00 2001 From: Alib Date: Mon, 29 Mar 2010 21:33:44 +0200 Subject: fixed version in history --- js/functions.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'js') diff --git a/js/functions.js b/js/functions.js index f628142..2ea12d6 100644 --- a/js/functions.js +++ b/js/functions.js @@ -120,3 +120,23 @@ function str_pad (input, pad_length, pad_string, pad_type) { return input; } + +function updateOrientation() { + switch(window.orientation) { + case 0: + orient = "portrait"; + break; + case -90: + orient = "landscape"; + break; + case 90: + orient = "landscape"; + break; + case 180: + orient = "portrait"; + break; + } + document.body.setAttribute("orient", orient); + window.scrollTo(0, 1); + +} \ No newline at end of file -- cgit v1.2.3