
var nereidFadeObjects = new Object();
var nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
	if (!document.all)
		return;
	if (object != "[object]") {  
			setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
			return;
	}
	clearTimeout(nereidFadeTimers[object.sourceIndex]);
	var diff = destOp-object.filters.alpha.opacity;
	var direction = 1;
	if (object.filters.alpha.opacity > destOp) {
			direction = -1;
	}
	var delta = Math.min(direction*diff,delta);
	object.filters.alpha.opacity+=direction*delta;
	if (object.filters.alpha.opacity != destOp) {
			nereidFadeObjects[object.sourceIndex]=object;
			nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function showPopup(url, x, y, width, height, features) {
	width = width && width != null ? width : 400;
	height = height && height != null ? height : 400;
	x = x && x != null ? x : (screen.availWidth - width) / 2;
	y = y && y != null ? y : (screen.availHeight - height) / 2;
	features = features && features != null ? features : "scrollbar=yes,resizable=no,menubar=no";
	var wnd = window.open(url, "_blank", "width="+width+",height="+height+",x="+x+",y="+y+","+features);
	wnd.focus();
}

function getFlashInfo() {
	var flashinstalled = 0;
	var flashversion = 0;
	var MSDetect = "false";
	
	if (navigator.plugins && navigator.plugins.length) {
		x = navigator.plugins["Shockwave Flash"];
		if (x) {
			flashinstalled = 2;
			if (x.description) {
				y = x.description;
				flashversion = y.charAt(y.indexOf('.')-1);
			}
		}
		else
			flashinstalled = 1;
		if (navigator.plugins["Shockwave Flash 2.0"]) {
			flashinstalled = 2;
			flashversion = 2;
		}
	}
	else if (navigator.mimeTypes && navigator.mimeTypes.length) {
		x = navigator.mimeTypes["application/x-shockwave-flash"];
		if (x && x.enabledPlugin)
			flashinstalled = 2;
		else
			flashinstalled = 1;
	}
	else
		MSDetect = "true";
	
	return {
		flash:flashinstalled,
		vesion:flashversion
	};
}