
//  --------------------- BeGIN WINDOW ZOOM script ------------------------- 

/* Zooming link script by Paul Anderson, copyright 2001 CNET Builder.com.
   May be freely used with attribution. Not for resale. All rights reserved. 
   Make a link zoom open by adding the event handler
   
   onclick="zoomBox(event,this);return false"
   
   To zoom into a new, positioned window add width, height, left, and top
   
   onclick="zoomBox(event,this,70,480,100,50);return false"
   */

var maxW,maxH,fromX,fromY,toX,toY,adjX,adjY,zBox,zStep=0,zLink,zNew;

function zoomBox(evt,zlink,maxw,maxh,tox,toy) {
if (arguments.length > 2) zNew=1;
scrollH=(window.pageYOffset!=null)?window.pageYOffset:document.body.scrollTop;
maxW=maxw?maxw:window.innerWidth?innerWidth:document.body.clientWidth;
maxH=maxh?maxh:window.innerHeight?innerHeight:document.body.clientHeight;
toX=tox?tox:0;
toY=(toy?toy:0)+scrollH;
fromX=evt.pageX?evt.pageX:evt.clientX;
fromY=(evt.pageY?evt.pageY:evt.clientY)+(document.all?scrollH:0);
adjX=toX+evt.screenX-fromX;
adjY=toY+evt.screenY-fromY;
if (document.createElement && document.body.appendChild && !zBox) {
	zBox=document.createElement("div");
	zBox.style.position="absolute";
	document.body.appendChild(zBox);
} else if (document.all && !zBox) {
	document.all[document.all.length-1].outerHTML+='<div id="zBoxDiv" style="position:absolute"></div>';
	zBox=document.all.zBoxDiv;
} else if (document.layers && !zBox) {
	zBox=new Layer(maxW);
	zBox.style=zBox;
	}
zLink=zlink;
doZoom();
}

function doZoom() {
zStep+=1;
zPct=(10-zStep)/10
if (document.layers) {
	zBox.moveTo(toX+zPct*(fromX-toX),toY+zPct*(fromY-toY));
	zBox.document.open();
	zBox.document.write("<table width='"+maxW*(1-zPct)+"' height="+maxH*(1-zPct)+" border=2 cellspacing=0><tr><td></td></tr></table>");
	zBox.document.close();
	} else {
	zBox.style.border="2px solid #999999";
	zBox.style.left=toX+zPct*(fromX-toX);
	zBox.style.top=toY+zPct*(fromY-toY);
	zBox.style.width=maxW*(1-zPct);
	zBox.style.height=maxH*(1-zPct);
	}
zBox.style.visibility="visible";
if (zStep < 10) setTimeout("doZoom("+fromX+","+fromY+","+toX+","+toY+")",30);
else {
	zBox.style.visibility='hidden';
	zStep=0;
	if (zLink && !zNew) location.href=zLink.href;
	else if (zLink && zNew) {
		var w=window.open(zLink.href,'','width='+maxW+',height='+maxH+',left='+adjX+',top='+adjY+',resizable');
		zNew=null;
		}
	}
}

// --------------------- End WINDOW ZOOM script ---------------------------


// -------------------- Begin Pop Up scripting -----------------------------
function Window1(){
popup = window.open("bio.html","","height=610,width=740,status=no,toolbar=no,directories=no,scrollbars=0,resize=no,menubar=no");
popup.moveTo(80,30);

}
function Window2(){
popup = window.open("galleries.html","","height=540,width=550,status=no,toolbar=no,directories=no,scrollbars=1,resize=no,menubar=no");
popup.moveTo(80,20);

}

function Window0(){
popup = window.open("index.html","","height=768,width=1024,status=yes,toolbar=yes,directories=yes,scrollbars=1,resize=1,menubar=1");
popup.moveTo(0,0);

}

function Window3(){
popup = window.open("add.html","","height=600,width=820,status=no,toolbar=yes,directories=no,scrollbars=1,resize=yes,menubar=0");
popup.moveTo(110,20);

}

function Window4(){
popup = window.open("update.html","","height=600,width=820,status=no,toolbar=yes,directories=no,scrollbars=1,resize=yes,menubar=0");
popup.moveTo(110,20);

}

function Window5(){
popup = window.open("search.html","","height=600,width=820,status=no,toolbar=yes,directories=no,scrollbars=1,resize=yes,menubar=0");
popup.moveTo(110,20);

}

function Window6(){
popup = window.open("activity.html","","height=600,width=820,status=no,toolbar=yes,directories=no,scrollbars=1,resize=yes,menubar=0");
popup.moveTo(110,20);

}

function Window7(){
popup = window.open("login.html","","height=768,width=1024,status=no,toolbar=yes,directories=no,scrollbars=1,resize=yes,menubar=0");
popup.moveTo(0,0);

}


// -------------------- End Popup scripting -----------------------------

function closewin()
	{
		window.close();
	}
function timeoutwin()
	{
		var mytimeout;
		mytimeout=window.setTimeout("closewin()",8000);		
	}
// -------------------- End window close script -----------------------
// -------------------- start favorites popup scripting -----------------------------

function addbookmark()
{
bookmarkurl="http://www.accidentreconstruction.us/"
bookmarktitle="Accident Reconstruction - Tritec"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

// -------------------- end favorites popup scripting -----------------------------


/*
Clear default form value script- By Ada Shimar (ada@chalktv.com)
Featured on Website Abstraction (http://wsabstract.com)
Visit wsabstract.com for 400+ free scripts!
*/

function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
} 

var nifty_little_window = null;
function gateKeeper() {
nifty_little_window = window.open('gatekeep.html', 'theKeeper', 'width=550,height=100,resizable=1,status=yes');
}
