/*
*******************************
Document magnifying script
Written by Christian Patzer
cpatzer@hotmail.com
VERSION 2.0
Revamped GUI
Added resize functionality
Added zoomFactor adjustability
Added baseDir var for centralized distribution of files
Added handle for A tag occurences within the magnifier
For this script and more, visit http://www.dynamicdrive.com
*******************************
*/
//configure iframe src for zoom box
var baseDir="";//configure this to the directory you wish to keep the magnifier files in i.e. /magnifyfile/
var zoomFactor=20;//percentage int[1-100]
var startZoom='120%';//percentage string[>= 0]
//DO NOT EDIT BELOW THIS LINE
//---------------------------
var iframeSrc = "zoom.html";
var tempY,tempX,initialized,X,Y,rX,rY,tempW,tempH,resizeInitialized,zoomIframe,zoomBox,zoomObjStyle,objToResize;
var ie55 = false;
var firstTableWidth;
if(window.createPopup){
ie55 = true;
}
else{
ie55 = false;
}
zoomBoxHTML = "
";
zoomBoxHTML += "";
zoomBoxHTML += "";
zoomBoxHTML += "";
if(ie55){
document.write(zoomBoxHTML);
}
function activateResize(){
objToResize = document.getElementById('magContainer');
document.getElementById('resizeObj').attachEvent('onmousemove',resizeMag);
zoomIframe = document.getElementById('zoom');
rX=event.clientX;
rY=event.clientY;
tempW = parseInt(objToResize.width);
tempH = parseInt(objToResize.height);
resizeInitialized=true;
}
function resizeMag(){
if(resizeInitialized){
doWidth = (event.clientX-rX)+parseInt(tempW);
doHeight = (event.clientY-rY)+parseInt(tempH);
if(doWidth>0)objToResize.width=doWidth;
if(doWidth>0)zoomIframe.width=doWidth;
if(doHeight>0)objToResize.height=doHeight;
if(doHeight>0)zoomIframe.height=doHeight;
return false;
}
}
function moveZoomBox(){
if(initialized==true){
zoomBox.style.pixelLeft=tempX+event.clientX-X;
zoomBox.style.pixelTop=tempY+event.clientY-Y;
document.frames.zoom.scrollTo(tempX+event.clientX-X,tempY+event.clientY-Y);
return false;
}
}
function initXY(){
X=event.clientX;
Y=event.clientY;
document.body.onselectstart=new Function("return false")
tempX=zoomBox.style.pixelLeft;
tempY=zoomBox.style.pixelTop;
initialized=true;
document.onmousemove=moveZoomBox;
}
function resize(){
if(ie55){
zoomBox.style.pixelLeft=0;
zoomBox.style.pixelTop=0;
document.frames.zoom.scrollTo(0,0);
document.frames.zoom.document.all.tags("TABLE")[1].width=document.body.offsetWidth-25;
}
}
function init(){
if(ie55){
var HTMLtoGrab = document.all.tags("HTML")[0].innerHTML;
var HTMLtoWrite = HTMLtoGrab;
var HTMLtoWrite = ""+HTMLtoWrite+"";
zoomBox=document.getElementById('zoomBox');
zoomBox.style.visibility = "visible";
document.frames.zoom.document.getElementById('writeToMe').outerHTML = HTMLtoWrite;
document.frames.zoom.document.getElementById('zoomBox').style.visibility="hidden";
document.frames.zoom.document.body.scroll='no';
zoomObjStyle = document.frames.zoom.document.body.style;
zoomObjStyle.zoom=startZoom;
document.frames.zoom.scrollTo(0,0);
document.frames.zoom.document.body.mergeAttributes(document.body);
for(var i=0; i |