function $(id) { return document.getElementById(id); } 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').style.height = cHeight ; if( document.body.scrollHeight && document.body.scrollHeight > cHeight ) $('overlay').style.height = document.body.scrollHeight ; $('overlay').style.display = 'block'; $('popup').style.top = hc + "px"; $('popup').style.left = wc + "px"; $('popup').style.width = w + "px"; $('popup').style.height = h + "px"; $('popup').style.display = 'block'; $('pimg').style.display = 'none'; var isrc = 'http://'+window.location.host+'/p/'+s+'/'+id+'.img'; if( $('pimg').src != isrc ) { $('pimg').onload = function() { this.style.display = 'block' } $('pimg').src = '/p/'+s+'/'+id+'.img'; } else $('pimg').style.display = 'block'; $('pimg').title = t ; } return false ; } function hf() { $('popup').style.display = 'none'; $('overlay').style.display = 'none'; $('overlay').style.height = "100%"; } function write_lic(){ document.write('')//--> }