	agt = navigator.userAgent.toLowerCase();
	app = navigator.appName.toLowerCase();

	///// OS
	osCode = "";
	osVersion = "";
	osName = "";

  if ( agt.indexOf( "win") != -1) {
	  osCode = "win";
		osName = "Windows";
  	if ( agt.indexOf( "nt 5.1") != -1) {
  	  osVersion = "XP";
  	} else if ( agt.indexOf( "nt 5.0") != -1) {
  	  osVersion = "2000";
  	} else if ( ( agt.indexOf( "nt 4.0") != -1)
						 || ( agt.indexOf( "nt;") != -1)
						 || ( agt.indexOf( "winnt4") != -1)
						 || ( agt.indexOf( "windows nt") != -1)) {
  	  osVersion = "NT";
  	} else if ( agt.indexOf( "98") != -1) {
  	  osVersion = "98";
  	} else if ( agt.indexOf( "windows 95") != -1) {
  	  osVersion = "95";
  	}
	} else if ( agt.indexOf( "mac") != -1) {
	  osCode = "mac";
		osName = "MacOS";
		if ( agt.indexOf( "mac os x") != -1) {
		  osVersion = "X";
		}
	} else if ( agt.indexOf( "linux") != -1) {
	  osCode = "linux";
		osName = "Linux";
	} else {
	  osCode = "win";
		osName = "Windows";
	}

	///// NAV
	navCode = "";
	navVersion = "";
	navName = "";

	if ( agt.indexOf( "msie") != -1) {
		navCode = "ie";
		navName = "Internet Explorer";
		navVersion = agt.substr( agt.indexOf( "msie") + 5, 1);
	} else if ( agt.indexOf( "safari") != -1) {
		navCode = "safari";
		navName = "Safari";
 	  navVersion = "1";
	} else if ( agt.indexOf( "netscape") != -1
				 || ( app.indexOf( "netscape") != -1 && app.indexOf( "safari") == -1)) {
		navCode = "ns";
		navName = "Netscape";
  	if ( agt.indexOf( "netscape/7") != -1) {
  	  navVersion = "7";
  	} else if ( agt.indexOf( "netscape6/6") != -1) {
  	  navVersion = "6";
  	} else if ( agt.indexOf( "mozilla/4") != -1) {
  	  navVersion = "4";
  	} else {
  		navCode = "mozilla";
  		navName = "Mozilla";
   	  navVersion = agt.substr( agt.indexOf( "rv:") + 3, 3);
		}
	} else if ( agt.indexOf( "firebird") != -1) {
		navCode = "firebird";
		navName = "Mozilla Firebird";
 	  navVersion = agt.substr( agt.indexOf( "firebird/") + 9, 3);
	} else if ( agt.indexOf( "firefox") != -1) {
		navCode = "firefox";
		navName = "Mozilla Firefox";
 	  navVersion = agt.substr( agt.indexOf( "firefox/") + 8, 3);
	} else if ( agt.indexOf( "konqueror") != -1) {
		navCode = "konqueror";
		navName = "Konqueror";
	}

	///// WINDOW
  bodyWidth = screen.availWidth;
  bodyHeight = screen.availHeight;
  screenWidth = screen.width;
  screenHeight = screen.height;

	function windowOpen( title, url, x, y, width, height, location, menubar, toolbar, scrollbars, status, resizable, fullscreen) {
		var tmpWindow = window.open( url, title, "left=" + x + ",top=" + y + ",width=" + width + ",height=" + height + ",location=" + location + ",menubar=" + menubar + ",toolbar=" + toolbar + ",scrollbars=" + scrollbars + ",status=" + status + ",resizable=" + resizable + ",fullscreen=" + fullscreen);
    tmpWindow.focus();
		return( tmpWindow);
	}

	function popupOpen( title, url, width, height, scrollbars) {
		var tmpWindow = windowOpen( title, url, ( screenWidth - width) / 2 - 5, ( screenHeight - height) / 2 - 20, width, height, 'no', 'no', 'no', scrollbars, 'no', 'no', 'no');
	}

	function popupOpenFullScreen( title, url, fullscreen) {
		var tmpWidth = bodyWidth;
		var tmpHeight = bodyHeight;
    if ( navCode == "ns" && osCode == "mac") {
      tmpWidth -= 10;
      tmpHeight -= 25;
		}
	  var tmpWindow = windowOpen( title, url, 0, 0, tmpWidth, tmpHeight, 'no', 'no', 'no', 'no', 'no', 'no', fullscreen);
		tmpWindow.resizeTo( tmpWidth, tmpHeight);
	}
	popupOpenFullScreen = popupOpenFullScreen;

	function popupCheck( NoFunctionName, YesFunctionName) {
			tmpTimeoutId = setTimeout( 'if ( tmpPopupCheck == null) { eval( "' + NoFunctionName + '()"); } else { eval( "' + YesFunctionName + '()"); }', 1000);
		  tmpPopupCheck = window.open( "about:blank","tmpPopupCheck","width=100,height=100,left=0,top=5000");
			tmpPopupCheck.document.write( '<scr' + 'ipt type="text/javascript">window.close()</scr' + 'ipt>');
  }

	///// FLASH
	var flashVersionMin = 4;
	var flashVersionMax = 9;
	var flashVersion = -1;

	for ( var iFlashVersion = flashVersionMin; iFlashVersion <= flashVersionMax; iFlashVersion ++) {
	  eval( "aFlash" + iFlashVersion + " = false");
	}

	if( navCode == "ie" && osCode != "mac") {
  	document.write('<scr' + 'ipt language=VBScript\> \n');
  	document.write('on error resume next \n');
		for ( var iFlashVersion = flashVersionMin; iFlashVersion <= flashVersionMax; iFlashVersion ++) {
   	  document.write('aFlash' + iFlashVersion + ' = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + iFlashVersion + '"))) \n');
		}
   	document.write('</scr' + 'ipt\> \n');
  }

  var aFlash = null;
  for ( var iFlashVersion = flashVersionMin; iFlashVersion <= flashVersionMax; iFlashVersion ++) {
  	if ( navCode == "ie" && osCode != "mac") {
      if ( eval( 'aFlash' + iFlashVersion) == true) {
				flashVersion = iFlashVersion;
			}
    } else {
			if ( aFlash == null) {
			  aFlash = false;
  			for ( var iPlugin = 0; iPlugin < navigator.plugins.length; iPlugin ++) {
  			  var p = navigator.plugins[ iPlugin];
  			  if ( p.name == "Shockwave Flash") {
  				  aFlash = true;
  					break;
  				}
  			}
			}
			if ( aFlash == false) {
				break;
			}
			if( navigator.plugins["Shockwave Flash"].description.indexOf( "Flash " + iFlashVersion) != -1) {
				flashVersion = iFlashVersion;
		  }
    }
  }

  function includeFlash( id, version, width, height, align, movie, bgcolor, menu, loop, quality, scale, salign, flashvars, noembed, wmode) {
    document.write( '<object id="' + id + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version + '" width="' + width + '" height="' + height + '" align="' + align + '"><param name="wmode" value="' + wmode + '" /><param name="movie" value="' + movie + '" /><param name="bgcolor" value="' + bgcolor + '" /><param name="menu" value="' + menu + '" /><param name="loop" value="' + loop + '" /><param name="quality" value="' + quality + '" /><param name="scale" value="' + scale + '" /><param name="salign" value="' + salign + '" /><param name="flashvars" value="'+ flashvars + '" /><embed name="' + id + '" src="' + movie + '" wmode="' + wmode + '" width="' + width + '" height="' + height + '" swLiveConnect="true" salign="' + salign + '" align="' + align + '" flashvars="' + flashvars + '" scale="'+ scale + '" bgcolor="' + bgcolor + '" quality="' + quality + '" menu="' + menu + '" loop="'+ loop + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed><noembed>' + noembed + '</noembed></object>');
  }



