/*-------------------------Cross Browser Code------------------------------------*/
IE4 = (document.all) ? 1 : 0;     
NS4 = (document.layers) ? 1 : 0;
ver4 = (IE4 || NS4) ? 1 : 0;    
vis = (NS4) ? "show" : "visible";
invis = (NS4) ? "hide" : "hidden";  
function setVis(tog){
	if (NS4) {
		this.visibility = (tog) ? vis : invis;
		} else {
		this.style.visibility = (tog) ? vis : invis;
		}
	}
function getVis(){
	vsb = (NS4) ? this.visibility : this.style.visibility;
	return(vsb);
	}
function putX(num){
	if (NS4) {
		this.left = num; 
		} else { 
		this.style.left = num;
		}
	}	
function putY(num){
	if (NS4) { 
		this.top = num; 
		} else { 
		this.style.top = num;
		}
	}	
function curClips(side) {
	if (NS4) {
		switch (side) {
			case "t": toRet = this.clip.top; break;
			case "r": toRet = this.clip.right; break;
			case "b": toRet = this.clip.bottom; break;
			case "l": toRet = this.clip.left; break;
			}
		} else {
		sClip = this.style.clip.split("rect(")[1].split(")")[0].split("px");
		switch (side) { 
			case "t": toRet = Number(sClip[0]); break;
			case "r": toRet = Number(sClip[1]); break;
			case "b": toRet = Number(sClip[2]); break;
			case "l": toRet = Number(sClip[3]); break;
			}
		}
	return toRet;
	}

function clipTo(t,r,b,l) {
        if (NS4) {
                this.clip.top = t;
                this.clip.right = r;
                this.clip.bottom = b;
                this.clip.left = l;
        	} else {
		this.style.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)";
		}
	  }

function widthClip(num){
	t = this.curClips("t");
	r = this.curClips("r");
	b = this.curClips("b");
	l = this.curClips("l");
	this.clipTo(t,num,b,l);				
	}
function widthDblClip(num1,num2){
	t = this.curClips("t");
	r = this.curClips("r");
	b = this.curClips("b");
	l = this.curClips("l");
	this.clipTo(t,num2,b,num1);				
        }	
function heightClip(num){
	t = this.curClips("t");
	r = this.curClips("r");
	b = this.curClips("b");
	l = this.curClips("l");
	this.clipTo(t,r,num,l);
	}	
function getX(){
	x = (NS4) ? this.left : this.style.pixelLeft;
	return x;
	}
function getY(){
	y = (NS4) ? this.top : this.style.pixelTop;
	return y;
	}
function getWidth(){
	w = (NS4) ? this.clip.width : this.clientWidth;
	return w;
	}
function getHeight(){
	h = (NS4) ? this.clip.height : this.clientHeight;
	return h;
	}
function putInLayer(lr, str){
	if (NS4){
		with(lz[lr].document){
			open();
			write(str);
			close();
			}
		} else {
		lz[lr].innerHTML = str;
		}
	}
function winDims(whichDim){
	switch (whichDim) {
		case "w" : 
		dim = (NS4) ?   window.pageXOffset+window.innerWidth : 								document.body.offsetWidth-5;
		break;
		case "h" : 
		dim = (NS4) ?   window.pageYOffset+window.innerHeight : 
				document.body.offsetHeight;
		break;
		}
	return dim;
	}
function initLayers(){
	ar = (NS4) ? document.layers : document.all;
	for(i=0; i<ar.length; i++) {
		ar[i].putX = putX;
		ar[i].putY = putY;
		ar[i].widthClip = widthClip;
		ar[i].widthDblClip = widthDblClip;
		ar[i].heightClip = heightClip;
		ar[i].getX = getX;
		ar[i].getY = getY;
		ar[i].getWidth = getWidth;
		ar[i].getHeight = getHeight;
		ar[i].setVis = setVis;
		ar[i].getVis = getVis;
		ar[i].curClips = curClips;
		ar[i].clipTo = clipTo;
		}
	}
lz = new Array();
function setLz(){
	ar = (NS4) ? document.layers : document.all;
	lz = ar;
	}
function initNewLayer(name){
	ar = (NS4) ? document.layers : document.all;
	ar[name].putX = putX;
	ar[name].putY = putY;
	ar[name].widthClip = widthClip;
	ar[name].widthDblClip = widthDblClip;
	ar[name].heightClip = heightClip;
	ar[name].getX = getX;
	ar[name].getY = getY;
	ar[name].getWidth = getWidth;
	ar[name].getHeight = getHeight;
	ar[name].setVis = setVis;
	ar[name].getVis = getVis;
	ar[name].curClips = curClips;
	ar[name].clipTo = clipTo;
	setLz();
	}		
/*---------------------------------Rollover Functions, Etc...--------------------*/
rollRegistryLength = 6;
rollRegistry = new Array();
statusMsgs = new Array();
	statusMsgs[0] = " ";
	statusMsgs[1] = "See why you need a web page and why Ion is the best choice.";
	statusMsgs[2] = "Ion's pricing policies.";
	statusMsgs[3] = "A listing of our past work.";
	statusMsgs[4] = "Sites we have created for public use.";
	statusMsgs[5] = "Arrange to meet with us and find out what we can do for <i>your</i> business.";
	statusMsgs[6] = "Meet the minds behind Ion Communications.";
function addEntry(left, im1, im2, status){
	this.left = left;
	this.im1 = im1;
	this.im2 = im2;
	this.status = status;
	}
function rollRegister(){
	for (i=1; i<=rollRegistryLength; i++){
		imageA = new Image();
		imageA.src = "../images/roll"+i+"_on.gif";
		imageB = new Image();
		imageB.src = "../images/roll"+i+"_off.gif";
		left = -15 + i * 30;
		rollRegistry[i] = new addEntry(left, imageA, imageB, statusMsgs[i]);
		}
	}
rollRegister();
function switchSrc(num, on){
	whichImg = (NS4) ? 
		lz["rollLayer"+num].document.images["rollImg_"+num] : 
		lz["rollImg_"+num];
	if (on) {
		whichImg.src = rollRegistry[num].im2.src;
		} else {
		whichImg.src = rollRegistry[num].im1.src;
		}
	}
	
function newStatus(num){
       if (num == 0) {
            clearTop();
            return;
            }
	showTop(statusMsgs[num]);
	}
function mouseOver(isOn, num){
	if (isOn) {
		newStatus(num);
		switchSrc(num, false);
		} else {
		newStatus(0);
		switchSrc(num, true);
		}
	}

/*---------------------------------Green Line Information------------------------*/
greenLineList = new Array();
numGreenLines = 6;
function greenLineEntry(xcoord, ycoord, align, winWidth, winHeight){
	this.x=xcoord;
	this.y=ycoord;
	this.align=align;
	this.max = (align=='h') ? 
		winHeight-30 : 
		winWidth-100;
	}
function makeGreenList(winWidth, winHeight){
	greenLineList[1] = new greenLineEntry(0,84,'h',winWidth,winHeight); //top
	greenLineList[2] = new greenLineEntry(185,0,'v',winWidth,winHeight); //right
	greenLineList[3] = new greenLineEntry(0,winHeight-30,'h',winWidth,winHeight); //bottom
	greenLineList[4] = new greenLineEntry(15,0,'v',winWidth,winHeight); //left
	greenLineList[5] = new greenLineEntry(0,84,'h',winWidth,winHeight); //top
	greenLineList[6] = new greenLineEntry(185,0,'v',winWidth,winHeight); //right
	}
function initGreen(winWidth, winHeight){
for(i=1; i<=numGreenLines; i++){
	imgWidth = greenLineList[i].width;
	imgHeight = greenLineList[i].height;
	whichLayer = lz["greenLayer"+i];
	whichAlign = greenLineList[i].align;
	switch (whichAlign) {
		case 'h':  
			whichLayer.widthClip(winWidth);
			break;
		case 'v':
			whichLayer.heightClip(winHeight);
			break;
		}
	whichLayer.putY(greenLineList[i].y);
	whichLayer.putX(greenLineList[i].x);
	}	
}

/*-----------------------Content Setting/History Information---------------------*/
siteHistory = new Array();
histCurrent = 0;
histMax = 0;
trueHeight = 0;


function navHi(dir, tog, wid){
    var lr = lz['navImgHi'];
    switchOn = (tog == 'on') ? 1 : 0;
    isBack = (dir == 'back') ? 1 : 0;
    if (switchOn && !isBack) {
        lr.widthDblClip(0,(wid*2/5));
        lr.setVis(1);
        } 
    if (switchOn && isBack) {
        lr.widthDblClip((wid*3/5),wid);
        lr.setVis(1);
        }
    if (!switchOn && !isBack) {
        lr.widthDblClip(0,(wid*2/5));
        lr.setVis(0);
        }
    if (!switchOn && isBack) {
        lr.widthDblClip((wid*3/5),wid);
        lr.setVis(0);
        }                
    }

function setContent(source){
	histMax++;
	histCurrent = histMax;
	siteHistory[histCurrent] = source;
	truesetcontent(siteHistory[histCurrent]);
	}
function histGo(dir){
	switch(dir){
		case "back":
			if(histCurrent>1){
				histCurrent--;
                		truesetcontent(siteHistory[histCurrent]);
				} else {
				history.go(-1);
				}
			break;
		case "forward":
			if(histCurrent<histMax){
				histCurrent++;
				truesetcontent(siteHistory[histCurrent]);
				} else {
				history.go(1);
				}
			break;
		}
	}
function truesetcontent(src){
	contentWidth=winDims('w')-greenLineList[2].x-100-20;
	if (NS4) {
             lz['content'].load(src,contentWidth);
		} else {
		lz['content'].style.pixelWidth=contentWidth;
		fr = lz['cBufferDiv'].document.frames['cbuffer'];
		fr.document.body.innerHTML="blablabla";
		fr.document.location.href=src;
		writeToContent(fr);
		}
	trueHeight = 20000;
	lz['content'].setVis(1);
	}
function writeToContent(){
	fr = lz['cBufferDiv'].document.frames['cbuffer'];
	if (fr.document.body.innerHTML != "blablabla") {
	        lz['content'].innerHTML=fr.document.body.innerHTML;
		} else {
		cTimer = setTimeout("writeToContent();",50);
		}
	}

/*------------Persistent Interface Design Subpage Query--------------*/
function loadSubpage(thisURL){
        if (thisURL.indexOf("?") != -1) {
        validPage = true;
        queryString = thisURL.split("?")[1].split(".htm")[0];
        if (queryString == "") validPage = false;
        queryString += ".html";
        switch(queryString) { 
            case "overview.html":
                num = 1;
                break;
            case "rates.html":
                num = 2;
                break;
            case "examples.html":
                num = 3;
                break;
            case "features.html":
                num = 4;
                break;
            case "contact.html":
                num = 5;
                break;
            case "about_us.html":
                num = 6;
                break;
            default:
                validPage = false;
                }
        finalURL = "../advanced/"+queryString;
        if (validPage) showContent(num,finalURL);
        }        
        }        

     

/*-----------------------------Scrolling Function--------------------------------*/

function scrollit(dir, spd, stop){
	this.direction=dir;
	this.speed=spd;
	this.stopspot=stop;
	this.noninfinite=(this.stopspot == -1) ? 0 : 1; //stop value -1 means infinite loop
	this.infinite=(this.stopspot == -1) ? 1 : 0;
	this.toohigh=(lz['content'].getY() < 100-lz['content'].getHeight()) ? 1 : 0;
	this.toolow=(lz['content'].getY()>98) ? 1 : 0;
	gg=this;
	switch (this.direction) {
                case "dn":
			if(this.noninfinite && this.stopspot-this.getY()<this.speed){
				this.putY(this.stopspot); 
				this.loop = false;}
                        if((this.getY() > this.stopspot) && this.noninfinite)  this.loop = false;
                        if(this.infinite && this.toolow) {
				this.loop = false;
				}
                        if (this.loop) this.putY(this.getY()+this.speed);
                        break;
                case "up":
			if(this.noninfinite && this.getY()-this.stopspot<this.speed){
				this.putY(this.stopspot); 
				this.loop = false;}
                        if((this.getY() < this.stopspot) && this.noninfinite) this.loop = false;
                        if(this.infinite && this.toohigh) this.loop = false;
                        if (this.loop) this.putY(this.getY()-this.speed);
                        break;
                case "lt":
			if(this.noninfinite && this.getX()-this.stopspot<this.speed){
				this.putX(this.stopspot); 
				this.loop = false;}
                        if((this.getX() < this.stopspot) && this.noninfinite) this.loop = false;
                        if (this.loop) this.putX(this.getX()-this.speed);
                        break;
                case "rt":
			if(this.noninfinite && this.stopspot-this.getX()<this.speed){
				this.putX(this.stopspot); 
				this.loop = false;}
                        if((this.getX() > this.stopspot) && this.noninfinite) this.loop = false;
                        if (this.loop) this.putX(this.getX()+this.speed);
                        break;
        }
   	if(this.loop==false) return;
   	   clearTimeout(gg.scrollTimer);
	doString = "gg.scrollTimer=gg.scrollit(\""+this.direction+"\","+this.speed+","+this.stopspot+")";
        scrollTimer = setTimeout(doString, this.speed);
	}

/*------------------------------Content Expansion-----------------------------------*/
var lastMoved = 1;
var going = false;
var keepGoing = false;
function showContent(num, pageSrc){
	hBE = true;
	if (!going){
		keepGoing = true;
		setContent(pageSrc);
		resizeGreen(lastMoved,"in");
                mainPres.resetPresent();
                mainPres.pausePresent(1);
                codePres.resetPresent();
		resizeGreen(num,"out");	
		lastMoved = num;
		} else {
		keepGoing = false;
		setTimeout("going=false;showContent("+num+",\""+pageSrc+"\");",10);
		}		
	}
function resizeGreen(labelNum, how){
	if (!keepGoing) return;
	going = true;	
	g1 = lz['greenLayer1'];
	g2 = lz['greenLayer2'];
	lg = lz['littleLogo'];
	lb = lz['rollLayer'+labelNum];
	sc = lz['scrollBar'];
	c = lz['content'];
	xl = lz['xLayer'];
	speed = (NS4) ? 24 : 48;
	switch (how) {
		case "out":
			stop1 = greenLineList[1].max;
			stop2 = greenLineList[2].max;
			badWide = g2.getX() >= stop2 ? 1 : 0;
			badLong = g1.getY() >= stop1 ? 1 : 0;
			if (!badLong) g1.putY(g1.getY()+speed);
			if (!badWide) g2.putX(g2.getX()+speed);
			lg.putX(g2.getX()+1);
			lb.putX(g2.getX()-22);//-lb.getWidth()-1);
			sc.putX(g2.getX()+1);
			xl.putX(g2.getX()-10);//-xl.getWidth());
			xl.setVis(1);
			c.putY(99);
			c.heightClip(g1.getY()-greenLineList[1].y-speed);
			c.widthClip(g2.getX()-greenLineList[2].x-1);
			if (stop2 - g2.getX() < speed) g2.putX(stop2);  
			if (stop1 - g1.getY() < speed) g1.putY(stop1);
			if (badLong) c.heightClip(trueHeight);
			if (badWide) lz['topText'].putX(lz['greenLayer6'].getX());
			break;
		case "in":
            mainPres.pausePresent(0);
			g1.putY(greenLineList[1].y);
			g2.putX(greenLineList[2].x);
			c.heightClip(1);
			c.widthClip(1);
			lg.putX(g2.getX()+1);
			sc.putX(g2.getX()+1);
			lb.putX(rollRegistry[labelNum].left);
			xl.setVis(0);
			xl.putX(g2.getX()-10);
			badWide = 1;
			badLong = 1;
			lz['topText'].putX(lz['greenLayer6'].getX()+100);
			break;
			}
	doString = "resizeGreen" + "(\"" + labelNum + "\",\"" + how + "\")";
	if (badLong && badWide) going = false;
	if (!badLong || !badWide) greenTimer = setTimeout(doString, 10); 
	}

/*------------------------------Content Scrolling-------------------------------*/
function scrollcontent(dir,spd){
	lz['blocker1'].putY(-1);
        if(contentloop){
                lz['content'].loop=true;
                lz['content'].scrollit = scrollit;
                lz['content'].scrollit(dir, spd, -1);
                }
        }
function stopscrollcontent(){
        contentloop=false;
        lz['content'].loop=false;
        }

/*-----------------------------ScrollBar RollUnder------------------------------*/
function hiRed(setOn, redX, redY){
	newX = redX + lz['scrollBar'].getX();
	newY = redY + lz['scrollBar'].getY();
	if (setOn) {
		lz['redSquare'].putX(newX);
		lz['redSquare'].putY(newY);
		lz['redSquare'].setVis(1);
		} else {
		lz['redSquare'].setVis(0);
		}
	}

/*-------------------------Content Window CloseX Rollover------------------------*/
xA = new Image();
xA.src = "../images/x_hi.gif";
xB = new Image();
xB.src = "../images/x.gif";
function xSwitch(on){
	whichImg = (NS4) ? lz['xLayer'].document.images['xImage'] : 
			   lz['xImage'];
	if (on) {
		whichImg.src = xB.src;
		} else {
		whichImg.src = xA.src;
		}
	}

/*----------------------------Text Blockers (blank black layers)----------------*/
function putBlockers(){
	lz['blocker1'].putY(0);
	lz['blocker1'].putX(lz['greenLayer2'].getX());
//	lz['blocker1'].widthClip(winDims('w'));
	lz['blocker1'].heightClip(lz['greenLayer1'].getY()+14);
	lz['blocker2'].putY(lz['greenLayer3'].getY()+15);
	lz['blocker2'].putX(lz['greenLayer2'].getX());
//	lz['blocker2'].widthClip(winDims('w'));
	lz['blocker2'].heightClip(winDims('h')-lz['greenLayer3'].getY()-12);
	}

/*----------------------------------Top Messages--------------------------------*/
function topMsg(msg, delay){
	tb = "<TABLE ROWS=1 COLS=1 WIDTH="+rw+"><TR><TD><CENTER>"
	te = "</CENTER></TD></TR></TABLE>";
	this.msg = tb+msg+te;
	this.delay = delay;
	}
function initTop(win){
	rw = win-(lz['greenLayer6'].getX()+100+20);	
	fs = "<FONT FACE=\"Verdana, Arial, Helvetica\" SIZE=\"2\" COLOR=\"silver\">";
	fg = "<FONT FACE=\"Verdana, Arial, Helvetica\" SIZE=\"2\" COLOR=\"gold\">";
	fb = "<FONT FACE=\"Verdana, Arial, Helvetica\" SIZE=\"2\" COLOR=\"lightblue\">";
	fr = "<FONT FACE=\"Verdana, Arial, Helvetica\" SIZE=\"2\" COLOR=\"red\">";			
	ef = "</FONT>";
	topMsgs = new Array();
    topMsgs[0] = new topMsg(fg + "We are what we repeatedly do.  Excellence, then, is not an act, but a habit.<BR>"+ef+fs+"--Aristotle"+ef,7000);
    topMsgs[1] = new topMsg(fb + "Smart man."+ef,3000);
	topMsgs[2] = new topMsg(fg+"Welcome"+ef,400);
	topMsgs[3] = new topMsg(fs+"to"+ef,400);
	topMsgs[4] = new topMsg(fg+"Ion Communications"+ef,3000);
	topMsgs[5] = new topMsg(fg+"<B>the premier web development firm</B>"+ef,2000);
	topMsgs[6] = new topMsg(fs+"experience the"+ef,1000);
	topMsgs[7] = new topMsg(fs+"information superhighway, and..."+ef,1250);	
    topMsgs[8] = new topMsg(fg+"globalization, and..."+ef,1250);
    topMsgs[9] = new topMsg(fb+"e-commerce"+ef,500);
    topMsgs[10] = new topMsg(fb+"e-trade"+ef,500);
    topMsgs[11] = new topMsg(fb+"e-mail"+ef,500);       
    topMsgs[12] = new topMsg(fb+"e-this"+ef,500);
    topMsgs[13] = new topMsg(fb+"e-that"+ef,500);              
    topMsgs[14] = new topMsg(fg+"<B>insert catch phrase here</B>"+ef,2500);    
    topMsgs[15] = new topMsg(fs+"The "+ef+fg+"real"+ef+fs+" internet is "+ef+fg+"<B>not</B>"+ef+fs+" surfed, friend."+ef,3000);
    topMsgs[16] = new topMsg(fg+"<B>It's stampeded.</B>"+ef,3500);
    topMsgs[17] = new topMsg(fs+"Beat the herd."+ef,2000);
    topMsgs[18] = new topMsg(fs+"with"+ef,400);
    topMsgs[19] = new topMsg(fg+"Ion Communications."+ef,4000);
	topMsgs[20] = new topMsg(fg+"High"+ef,800);
	topMsgs[21] = new topMsg(fs+"Impact"+ef,1500);
	topMsgs[22] = new topMsg(fg+"High"+ef,800);
	topMsgs[23] = new topMsg(fs+"Media"+ef,1500);
	topMsgs[24] = new topMsg(fg+"Low"+ef,800);
	topMsgs[25] = new topMsg(fs+"Cost"+ef,1500);
	topMsgs[26] = new topMsg(fb+"You can't lose."+ef,2000);
	topMsgs[27] = new topMsg(" ",4000);
	lz['topText'].putX(lz['greenLayer2'].getX()+100);
	}
topOccupied = false;
function animTop(num){
       if (topOccupied) {
            setTimeout("animTop("+num+");",50);
            return;
            }
	lz['topText'].setVis(0);
	putInLayer('topText',topMsgs[num].msg);
	lz['topText'].putY(47 - (lz['topText'].getHeight()/2));
	lz['topText'].setVis(1);
	newnum = (num<topMsgs.length-1) ? num + 1 : 0;
	topTimer = setTimeout("animTop("+newnum+");",topMsgs[num].delay);
	}
function showTop(msg){
       topOccupied = true;
	lz['topText'].setVis(0);
	realMsg = new topMsg(fg+msg+ef,0);
	putInLayer('topText',realMsg.msg);
	lz['topText'].putY(47 - (lz['topText'].getHeight()/2));
	lz['topText'].setVis(1);
    }
function clearTop(){
    topOccupied = false;
    lz['topText'].setVis(0);
    }

/*--------------Functions to execute while loading-------------------------------*/

dispReady = false;

function doWhileLoading(){
    lz['loadCenterLine'].putX(winDims('w')/2);
    lz['loadCenterLine'].putY((winDims('h')/2)-145);
    lz['loadSkipAhead'].putX(0);
    lz['loadSkipAhead'].putY(winDims('h')-lz['loadSkipAhead'].getHeight()-10);
    lz['loadSkipAhead'].setVis(1);
    lz['loadAnatomy'].putX(lz['loadCenterLine'].getX()-200);
    lz['loadAnatomy'].putY(lz['loadCenterLine'].getY()+30);
    lz['loadOf'].putX(lz['loadCenterLine'].getX()+20);
    lz['loadOf'].putY(lz['loadCenterLine'].getY()+90);
    lz['loadThe'].putX(lz['loadCenterLine'].getX()-95);
    lz['loadThe'].putY(lz['loadCenterLine'].getY()+140);
    lz['loadCommon'].putX(lz['loadCenterLine'].getX()+25);
    lz['loadCommon'].putY(lz['loadCenterLine'].getY()+160);
    lz['loadLine'].putX(lz['loadCenterLine'].getX()-160);
    lz['loadLine'].putY(lz['loadCenterLine'].getY()+190);
    lz['loadTop'].putX(lz['loadCenterLine'].getX()-43);
    lz['loadTop'].putY(lz['loadCenterLine'].getY()-13);
    lz['loadMiddle'].putX(lz['loadCenterLine'].getX()+1);
    lz['loadMiddle'].putY(lz['loadCenterLine'].getY()+123)
    lz['loadBottom'].putX(lz['loadCenterLine'].getX()-79);
    lz['loadBottom'].putY(lz['loadCenterLine'].getY()+266)
    lz['loadUHere'].putX(lz['loadCenterLine'].getX()+1);
    lz['loadUHere'].putY(lz['loadCenterLine'].getY()-13);
    lz['loadCenterLine'].setVis(1);
    t1 = setTimeout("if (!displayed) lz['loadAnatomy'].setVis(1);",3000);
    t2 = setTimeout("if (!displayed) lz['loadOf'].setVis(1);",4500);
    t3 = setTimeout("if (!displayed) lz['loadThe'].setVis(1);",6000);
    t0 = setTimeout("if (!displayed) lz['loadCommon'].setVis(1);",6500);
    t4 = setTimeout("if (!displayed) lz['loadLine'].setVis(1);",7500);
    t5 = setTimeout("if (!displayed) lz['loadTop'].setVis(1);",10000);
    t6 = setTimeout("if (!displayed) lz['loadMiddle'].setVis(1);",11000);
    t7 = setTimeout("if (!displayed) lz['loadBottom'].setVis(1);",12000);
    t8 = setTimeout("if (!displayed) lz['loadUHere'].setVis(1);",14000);
	td1 = setTimeout("if (!displayed) lz['loadAnatomy'].setVis(0);",16000);
	td2 = setTimeout("if (!displayed) lz['loadCommon'].setVis(0);",16000);
	td3 = setTimeout("if (!displayed) lz['loadMiddle'].setVis(0);",16500);
	td4 = setTimeout("if (!displayed) lz['loadBottom'].setVis(0);",16500);
	td5 = setTimeout("if (!displayed) lz['loadUHere'].setVis(0);",16000);
    tDone = setTimeout("dispReady=true;",23000);
    }

  

/*--------------------Functions to execute onLoad--------------------------------*/
function skipAhead(){
    dispReady = true;
    }
origLocation = "";
origLocation += window.location.href;
function doLoad(){
         if (!dispReady) {
            setTimeout("doLoad();",100);
            return;
            }
		if (!NS4) rollAlign();
        dispPage();
        dispContact();
        animTop(0,winDims('w'));
        mainPres.startPresent();
		codePres.startPresent();
        loadSubpage(origLocation);
        }
hBE = false;
function dispContact(){
	setTimeout("if (!hBE) showContent(1,'../advanced/overview.html');",25000);
	}
var displayed = false;
function dispPage(){
        displayed = true;
        for (i=0;i<lz.length;i++){
            exc1 = (lz[i].id=="redSquare");
            exc2 = (lz[i].id=="xLayer");
            exc3 = (lz[i].id=="content");
            exc4 = (lz[i].id=="navImgHi");
            excPres = (lz[i].id.indexOf('pres') != -1);
            loadPage= (lz[i].id.indexOf('load') != -1);
            if (loadPage) lz[i].setVis(0);
            if (lz[i].id =="loadExplain" || lz[i].id =="loadSkipAhead") lz[i].setVis(0);
            exclude = (exc1 || exc2 || exc3 || exc4 || excPres || loadPage);
            if (NS4) { isDiv = true;
                        } else {
                        isDiv = (lz[i].tagName == 'DIV') ;
                        }
            if ((!exclude) && isDiv) lz[i].setVis(1);
            }
        }

function rollAlign(){
	for(i=1; i<=rollRegistryLength; i++){
		lz['rollLayer'+i].putY(0);
		lz['rollLayer'+i].putX(rollRegistry[i].left); 
		}
	}