function sf( s, id, w, h, t ) { var cWidth = 0, cHeight = 0; if (typeof(window.innerWidth) == 'number') { cWidth = window.innerWidth; cHeight = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { cWidth = document.documentElement.clientWidth; cHeight = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { cWidth = document.body.clientWidth; cHeight = document.body.clientHeight; } var scrOfX = 0, scrOfY = 0; if(typeof(window.pageYOffset) == 'number') { scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) { scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) { scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } w += 0; h += 0; var wc = parseInt((cWidth-w)/2) + scrOfX ; var hc = parseInt((cHeight-h)/2) + scrOfY ; if( $('#popup') ) { $('#overlay').css('height', cHeight ); if( document.body.scrollHeight && document.body.scrollHeight > cHeight ) $('#overlay').css('height', document.body.scrollHeight+'px'); $('#overlay').css('display', 'block'); $('#popup').css('top', hc + "px"); $('#popup').css('left', wc + "px"); $('#popup').css('width', w + "px"); $('#popup').css('height', h + "px"); $('#popup').css('display', 'block'); $('#pimg').css('display', 'none'); var isrc = 'http://'+window.location.host+'/p/'+s+'/'+id+'.img'; if( $('#pimg').attr('src') != isrc ) { $('#pimg').fadeIn(0) $('#pimg').attr('src', '/p/'+s+'/'+id+'.img'); } else $('#pimg').css('display', 'block'); $('#pimg').attr('title', t) ; } return false ; } function hf() { $('#popup').css('display', 'none'); $('#overlay').css('display', 'none'); $('#overlay').css('height', "100%"); } function write_lic(){ document.write('')//--> }