// Sliding layers - DO NOT EDIT
// All rights reserved Iconography Ltd. So no bugger pinch it.

function Menu(id,r,x,y,z,w,h){this.initMenu(id,r,x,y,z,w,h);}

function Menu_initMenu(id,r,x,y,z,w,h)
	{
	this.id = id;
	this.layerID = id+"Layer";
	this.r = r;	
	this.x = x;
	this.y = y;
	this.w = w;
	this.h = h;

	this.visible = false;
	this.z = z;

	this.relY = y;
	this.dy = 0;
	this.speed = 10; // higher slower
	}

function Menu_createTopDHTML(theDocument)
	{
	
	vNS = (document.layers)?true:false;  // Ok , so is it Netscape or IE.(netscape 6.2 thinks it is IE!)
	browser_type = navigator.appName;
	
	
	layerConstruct = "";

	// create layer

	if (vNS) { 
		sWidth = outerWidth;
	} else { 
		if (browser_type=="Netscape") { // just incase netscape is pretending to be IE
			sWidth = outerWidth;			
		} else {
			sWidth = document.body.clientWidth;
		}
	} 
	
	if (this.r == "C") 
		{posX = ((sWidth/2)+this.x)}
		else
		{posX = this.x}

	layerConstruct = "";
 	if (vNS) {	layerConstruct += "<layer "; } else { layerConstruct += "<div ";}
	layerConstruct += 'id="'+this.layerID+'" ';
	if (vNS)
		{layerConstruct += 'left="'+(Math.round(posX)-15)+'" top="'+(this.y+5)+'" width="'+this.w+'" height="'+this.h+'" z-index="1" visibility="hide" >';		}
	else
		{layerConstruct += 'style="position:absolute; left:'+(posX)+'px; top:'+this.y+'px; width:'+this.w+'px; height:'+this.h+'px; visibility: hidden; z-index:1; border: 1px none #000000">';} //hidden or visable

	theDocument.write(layerConstruct);
	
	}

function Menu_moveIT()
	{
	theLayer = MM_findObj(this.layerID, document );

	if (vNS)
		{
                // this slides layer up and down. not need for lucy willis, but keep here for future use! -cdk may 2002
		//this.dy = Math.round(((self.pageYOffset+this.y)-this.relY)/this.speed);
			//if  ( this.dy  <  0.4 ) 
				//{
				this.relY = self.pageYOffset+this.y;
				//}
		}
	else
		{
		//this.dy = Math.round(((document.body.scrollTop+this.y)-this.relY)/this.speed);
			//if  ( Math.abs(this.dy)  <  0.4 ) 
				//{
				this.relY = document.body.scrollTop+this.y;
				//}
		}

	//this.relY += this.dy;	
	
	if (vNS) { sWidth = outerWidth;} else { sWidth = document.body.clientWidth;}

	if (this.r == "C") 
		{posX = ((sWidth/2)+this.x)}
		else
		{posX = this.x}

	if (vNS) 
		{
		sWidth = outerWidth;
		theLayer.left = Math.round(posX)-15;
		theLayer.top = this.relY+5;
		} 
	else
		{
		sWidth = document.body.clientWidth;
		theLayer.style.left = (posX)+"px";
		theLayer.style.top = this.relY;
		}
	}


function Menu_createBottomDHTML(theDocument)
	{
	layerConstruct = "";
	vNS = (document.layers)?true:false;  // Ok , so is it Netscape or IE.

	if (vNS) {	layerConstruct += "</layer> "; } else { layerConstruct += "</div> ";}
	
	theDocument.write(layerConstruct);	

	}

function Menu_show()
	{
	if (this.optionNumber == 0) { return; } // No menu to display for this child !	
	MM_showHideLayers(this.layerID,'','show');
	this.visible = true;
	}

function Menu_hide()
	{
	if (this.optionNumber == 0)  { return; } // No menu to display for this child !
	MM_showHideLayers(this.layerID,'','hide');
	this.visible = false;
	}

function Menu_toggleShow()
	{
	if (this.visible == true) 
	{this.hide();}
	else
	{this.show();}
	}
	

// **** functions by dreamweaver , not included as object method but must be availible.
function MM_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

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; }
}

Menu.prototype.initMenu = Menu_initMenu;
Menu.prototype.createTopDHTML = Menu_createTopDHTML;
Menu.prototype.createBottomDHTML = Menu_createBottomDHTML;
Menu.prototype.show = Menu_show;
Menu.prototype.hide = Menu_hide;
Menu.prototype.toggleShow = Menu_toggleShow;
Menu.prototype.moveIT = Menu_moveIT;