<script language=JavaScript type=text/javascript>
<!--
// JavaScript
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
function MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
obj.visibility=v; }
}
// Jump into frames
//if (self==top) { top.location.href="webdesign.html"; }
// Code for the DHTML animation
// Modified from original created by:
// http://www.sebchevrel.com - cheers Seb!
var topx=0;
var ttx=0;
var otopx=0;
var otopx2=0;
var px=0;
var opx=0;
var numItems=8;
var winW=0;
var contentW=0;
var HW=0;
var prjNum=0;
var projectNum=0;
var offsetW=180;
var scrDirection=0;
var showProject=0;
var viewNum=0;
function init() {
startMouseCapture();
winW=getwindowWidth();
contentW=(numItems+1)*220;
TW=1550-winW;
HW=contentW; // amount to scroll
lastx=mouseX; // last mouse coord, for movement detection
leftX=250; // left scroll hot zone
rightX=550; // right
scrollm=80; // minimum scroll (first)
scrollM=-HW+750-220;// maximum scroll (last) 750:=winW
px=120; // initial position
opx=0; // last position
vx=0; // initial velocity def: -200
minmove=5; // minimum mouse movement to trigger scroll/stop (in pixels)
speed=32; // maximum scroll speed at edge (in pixels/frame) def: 128
lastsign=0;
// Let's rock!
animate();
}
function endProject() { // Returns back to the list
MM_showHideLayers('instruct','','hide');
MM_showHideLayers('overlay'+projectNum,'','hide');
if (projectNum+2 <=numItems) {MM_showHideLayers('project'+(projectNum+2),'','show');}
MM_showHideLayers('selectorback','','show');
MM_showHideLayers('basePos','','show');
MM_showHideLayers('selectorbar','','show');
prjNum=0; projectNum=0;
showProject=0;
// if (viewNum==3) {location.reload();viewNum=0;} // Refresh page after 3 project views to stop slowdown bug
}
function viewProject(prjNum) { // View details of a particular project
if (prjNum>0 & showProject==0) {
projectNum=prjNum;
if (px+(projectNum*220)>315) { scrDirection=670; }
else if (px+(projectNum*220)<285) {scrDirection=130; }
else {scrDirection=400;}
}
else { endProject(); }
}
function animate() {
// Top image movements
if (mouseX>offsetW) {
txa=(winW*(mouseX-offsetW))/(winW-offsetW);
tx=txa/winW * HW -160; // menu target
ttx2=txa/winW * TW;
} else {
tx=1/winW * HW -160;
ttx2=1/winW * TW;
}
topx2=(otopx2-ttx2)/2;
// **** Start project scroll ****
if (showProject==0 ) {
// Track mouse speed and last moving direction above threshold
x=mouseX;
if (projectNum>0) { x=scrDirection; } //Start moving to project
dx=x-lastx; lastx=x;
if (dx>0) { dxsign=-1; if (dx>minmove) lastsign=-1; }
else if (dx<0) { dxsign=1; dx=-dx; if (dx>minmove) lastsign=1; }
else dxsign=0;
// Scroll Zones
if (x<leftX) {
a=(leftX-x)/leftX; // normalize scroll speed within zone
if (lastsign==-1) vx*=0.6; // if last move reverse direction, stop
else if (lastsign==1) vx=a*speed; // if last move forward, scroll at normalized speed
}
if (x>rightX) {
a=(x-rightX)/leftX;
if (lastsign==1) vx*=0.6;
else if (lastsign==-1) vx=-a*speed;
}
// Apply speed and friction
px+=vx;
vx*=0.8;
px=Math.round(px);
// Boundaries Check
if (px>scrollm) px=scrollm;
else if (px< scrollM) px=scrollM;
// Only move the layers if necessary
if (px!=opx) {
txsel=Math.round(164-(px*0.089));
Movelayer('selectorback',txsel,171);
for (i=1; i<=numItems; i++) {
tpx=px+(i-1)*220;
//MoveClippedLayer('project'+i,tpx-80,0);
if ( (tpx>-220) && (tpx<720) ) { MM_showHideLayers('project'+i,'','show'); MoveClippedLayer('project'+i,tpx-80,0); }
else MM_showHideLayers('project'+i,'','hide');
}
}
opx=px;
}
// end project scroll
// Check to see whether at project #, if requested
if (projectNum!=0 & showProject==0) {
if (px+(projectNum*220)>285 & px+(projectNum*220)<315) {
showProject=1;viewNum++;
MM_showHideLayers('selectorback','','hide');
MM_showHideLayers('selectorbar','','hide');
MM_showHideLayers('basePos','','hide');
MM_showHideLayers('overlay'+projectNum,'','show');
MM_showHideLayers('instruct','','show');
if (projectNum+2 <= numItems) {MM_showHideLayers('project'+(projectNum+2),'','hide');} // hide the project still showing
srcDirection=0;
}
}
// Set selector bar position
sbx=(mouseX/winW)*67;
if (sbx<12) sbx=12;
if (sbx>67) sbx=67;
if ( Math.abs(topx2-otopx)>1) { Movelayer('topstrip',topx2,0);}
Movelayer('selectorbar',txsel+sbx,172);
// Movelayer('digits2',mouseX-2500,273);
otopx2=topx2;
setTimeout('animate()',30);
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
</script>