var unload_active=1;
function load_image(calling_object,image_width,image_height){
if (unload_active) {
unload_active=0;
if (typeof (window.innerWidth ) == 'number') {
image_left = Math.round((window.innerWidth-image_width)/2);
image_top = Math.round((window.innerHeight-image_height)/2);
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
image_left = Math.round((document.documentElement.clientWidth-image_width)/2);
image_top = Math.round((document.documentElement.clientHeight-image_height)/2);
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
image_left = Math.round((document.body.clientWidth-image_width)/2);
image_top = Math.round((document.body.clientHeight-image_height)/2);
} else {
image_left=5;
image_top=5;
}
if (image_left<5) {
image_left=5;
}
if (image_top<5) {
image_top=5;
}
if (typeof(window.pageYOffset)=='number') {
image_top=image_top+window.pageYOffset;
} else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
image_top=image_top+document.body.scrollTop;
} else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
image_top=image_top+document.documentElement.scrollTop;
}
document.getElementById("image_frame").innerHTML="<div style=\"display:block; width:"+image_width+"px; height:"+image_height+"px; margin:0px; padding:0px; position:absolute; left:"+image_left+"px; top:"+image_top+"px; background-color:#000000; background-image:url('image/imgload.png'); background-repeat:no-repeat; background-position:center center; border-style:solid; border-color:#000000; border-width:1px\"><div style=\"display:block; width:"+image_width+"px; height:"+image_height+"px; margin:0px; padding:0px; position:absolute; left:0px; right:0px; background-image:url('"+calling_object.href+"'); background-repeat:no-repeat; background-position:center center\"></div></div>";
setTimeout("unload_active=1",1);
}
}
function unload_image(){
if (unload_active) {
document.getElementById("image_frame").innerHTML="";
}
}
