<!--
// -------------------------------------------------------
//	Javascript Engine SourceFile For MutliPlatform Support
//	Copyright (2002) Psytech Ltd
// ------------------------------------------------------

// ------------------------------------------------------
// Browser Detection Routine
// ------------------------------------------------------

	function IsNS4()
	{
		if (document.layers)
			return true;
		else
			return false;
	}
	function IsIE4()
	{
		if (document.all && !document.getElementById)
			return true;
		else
			return false;
		
	}

// ------------------------------------------------------
// Keyboard Handling Functions
// ------------------------------------------------------
	
	function GetKeypressed(e)
	{
	
// Blur A Links
		if (document.getElementsByTagName){
			var Links = document.getElementsByTagName('a');
			for(i=0; i< Links.length; i++)
				Links [i].onfocus=new Function("if(this.blur)this.blur()");
		}
	
// Obtain KeyPress
		if (IsNS4())
			return e.which;
		else{
			if (window.event)
				return window.event.keyCode;
			else if (e.which)
				return e.which;
		}
		return 0;
	}
	
	function SetKeypressedFunc(Func)
	{
	    if(IsNS4()){
	        document.onkeydown = Func;
    	    document.captureEvents(Event.KEYDOWN);
	    }else
    	    document.onkeydown = Func;
	}
	
// ------------------------------------------------------
// Layer Handling Functions
// ------------------------------------------------------

	function GetLayer(LayerId)
	{
		var 				Obj = null;
		if 		(IsNS4())	Obj = document.layers[LayerId];
		else if (IsIE4())	Obj = document.all[LayerId];
		else				Obj = document.getElementById(LayerId);
		
		if (!Obj)
			 Obj = eval(LayerId);
		if  (Obj) return Obj;
				
		alert("INVALID LAYER : " + LayerId);
	}
	
	function GetLayerStyle(LayerId)
	{
		if (IsNS4())
			return GetLayer(LayerId);
			
		return GetLayer(LayerId).style;
	}
	
	function ShowLayer(LayerId)
	{
		if (IsNS4())
			GetLayerStyle(LayerId).visibility = 'show';
		else
			GetLayerStyle(LayerId).visibility = 'visible';
	}

	function HideLayer(LayerId)
	{
		if (IsNS4())
			GetLayerStyle(LayerId).visibility = 'hide';
		else
			GetLayerStyle(LayerId).visibility = 'hidden';
	}
	
	function IsLayerVisible(LayerId)
	{
		if (IsNS4())
			return (GetLayerStyle(LayerId).visibility == 'show')?true:false;
			
		return (GetLayerStyle(LayerId).visibility == 'visible')?true:false;
	}

	function IsLayerHidden(LayerId)
	{
		if (IsNS4())
			return (GetLayerStyle(LayerId).visibility == 'hide')?true:false;
			
		return (GetLayerStyle(LayerId).visibility == 'hidden')?true:false;
	}
	
	function SetLayerHtml(LayerId,Content)
	{	
		var Obj = GetLayer(LayerId);
		if (Obj){
			if (IsNS4()){
				Obj.document.open();
		     	Obj.document.write(Content);
		     	Obj.document.close();
			}else
				Obj.innerHTML = Content;
		}
	}
	
	function SetLayerPixLeft(LayerId,Value)
	{
		GetLayerStyle(LayerId).left = Value;
	}
		
	function SetLayerPixTop(LayerId,Value)
	{
		GetLayerStyle(LayerId).top = Value;
	}		
	
//--> 