[17503] | 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 | |
---|
| 18 | href = document.location.href.toString(); |
---|
| 19 | |
---|
| 20 | myWidth =parseInt( myWidth); |
---|
| 21 | myHeight = parseInt(myHeight); |
---|
| 22 | |
---|
| 23 | myImgWidth = (myWidth - 10); |
---|
| 24 | myImgHeight = (myHeight - 100); |
---|
| 25 | |
---|
| 26 | jQuery.cookie('theImageWidth', myWidth, { path: "/" }); |
---|
| 27 | jQuery.cookie('theImageHeight', myHeight, { path: "/" }); |
---|
| 28 | jQuery.cookie('autosize_reload', "ok", { path: "/" }); |
---|
| 29 | |
---|
| 30 | document.location.reload(false); |
---|
| 31 | |
---|
| 32 | // document.location.reload(false); // from cache |
---|
| 33 | |
---|
| 34 | } |
---|