function styleToInt(value)
{
	value = value.substring(0, value.indexOf('px'));
	return parseInt(value,10);
}

function resize_layers()
{		
		var ih = parent.document.body.clientHeight;
    		var iw = parent.document.body.clientWidth;

		if (!ih)
			ih = self.innerHeight;
			ih = (ih - 400)/2 + 87;

		if (!iw)
			iw = self.innerWidth;
			iw = (iw - 778)/2 + 168;

		if (iw < 169) {
			iw=168;
			ih+=8;
		}

		if (ih < 89) {
			ih=89;
		}

		document.getElementById("ContentPane").style.clip = 'rect(0px 603px 285px 0px)';		
		document.getElementById("ContentPane").style.top = ih +'px';
		document.getElementById("ContentPane").style.left = iw +'px';																		
		document.getElementById("ContentPane").style.visibility = 'visible';	
}

function sbScrollBy(value)
{	
	var ypos = this.oldypos + value;
	if (ypos > 0)
		ypos = 0;
	if (this.visibleHeight - this.contentHeight > ypos)
		ypos = this.visibleHeight - this.contentHeight;
	this.scrollContent.style.top = ypos;
	this.oldypos = ypos;		
	this.setScrollBox();
	if (this.scrolling)
		setTimeout("sbScrollBars[" + this.id + "].scrollBy(" + value + ")", 25);
}

function haalScrollTop(element)
{
	var y = 0;
	do
	{
		y += element.offsetTop;
		element = element.offsetParent;
	} while ( element.offsetParent != null );
	
	return y;
}

function jumpto(anchorname)
{
	var ypos; 
	var i;
	var doc = document;

	// simple browser check ->  ms-ie 
    var agt=navigator.userAgent.toLowerCase();
    var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

	for ( i = 0; i < doc.anchors.length; i ++ )
	{
		if ( doc.anchors[i].name == anchorname || doc.anchors[i].id == anchorname)
		{
			ypos = haalScrollTop(doc.anchors[i]) - haalScrollTop(doc.getElementById('contentClip'));
			if (!is_ie) ypos = ypos - 10; // 1 line up in mozilla and ns
			doc.getElementById('contentClip').scrollTop = ypos;
		}
	}
}