// LLGBO frame resize jQuery(document).ready(function(jQuery){ jQuery("#theMainImage").load(function(){LlgboFr_Resize();}); jQuery(window).resize(function(){ LlgboFr_Resize(); }); }); var LlgboFr_Resize = function () { var elGbo = document.getElementById("llgbo0"); if (elGbo) { var MainImg = document.getElementById("theMainImage"); var nFrH = parseInt(MainImg.height); var nFrW = parseInt(MainImg.width); var ReadImgSize = document.getElementById("LLGBO_READIMGREELSIZE"); if (ReadImgSize) { // Must read via URL the physical size of the img var x = document.createElement('img'); x.id = 'NewImgx'; document.getElementsByTagName('body')[0].appendChild(x); x.style.top = '0'; x.style.visibility = 'hidden'; x.src = MainImg.src; nFrH = parseInt(x.height); nFrW = parseInt(x.width); document.getElementsByTagName('body')[0].removeChild(x); } var FrLstBdr = 0, i = 0; for ( i=1; i<32; i=i+2 ) {var Fr = document.getElementById("llgboframe"+(i)); var frbdr = 0; if (Fr) { frbdr = parseInt(Fr.style.borderWidth);} FrLstBdr = (frbdr * 2)+FrLstBdr; } elGbo.style.width = (nFrW + FrLstBdr) + "px"; elGbo.style.height =(nFrH + FrLstBdr) + "px"; } }