/*
All the code below is to be used in projects which require DHTML elements
such as hiding layers, showing layers and even animating layers.

All code developed by Lee Mansfield - ZoneGroup

Version 2.2

Date Ammended:- 2nd May 2001

Browser Compatibility (P.C & MAC)	:- Interner Explorer 4+
													   Netscape Navigator 4+
													   Netscape Navigator 6						
*/


/************************* GLOBAL VARIABLE DECLERATIONS *************************/
var layerRef="";
var styleSwitch="";
var isNav, isIE, isNav6;
var mac = (navigator.appVersion.indexOf("Mac")!=-1);

/******************************** init() ****************************************/
//This function sets up browser specific access to layers of a page.

function init()
{
		if (navigator.appName == "Netscape"){

			if (parseInt(navigator.appVersion) == 5){
				isNav6 = true
				layerStyleRef="layer.style.";
				layerRef="document.getElementById";
				styleSwitch=".style";
			}
			else{
				layerStyleRef="layer.";
				layerRef="document.layers";
				styleSwitch="";
				isNav = true;
				onresize=function(){location.reload()}
				}
        }
		else{
        		layerStyleRef="layer.style.";
				layerRef="document.all";
				styleSwitch=".style";
				isIE = true
		}
}
/********************** ImgOn Function ******************/
//An image swap function which in the case of Netscape pentrates
//the initial layer to swap the image within in this case to the
//ON state

function imgOn(layerName,imgName){
	
	if (isNav){
		if(document.images)	{
			document[layerName].document[imgName].src = eval(imgName + "on.src");}
	}

	else{
		if(document.images){
			document[imgName].src = eval(imgName + "on.src");}
	}
}
/*********************** ImgOff Function **********************/
//An image swap function which in the case of Netscape penerates
//the initial layer to swap the image within in this case to the
//OFF state

function imgOff(layerName,imgName){	
	
	if (isNav){
		if(document.images)	{
			document[layerName].document[imgName].src = eval(imgName + "off.src");}
	}

	else{
		if(document.images){
			document[imgName].src = eval(imgName + "off.src");}
	}
}
/**************************** show_layers() *************************************/
//This function shows the layer who's name is passed to it.

function show_layers(layerName){
	
	if(isNav6){
		eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="visible"');}
	else{
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');}
}

/**************************** hide_layers() *************************************/
//This function hides the layer who's name is passed to it.

function hide_layers(layerName){
	if(isNav6){
		eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="hidden"');}
	else{
	eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');}
}

/*************************** isHidden() *****************************************/
//This function returns true if the layer name sent to it is hidden

function isHidden(layerName){
	
	if(isNav6){
		if (eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility') == "hidden"){
			return true;
		}
	}
	else{
		if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility') == "hidden"){
			return true;
		}
	}
}

/*************************** isVisible() *****************************************/
//This function returns true if the layer name sent to it is visible

function isVisible(layerName){
	
	if(isNav6){
		if (eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility') == "visible"){
			return true;
		}
	}
	else{
		if (eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility') == "visible"){
			return true;
		}
	}
}

/**************************** getTop() ******************************************/
//This function gets the top position of the layer name sent to it

function getTop(layerName){
	
	if(isNav6){
		return eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top');
	}
	else{
		return eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top');
	}
}



/**************************** getLeft() ******************************************/
//This function gets the left position of the layer name sent to it

function getLeft(layerName){
	
	if(isNav6){
		return eval(layerRef+'("'+layerName+'")'+styleSwitch+'.left');
	}
	else{
		return eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left');
	}
}



/**************************** setLeft() ******************************************/
//This function sets the layer to a specified left coordinate sent to the function

function setLeft(layerName, left){
	
	if(isNav6){
		return eval(layerRef+'("'+layerName+'")'+styleSwitch+'.left=left');
	}
	else{
		return eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');
	}
}

/**************************** setTop() ******************************************/
//This function sets the layer to a specified top coordinate sent to the function

function setTop(layerName, top){

	if(isNav6){
		return eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top=top');
	}
	else{
		return eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');
	}
}

/**************************** moveLayerTo() *************************************/
//This function 'moves' a layer to different screen co-ordinates. The layer name
//as well as the co-ordinates are passed to it.

function moveLayerTo(layerName, top, left)
{
	if(isNav6){
		eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top=top');
		eval(layerRef+'("'+layerName+'")'+styleSwitch+'.left=left');}
	
	else{
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');
		eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');
	}
}

/**************************** getNestedLayerTop() ******************************************/
//This function gets the top position of the layer name sent to it

function getNestedLayerTop(parentLayerName, childLayerName){
	
	if(isNav6){
		return eval(layerRef+'("'+childLayerName+'")'+styleSwitch+'.top');
	}
	else if(isNav){
		return eval(layerRef+'["'+parentLayerName+'"]'+'.'+layerRef+'["'+childLayerName+'"]'+styleSwitch+'.top');
	}
	else{
		return eval(layerRef+'["'+childLayerName+'"]'+styleSwitch+'.top');
	}
}

/**************************** getNestedLayerLeft() ******************************************/
//This function gets the left position of the layer name sent to it

function getNestedLayerLeft(parentLayerName, childLayerName){
	
	if(isNav6){
		return eval(layerRef+'("'+childLayerName+'")'+styleSwitch+'.left');
	}
	else if(isNav){
		return eval(layerRef+'["'+parentLayerName+'"]'+'.'+layerRef+'["'+childLayerName+'"]'+styleSwitch+'.left');
	}
	else{
		return eval(layerRef+'["'+childLayerName+'"]'+styleSwitch+'.left');
	}
}

/**************************** moveNestedLayerTo() *************************************/
//This function 'moves' a layer which is nested in another to different screen co-ordinates.
//The layer name as well as the co-ordinates are passed to it.

function moveNestedLayerTo(parentLayerName, childLayerName, top, left)
{
	if(isNav6){
		eval(layerRef+'("'+childLayerName+'")'+styleSwitch+'.top=top');
		eval(layerRef+'("'+childLayerName+'")'+styleSwitch+'.left=left');}
	
	else if (isNav){
		eval(layerRef+'["'+parentLayerName+'"]'+'.'+layerRef+'["'+childLayerName+'"]'+styleSwitch+'.top=top');
		eval(layerRef+'["'+parentLayerName+'"]'+'.'+layerRef+'["'+childLayerName+'"]'+styleSwitch+'.left=left');
	}
	else{
		eval(layerRef+'["'+childLayerName+'"]'+styleSwitch+'.top=top');
		eval(layerRef+'["'+childLayerName+'"]'+styleSwitch+'.left=left');
	}
}

/**************************** getInsideWindowWidth() ****************************/
//This function gets the total width of the browser window

function getInsideWindowWidth()
{
	if ((isNav) || (isNav6)){
		return window.innerWidth;}
	else{
		return document.body.clientWidth;}
}

/*************************** getInsideWindowHeight() ****************************/
//This function gets the total height of the browser window

function getInsideWindowHeight()
{
	if ((isNav) || (isNav6)){
		return window.innerHeight;}
	else{
		return document.body.clientHeight;}
}

/**************************** resetDrop() ******************************************/
//This function resets the state of a drop down select box on the HTML page

function resetDrop(layerName, formName){

	if (isNav){
		eval('document.'+layerName+'.'+'document.'+formName+'.select.selectedIndex = 0');
	}
	else{
		eval(layerRef+'["'+formName+'"].select.selectedIndex = 0');
	}
}

/* =================================== DHTML ANIMATION TECHNIQUES =================================  */

//FLICK BOOK METHODS
//Include the following variable declerations in the html document

//var pageCount = 0;
//var hideArrow = 0;
//var contentTotal = 17; //*** ENTER HERE THE TOTAL AMOUNT OF LAYERS IN THE DOCUMENT ***/
//Then in the html document simply put the followng lines of code:-

//<a href="javascript:forward()">Forward</a>
//<a href="javascript:back()">Back</a>

/********************************** showContentForward() *************************/
//This function displays layers one after another by showing the current one and
//hiding the others. When it reaches the final layer it will also hide the link
//which triggers to this function. So place the functions in the html like so:-

function showContentForward()
{
	var contentNum = pageCount + 1;
	
	hideArrow++; //is a counter to tell when have encountered the last layer

	show_layers('content' + contentNum)
	
	if(contentNum > 1){
		show_layers('leftArrow');
	}

	for(i=1 ; i<contentTotal ; i++){
		if (i != contentNum){
			hide_layers('content' + i);
		}
		if (hideArrow == contentTotal-1){
			hide_layers('rightArrow');
		}
	}
}
/********************************** showContentBack() ****************************/
//This function displays layers one after another by showing the current one and
//hiding the others. When it reaches the first layer it will also hide the link
//which triggers to this function

function showContentBack()
{
	var contentNum = pageCount + 1;

	hideArrow--;

	show_layers('content' + contentNum);
	hide_layers('content' + contentTotal);

	if(contentNum < contentTotal){
		show_layers('rightArrow');
	}

	for(i=contentNum+1 ; i<contentTotal ; i--){
		if (i == 0){break;}
		else{
			if (i != contentNum){
					hide_layers('content' + i);}
			if (hideArrow == 0){
					hide_layers('leftArrow');}
		}
	}
}
/*********************************** forward() *********************************/
// This function scrolls through the content layers by using the function 
//showContentForward()

function forward(){
	
	var counter = contentTotal - 1;
	
	if(pageCount != counter){
		pageCount++;
		showContentForward();
	}else{}
}
/*********************************** back() ************************************/
// This function scrolls through the content layers by using the function 
//showContentForward()

function back(){
	if(pageCount !=0){
		pageCount--;
		showContentBack();
	}else{}
}


/*=========================== SCROLLING LAYERS METHODS ========================*/



//Include the following variable declerations on the html page for your scrolling layer

//var scrollUp = true; //animation variable
//var scrollDown = true; //animation variable
//var scrollLeft = true //animation variable
//var scrollRight = true //animation variable
//var speed = 2 //sets the speed of the scrolling
//var origSpeed = 2 //set this to the same value above this is used when the friction function is used

/*********************************** scroll_UD(layerName, where, leftPos, startPos, stopPos) ********************************/
//This function is the main scrolling function. It has passed to it the direction in which
//to scroll the layer. As well as what layer to scroll with its name passed to it also.
//Also passed are the coordinates of the left position of the layer, the start position (the top number of the layer) and
//the stop position of the layer. In this case Up or Down

function scrollUD(layerName, where, leftPos, startPos, stopPos){

	if (where == 'up'){
		scrollUp = true;
		animateUp(layerName, leftPos, stopPos);
	}
	else if (where == 'down'){
		scrollDown = true;
		animateDown(layerName, leftPos, stopPos);
	}
}

/*********************************** animateUp(layerName, leftPos, stopPos) **********************************/
//This function scrolls the layer upwards on the page by simply incrementing the 
//top coordinate variable.

function animateUp(layerName, leftPos, stopPos){
	
	var top = parseInt(getTop(layerName))

	if ((scrollUp == true) && (top > stopPos)){
		top = top - speed;
		moveLayerTo(layerName, top, leftPos);
		newLayerName = layerName;
		newLeftPos = leftPos;
		newStopPos = stopPos;
		timerID=setTimeout('animateUp(newLayerName, newLeftPos, newStopPos)',10);
	}
}
/*********************************** animateDown(layerName, leftPos, startPos) ********************************/
//This function scrolls the layer downwards on the page by simply decrementing the 
//top coordinate variable

function animateDown(layerName, leftPos, stopPos){
	
	var top = parseInt(getTop(layerName))

	if ((scrollDown == true) && (top < stopPos)){
		top = top + speed;
		moveLayerTo(layerName, top, leftPos);
		newLayerName = layerName;
		newLeftPos = leftPos;
		newStopPos = stopPos;
		timerID=setTimeout('animateDown(newLayerName, newLeftPos, newStopPos)',10);
	}
}

/*********************************** scroll_LR(layerName, where, leftPos, startPos, stopPos) ********************************/

//TO DETERMINCE WHETHER YOU WANT THE SCROLL TO GO FROM RIGHT TO LEFT OR FROM LEFT TO RIGHT YOU SIMPLY MAKE SURE
//THAT THE stopPos VARIABLE NUMBER IS GREATER THAN OR LESS THAN THE INITAL left SETTING OF THE SCROLLING LAYER eg:-

//This function is the main scrolling function. It has passed to it the direction in which
//to scroll the layer. As well as what layer to scroll with its name passed to it also.
//Also passed are the coordinates of the left position of the layer, the start position (the top number of the layer) and
//the stop position of the layer. In this case Left or Right

function scrollLR(layerName, where, topPos, startPos, stopPos){

	if (where == 'left'){
		scrollLeft = true;
		animateLeft(layerName, topPos, stopPos);
	}
	else if (where == 'right'){
		scrollRight = true;
		animateRight(layerName, topPos, stopPos);
	}
}

/*********************************** animateLeft(layerName, leftPos, stopPos) **********************************/
//This function scrolls the layer left on the page by simply incrementing the 
//left coordinate variable.

function animateLeft(layerName, topPos, stopPos){
	
	var left = parseInt(getLeft(layerName))

	if ((scrollLeft == true) && (left > stopPos)){
		left = left - speed;
		moveLayerTo(layerName, topPos, left);
		newLayerName = layerName;
		newTopPos = topPos;
		newStopPos = stopPos;
		timerID=setTimeout('animateLeft(newLayerName, newTopPos, newStopPos);',10);
	}
}
/*********************************** animateRight(layerName, leftPos, startPos) ********************************/
//This function scrolls the layer right on the page by simply decrementing the 
//left coordinate variable

function animateRight(layerName, topPos, stopPos){
	
	var left = parseInt(getLeft(layerName))

	if ((scrollRight == true) && (left < stopPos)){
		left = left + speed;
		moveLayerTo(layerName, topPos, left);
		newLayerName = layerName;
		newTopPos = topPos;
		newStopPos = stopPos;
		timerID=setTimeout('animateRight(newLayerName, newTopPos, newStopPos);',10);
	}
}

/*=============================================================================================*/


//What the following functions achieve is scrolling a layer within a layer. This technique does
//away with the need for masking gfx at the top and bottom of the layer to hide
//the forthcoming text. As well as negate the viewing of the scrollbars produced
//in the browser automatically

/*********************************** nestedScroll_UD(layerName, where, leftPos, startPos, stopPos) ********************************/
//This function is the main scrolling function. It has passed to it the direction in which
//to scroll the layer. As well as what layer(s) to scroll with its name passed to it also.
//Also passed are the coordinates of the left position of the layer, the start position (the top number of the layer) and
//the stop position of the layer. In this case Up or Down

function nestedScrollUD(parentLayerName, childLayerName, where, leftPos, startPos, stopPos){

	if (where == 'up'){
		scrollUp = true;
		nestAnimateUp(parentLayerName, childLayerName, leftPos, stopPos);
	}
	else if (where == 'down'){
		scrollDown = true;
		nestAnimateDown(parentLayerName, childLayerName, leftPos, startPos);
	}
}

/*********************************** nestAnimateUp(layerName, leftPos, stopPos) **********************************/
//This function scrolls the layer upwards on the page by simply incrementing the 
//top coordinate variable.

function nestAnimateUp(parentLayerName, childLayerName, leftPos, stopPos){
	
	var top = parseInt(getNestedLayerTop(parentLayerName, childLayerName))

	if ((scrollUp == true) && (top > stopPos)){
		top = top - speed;
		moveNestedLayerTo(parentLayerName, childLayerName, top, leftPos);
		newParentLayerName = parentLayerName;
		newChildLayerName = childLayerName;
		newLeftPos = leftPos;
		newStopPos = stopPos;
		timerID=setTimeout('nestAnimateUp(newParentLayerName, newChildLayerName, newLeftPos, newStopPos);',10);
	}
}
/*********************************** nestAnimateDown(layerName, leftPos, startPos) ********************************/
//This function scrolls the layer downwards on the page by simply decrementing the 
//top coordinate variable

function nestAnimateDown(parentLayerName, childLayerName, leftPos, startPos){
	
	var top = parseInt(getNestedLayerTop(parentLayerName, childLayerName))

	if ((scrollDown == true) && (top < startPos)){
		top = top + speed;
		moveNestedLayerTo(parentLayerName, childLayerName, top, leftPos);
		newParentLayerName = parentLayerName;
		newChildLayerName = childLayerName;
		newLeftPos = leftPos;
		newStartPos = startPos;
		timerID=setTimeout('nestAnimateDown(newParentLayerName, newChildLayerName, newLeftPos, newStartPos);',10);
	}
}

/*********************************** nestedScroll_LR(layerName, where, leftPos, startPos, stopPos) ********************************/

//TO DETERMINCE WHETHER YOU WANT THE SCROLL TO GO FROM RIGHT TO LEFT OR FROM LEFT TO RIGHT YOU SIMPLY MAKE SURE
//THAT THE stopPos VARIABLE NUMBER IS GREATER THAN OR LESS THAN THE INITAL left SETTING OF THE SCROLLING LAYER eg:-

function nestedScrollLR(parentLayerName, childLayerName, where, topPos, startPos, stopPos){

	if (where == 'left'){
		scrollLeft = true;
		nestAnimateLeft(parentLayerName, childLayerName, topPos, stopPos);
	}
	else if (where == 'right'){
		scrollRight = true;
		nestAnimateRight(parentLayerName, childLayerName, topPos, stopPos);
	}
}

/*********************************** animateLeft(layerName, leftPos, stopPos) **********************************/
//This function scrolls the layer left on the page by simply incrementing the 
//left coordinate variable.

function nestAnimateLeft(parentLayerName, childLayerName, topPos, stopPos){
	
	var left = parseInt(getNestedLayerLeft(parentLayerName, childLayerName))

	if ((scrollLeft == true) && (left > stopPos)){
		left = left - speed;
		moveNestedLayerTo(parentLayerName, childLayerName, topPos, left);
		newParentLayerName = parentLayerName;
		newChildLayerName = childLayerName;
		newTopPos = topPos;
		newStopPos = stopPos;
		timerID=setTimeout('nestAnimateLeft(newParentLayerName, newChildLayerName, newTopPos, newStopPos);',10);
	}
}
/*********************************** animateRight(layerName, leftPos, startPos) ********************************/
//This function scrolls the layer right on the page by simply decrementing the 
//left coordinate variable

function nestAnimateRight(parentLayerName, childLayerName, topPos, stopPos){
	
	var left = parseInt(getNestedLayerLeft(parentLayerName, childLayerName))

	if ((scrollRight == true) && (left < stopPos)){
		left = left + speed;
		moveNestedLayerTo(parentLayerName, childLayerName, topPos, left);
		newParentLayerName = parentLayerName;
		newChildLayerName = childLayerName;
		newTopPos = topPos;
		newStopPos = stopPos;
		timerID=setTimeout('nestAnimateRight(newParentLayerName, newChildLayerName, newTopPos, newStopPos);',10);
	}
}

/*********************************** stopScroll(where) ****************************/
//This function simply halts the scrolling of the layer

function stopScroll(where){

	if (where == 'up'){
		scrollUp = false;
	}
	else if (where == 'down'){
		scrollDown = false;
	}
	else if (where == 'left'){
		scrollLeft = false;
	}
	else if (where == 'right'){
		scrollRight = false;
	}
}

/*********************************** stopScroll(where) ****************************/
//This function creates the effect of adding friction to the scrolling layer, it doesn't instantly stop
//when you want it to it smoothly comes to a full stop instead

function friction(direction){

	switch(direction){

		case	'up'		:			{	speed--;

											if (speed == 0){
												stopScroll('left');
												speed = origSpeed;
											}
											else{
												dir = 'up'
												timerID=setTimeout('friction(dir)',125);
											}
										break;
										}

		case	'down'	:			{	speed--;

											if (speed == 0){
												stopScroll('down');
												speed = origSpeed;
											}
											else{
												dir = 'down'
												timerID=setTimeout('friction(dir)',125);
											}
										break;
										}

		case 'left'		:		{	speed--;

											if (speed == 0){
												stopScroll('left');
												speed = origSpeed;
											}
											else{
												dir = 'left'
												timerID=setTimeout('friction(dir)',125);
											}
										break;
										}

		case 'right'		:		{	speed--;

											if (speed == 0){
												stopScroll('right');
												speed = origSpeed;
											}
											else{
												dir = 'right';
												timerID=setTimeout('friction(dir)',125);
											}
										break;
										}
	}//switch
}

//IFRAME and LAYER scrolling functions are defined below.

//What these functions achieve is scrolling a layer within a layer. This technique does
//away with the need for masking gfx at the top and bottom of the layer to hide
//the forthcoming text. As well as negate the viewing of the scrollbars produced
//in the browser automatically

//The syntax is:-

//For I.E and Netscape 6 use this (the name of the frame has to be main!):-
//<iframe name="main" style="position:absolute ; top:50 ; left:5" scrolling=no frameborder=0 src="<src doc here>"></iframe>

//For Netscape 4.x use this (the name of the layer has to be main!) Also place the layer right
//at the bottom of the page!:-
//<layer name="main" top=250 left=100 width=250 height=50 src="<src doc here></layer>

/**************************** loadLayer() ******************************************/
//This function will load in a file to a floating frame with the name specified

function loadLayer(layerName, fileName){
	
	if (isNav6){
		eval(layerRef+'("'+layerName+'").src = fileName');
	}
	else{
		eval(layerRef+'["'+layerName+'"].src = fileName');
	}
}

/**************************** getTopFrame(layerName) ******************************************/
//Again a very similar function to the one above but is used when implimentation of an
//iframe is used in the document
//This function gets the top position of the layer name sent to it

function getTopFrame(layerName){
	
	if(isNav6){
		return eval('parent.main.'+layerRef+'("'+layerName+'")'+styleSwitch+'.top');
	}
	else if (isNav){
		return eval('document.main.'+layerRef+'["'+layerName+'"]'+styleSwitch+'.top');
	}
	else{
		return eval('parent.main.'+layerRef+'["'+layerName+'"]'+styleSwitch+'.top');
	}
}

/**************************** moveLayerToInternal(layerName, top, left) *************************************/
//This function is very similar to the one above except that it is used when an iframe
//has the animated layer inside.
//This function 'moves' a layer to different screen co-ordinates. The layer name
//as well as the co-ordinates are passed to it.

function moveLayerInFrame(layerName, top, left)
{
	if(isNav6){
		eval('parent.main.'+layerRef+'("'+layerName+'")'+styleSwitch+'.top=top');
		eval('parent.main.'+layerRef+'("'+layerName+'")'+styleSwitch+'.left=left');}
	
	else if (isNav){
		eval('document.main.'+layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');
		eval('document.main.'+layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');
	}
	else{
		eval('parent.main.'+layerRef+'["'+layerName+'"]'+styleSwitch+'.top=top');
		eval('parent.main.'+layerRef+'["'+layerName+'"]'+styleSwitch+'.left=left');
	}
}

/*********************************** scrollFrame(where) ********************************/
//This function is the main scrolling function. It has passed to it the direction in which
//to scroll the layer.

function scrollFrame(where){

	if (where == 'up'){
		scrollUp = true;
		animateUpFrame();
	}
	else if (where == 'down'){
		scrollDown = true;
		animateDownFrame();
	}
}
/*********************************** animateUpFrame() **********************************/
//This function scrolls the layer upwards on the page by simply incrementing the 
//top coordinate variable

function animateUpFrame(){

	var frameTop = parseInt(getTopFrame('copy'))

	if ((scrollUp == true) && (frameTop > stopPos)){
		frameTop = frameTop - speed;
		moveLayerInFrame('copy', frameTop, leftPos);
		setTimeout("animateUpFrame()",1)
	}
}
/*********************************** animateDownFrame() ********************************/
//This function scrolls the layer downwards on the page by simply decrementing the 
//top coordinate variable

function animateDownFrame(){
	
	var top = parseInt(getTopFrame('copy'))

	if ((scrollDown == true) && (top < startPos)){
		top = top + speed;
		moveLayerInFrame('copy', top, leftPos);
		setTimeout("animateDownFrame()",1)
	}
}

/*********************************** clipLayer(width, height) ********************************/
//This function is to clip the size of the level of dispaly for the layer Netscape only

function clipLayer(width, height){
	
	if (isNav){
		document.main.clip.width = width;
		document.main.clip.height = height;
	}
}
