function show_hide(what,show)
	{
	if(show=='on')			{type='visible';}
	else if(show=='off')	{type='hidden';}
	document.getElementById(what).style.visibility = type;
	}



function verifyCompatibleBrowser(){
    this.ver=navigator.appVersion
    this.dom=document.getElementById?1:0
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
    this.ie4=(document.all && !this.dom)?1:0;
    this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
    return this
}
bw=new verifyCompatibleBrowser()

var speed=30
var loop, timer

if(top.frames.length > 0)
	{
	if(parent.hidden.document.positions.hori_x.value && parent.hidden.document.positions.onoff.value=='on')	
		{var hori_x=parent.hidden.document.positions.hori_x.value;}
	else	{var hori_x=0;}
	
	if(parent.hidden.document.positions.verti_y.value && parent.hidden.document.positions.onoff.value=='on')	
			{var verti_y=parent.hidden.document.positions.verti_y.value;}
	else	{var verti_y=0;}
	parent.hidden.document.positions.onoff.value='';
	}
else
	{
	var hori_x=0;
	var verti_y=0;
	}


function ConstructObject_hori(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
    this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth
    this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth
    this.left=MoveArea_hori_left;this.right=MoveArea_hori_right;
    this.MoveArea_hori=MoveArea_hori; this.x; this.y;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
    
}

function ConstructObject_verti(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
    this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
    this.up=MoveArea_verti_up;this.down=MoveArea_verti_down;
    this.MoveArea_verti=MoveArea_verti; this.x; this.y;
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}





function MoveArea_hori(x,y){
    this.x=x;this.y=y
    this.css.left=this.x
    this.css.top=this.y   
}

function MoveArea_verti(x,y){
    this.x=x;this.y=y
    this.css.left=this.x
    this.css.top=this.y
}




function MoveArea_hori_left(move){
	if(this.x-move<0){
    this.MoveArea_hori(this.x-move,0)
    if(loop && this.x-move<0) setTimeout(this.obj+".left("+move+")",speed)
	}
}

function MoveArea_verti_up(move){
	if(this.y-move<0){
    this.MoveArea_verti(0,this.y-move)
    if(loop && this.y-move<0) setTimeout(this.obj+".up("+move+")",speed)
	}
}







function MoveArea_hori_right(move){
	if(this.x-move>-this.scrollWidth+objContainer_hori.clipWidth){
    this.MoveArea_hori(this.x-move,0)
    if(loop && this.x-move>-this.scrollWidth+objContainer_hori.clipWidth) setTimeout(this.obj+".right("+move+")",speed)
	}

}

function MoveArea_verti_down(move){
	if(this.y-move>-this.scrollHeight+objContainer_verti.clipHeight){
    this.MoveArea_verti(0,this.y-move)
    if(loop && this.y+move>-this.scrollHeight+objContainer_verti.clipHeight) setTimeout(this.obj+".down("+move+")",speed)
	}
}




function PerformScroll_hori(speed){
	if(initialised){
		loop=true;
		if(speed>0) objScroller_hori.right(speed)
		else objScroller_hori.left(speed)
	}
}

function PerformStep_hori(speed){
	if(initialised){
		loop=false;
		if(speed>0) objScroller_hori.right(speed)
		else objScroller_hori.left(speed)
		loop=true;
	}
}



function PerformScroll_verti(speed){
	if(initialised){
		loop=true;
		if(speed>0) objScroller_verti.down(speed)
		else objScroller_verti.up(speed)
	}
}


function PerformStep_verti(speed){
	if(initialised){
		loop=false;
		if(speed>0) objScroller_verti.down(speed)
		else objScroller_verti.up(speed)
		loop=true;
	}
}


function GetPosition(what)
	{
	if(top.frames.length > 0)
		{
		parent.hidden.document.positions.onoff.value='';
		if(what=='hori_x')			{parent.hidden.document.positions.hori_x.value=objScroller_hori.x;}
		else if(what=='verti_y')	{parent.hidden.document.positions.verti_y.value=objScroller_verti.y;}
		}
	}

function SetPosition(onoff,loc)
	{
	if(top.frames.length > 0)
		{
		parent.hidden.document.positions.onoff.value=onoff;
		location.href=loc;
		}
	}

function CeaseScroll(){
    loop=false
    if(timer) clearTimeout(timer)
}


var initialised;

function InitialiseScrollableArea_hori(hori_x){
    objContainer_hori=new ConstructObject_hori('divContainer_hori')
    objScroller_hori=new ConstructObject_hori('divContent_hori','divContainer_hori')
    objScroller_hori.MoveArea_hori(hori_x,0)
    objContainer_hori.css.visibility='visible'
    initialised=true;
}

function InitialiseScrollableArea_verti(verti_y){
    objContainer_verti=new ConstructObject_verti('divContainer_verti')
    objScroller_verti=new ConstructObject_verti('divContent_verti','divContainer_verti')
    objScroller_verti.MoveArea_verti(0,verti_y)
    objContainer_verti.css.visibility='visible'
    initialised=true;
}

function nop()
{
}
