/** * Spry Effect ** */

function MM_effectGrowShrink(targetElement, duration, from, to, toggle, referHeight, growFromCenter) {
	Spry.Effect.DoGrow(targetElement, {
		duration : duration,
		from     : from,
		to       : to,
		toggle   : toggle,
		referHeight : referHeight,
		growCenter  : growFromCenter
	});
}
// onclick="MM_effectGrowShrink('left_nav', 200, '100%', '0%', true, false, false)"

function MM_effectAppearFade(targetElement) {
	Spry.Effect.DoFade(targetElement, {
		duration : 1000,
		from     : 60,
		to       : 100,
		toggle   : false
	});
}

function MM_effectBlind(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}

/*** Scrolling ***/

function movedown() {
	if (iens6 && parseInt(crossobj.style.top) >= (contentheight * (-1) + 200)) {
		crossobj.style.top = parseInt(crossobj.style.top) - speed + "px";
	} else if (ns4 && crossobj.top >= (contentheight * (-1) + 100)) {
		crossobj.top -= speed;
	}
	movedownvar = setTimeout("movedown()", 20)
}

function moveup() {
	if (iens6 && parseInt(crossobj.style.top) <= 0) {
		crossobj.style.top = parseInt(crossobj.style.top) + speed + "px";
	} else if (ns4 && crossobj.top <= 0) {
		crossobj.top += speed;
	}
	moveupvar = setTimeout("moveup()", 20)
}

function getcontent_height() {
	if (iens6) {
		contentheight = crossobj.offsetHeight - 200;
	} else if (ns4) {
		document.nssc_container.document.nssc_content.visibility = "show";
	}
}

/*** Navigate ***/

document.onkeydown = NavigateThrough;

function NavigateThrough (event)
{
	if (!document.getElementById) return;

	if (window.event) event = window.event;

	if (event.ctrlKey)
	{
		var link = null;
		var href = null;
		switch (event.keyCode ? event.keyCode : event.which ? event.which : null)
		{
			case 0x27:
				link = document.getElementById ('NextLink');
				break;
			case 0x25:
				link = document.getElementById ('PrevLink');
				break;
			case 0x24:
				href = '/';
				break;
		}

		if (link && link.href) document.location = link.href;
		if (href) document.location = href;
	}			
}

/*** blur ***/

function blurIt(tag) {
	arr = document.getElementsByTagName(tag);
	for (i = 0; i < arr.length; i++) {
		if (!arr[i].blur) return;
		arr[i].onfocus = function() {
			this.blur();
		}
	}
}

/*** hide ***/
function ag_findObj(n, d) { //v4.01
	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 = ag_findObj(n, d.layers[i].document);
	if (!x && d.getElementById)
		x = d.getElementById(n);
	return x;
}

function ag_hide(objName, vis) {
	// obj = document.getElementById(objName);
	obj = ag_findObj(objName);
	if (obj.style) {
		if (vis)
			obj.style.visibility = vis;
	}
}

function goUrl(url){
	document.location.href=url;
	//setTimeout('document.location.href="../'+url+'"',100 ); 
	return true;
}



