// JavaScript Document
function getFlashVersion() {
	var flashversion = 0;
	if (navigator.plugins && navigator.mimeTypes.length) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i)
		{
		if (isNaN(parseInt(words[i])))
		continue;
		var flashversion = words[i]; 
		}
	} else {
		result = false;
		for(var i = 11; i >= 0 && result != true; i--){
			var res = execScript('on error resume next: result = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'"))','VBScript');
			flashversion = i;
		}
	}
	return flashversion;
}


function detectFlash(ver, req) {
	return (ver >= req) ? true:false; 
}

function openWin(path) {
/*
	if (screen.width <= 800) {
		windowWidth = 796
		windowHeight = 551
	} else {
		windowWidth = 1000
		windowHeight = 641
	}
*/
	windowWidth=750;
	windowHeight=550;
	//windowName = (Math.round((Math.random()*99999)+1));
	xposition=0; 
	yposition=0;
	//isOpen = false;
	//redirectPage = pageToLoad;
	/*
	if (parseInt(navigator.appVersion) >= 4){
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	
	*/
	args = "width=" + windowWidth + "," + "height=" + windowHeight + "," + "location=0," + "menubar=0," + "resizable=1," + "scrollbars=0," + "status=0," + "titlebar=0," + "toolbar=0," + "hotkeys=0," + "screenx=" + xposition + "," + "screeny=" + yposition + "," + "left=" + xposition + "," + "top=" + yposition;           
	window.open(path, 'Occulogix', args);
	
}

function setDisplay(id, val){
	try{

		document.getElementById(id).style.display = val;
	}
	catch(er){
	}
}

