1 | |
---|
2 | function on_load() { |
---|
3 | var myWidth = 0, myHeight = 0, myImgWidth =0, myImgHeight = 0; |
---|
4 | if (typeof (window.innerWidth) == 'number') { |
---|
5 | //Non-IE |
---|
6 | myWidth = window.innerWidth; |
---|
7 | myHeight = window.innerHeight; |
---|
8 | } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { |
---|
9 | //IE 6+ in 'standards compliant mode' |
---|
10 | myWidth = document.documentElement.clientWidth; |
---|
11 | myHeight = document.documentElement.clientHeight; |
---|
12 | } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { |
---|
13 | //IE 4 compatible |
---|
14 | myWidth = document.body.clientWidth; |
---|
15 | myHeight = document.body.clientHeight; |
---|
16 | } |
---|
17 | windowWidth =parseInt( myWidth); |
---|
18 | windowHeight = parseInt(myHeight); |
---|
19 | |
---|
20 | theImageRight = 2; |
---|
21 | theImageLeft=261; |
---|
22 | theImageMargeWidth=0; |
---|
23 | |
---|
24 | theImageTop =73; |
---|
25 | theImageBottom = 0; |
---|
26 | theImageMargeHeight=0; |
---|
27 | jQuery.cookie('windowHeight', myHeight, { path: COOKIE_PATH }); |
---|
28 | jQuery.cookie('windowWidth', myWidth, { path: COOKIE_PATH }); |
---|
29 | |
---|
30 | jQuery.cookie('theImageRight', theImageRight, { path: COOKIE_PATH }); |
---|
31 | jQuery.cookie('theImageLeft',theImageLeft, { path: COOKIE_PATH }); |
---|
32 | jQuery.cookie('theImageMargeWidth',theImageMargeWidth, { path: COOKIE_PATH }); |
---|
33 | |
---|
34 | jQuery.cookie('theImageTop',theImageTop, { path: COOKIE_PATH }); |
---|
35 | jQuery.cookie('theImageBottom',theImageBottom, { path: COOKIE_PATH }); |
---|
36 | jQuery.cookie('theImageMargeHeight', theImageMargeHeight, { path: COOKIE_PATH }); |
---|
37 | /* |
---|
38 | theImageWidth = windowWidth - theImageRight - theImageLeft - theImageMargeWidth; |
---|
39 | theImageHeight = windowHeight - theImageTop - theImageBottom - theImageMargeHeight; |
---|
40 | jQuery.cookie('theImageHeight', theImageHeight, { path: COOKIE_PATH }); |
---|
41 | jQuery.cookie('theImageWidth', theImageWidth, { path: COOKIE_PATH }); |
---|
42 | jQuery.cookie('theMainImageHeight', theMainImageHeight, { path: COOKIE_PATH }); |
---|
43 | jQuery.cookie('theMainImage', theMainImageWidth, { path: COOKIE_PATH }); |
---|
44 | */ |
---|
45 | retval = jQuery.cookie('autosize_reload'); |
---|
46 | retval2= jQuery.cookie('picture_deriv'); |
---|
47 | if (retval == "ok" && retval2) return; |
---|
48 | // |
---|
49 | jQuery.cookie('autosize_reload', "ok", { path: COOKIE_PATH }); |
---|
50 | if (reload == "true") { |
---|
51 | document.location = document.location ; |
---|
52 | |
---|
53 | return ; |
---|
54 | //document.location.reload(false); // from cache |
---|
55 | try { |
---|
56 | |
---|
57 | |
---|
58 | var retval = document.location.reload(true); |
---|
59 | } |
---|
60 | catch (err) { |
---|
61 | var retval = window.location.reload(); |
---|
62 | } |
---|
63 | } |
---|
64 | } |
---|