var childWindowForSemco;

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function IsChildWindow() {
  if (opener == null || self.name != "childWindowForSemco") {
    document.location.href = "/techref/categories.xml";
	return false;
  }
  else return true;
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function NewWindow(url, width, height) {
  if (self.name == "childWindowForSemco") self.resizeTo(width, height);
  if (childWindowForSemco != null && childWindowForSemco.open) childWindowForSemco.close();
  wLeft = screen.width / 2 - width / 2;
  wTop = screen.height / 2 - height / 2;
  childWindowForSemco = window.open(url, 'childWindowForSemco', 'location=0,toolbar=0,menubar=0,resizable=0,status=0,scrollbars=0,width=' + width + ',height=' + height + ',left=' + wLeft + ',top=' + wTop);
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
function NewScrollWindow(url, width, height) {
  if (childWindowForSemco != null && childWindowForSemco.open) childWindowForSemco.close();
  wLeft = screen.width / 2 - width / 2;
  wTop = screen.height / 2 - height / 2;
  childWindowForSemco = window.open(url, 'childWindowForSemco', 'location=0,toolbar=0,menubar=0,resizable=0,status=0,scrollbars=1,width=' + width + ',height=' + height + ',left=' + wLeft + ',top=' + wTop);
}


var FLASH_MINVERSION = 6;
var flash_versions = 20;
var flash = new Object();
flash.installed=false;
flash.version='0.0';

if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
			flash.installed = true;
			break;
		}
	}
}
else if (window.ActiveXObject) {
	for (x = 2; x <= flash_versions; x++) {
		try {
			oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
			if(oFlash) {
				flash.installed = true;
				flash.version = x + '.0';
			}
		}
		catch(e) {}
	}
}

var MM_FLASHCANPLAY = flash.installed && parseInt(flash.version) >= FLASH_MINVERSION;
