function load_content () {

			if (parent.document.getElementById('main_div')) {

				parent.document.getElementById('main_div').innerHTML=document.getElementById('inner_frame').innerHTML;

			}

			if (!parent.document.getElementById('main_div')) {

			window.location=('default.aspx') ;

			}

		}
// ===========================
// Error Handling
// ===========================
function handleError() {
	return true;
}
window.onerror = handleError;

// =============================================================
// Creates a MediaPlayer object with methods to control playback
// expects ID of Container to put the objects in
// =============================================================
var WinMediaPlayer = function(containerID) {	
	var mediaControlContainer = document.getElementById(containerID);
	this.version = "0";
	this.wmp64ID = "MediaPlayer.MediaPlayer.1";
	this.wmp7ID = "WMPlayer.OCX.7";

	// =======================================================
	// Generates the object for MediaPlayers higher than 6.4 
	// and puts it in the mediaControlContainer
	// called on versionDetection
	// =======================================================
	this.wmp7to9 = function (){
		//document.write('<div id="LayerWMP7to9" style="position:absolute; left:10px; top:0px; width:160px; height:120px; z-index:2; visibility: hidden;"><OBJECT CLASSID="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer7to9" width=160 height=120><param name="uimode" value="none"><param name="autostart" value="true"><param name="enablecontextmenu" value="false"><param name="stretchtofit" value="true"><param name="shrinktofit" value="true"><param name="clicktoplay" value="false"></OBJECT></div>');
		mediaControlContainer.innerHTML = '<div id="LayerWMP7to9" style="position:absolute; left:-200px; top:-200px; width:150px; height:115px; z-index:2;"><OBJECT CLASSID="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="WindowsMediaPlayer7to9" width=150 height=115><param name="uimode" value="none"><param name="autostart" value="true"><param name="enablecontextmenu" value="false"><param name="stretchtofit" value="true"><param name="shrinktofit" value="true"><param name="clicktoplay" value="false"></OBJECT></div>';
	}	
	
	// =======================================================
	// Generates the object for MediaPlayers 6.4 
	// and puts it in the mediaControlContainer
	// called on versionDetection
	// =======================================================
	this.wmp64 = function (){		
		//document.write('<div id="LayerWMP64" style="position:absolute; left:10px; top:0px; width:160px; height:120px; z-index:2; visibility: hidden;"><OBJECT CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" name="mediaplayer" width=160 height=120 id="WindowsMediaPlayer64"><param name="autostart" value="true"><param name="enablecontextmenu" value="false"><param name="clicktoplay" value="false"><param name="showcontrols" value="false"><param name="animationatstart" value="false"><param name="transparentatstart" value="true"><param name="senderrorevents" value="true"><param name="displaysize" value="4"></OBJECT></div>');						
		mediaControlContainer.innerHTML += '<div id="LayerWMP64" style="position:absolute; left:-200px; top:-200px; width:150px; height:115px; z-index:2; visibility: hidden;"><OBJECT CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" name="mediaplayer" width=150 height=115 id="WindowsMediaPlayer64"><param name="autostart" value="true"><param name="enablecontextmenu" value="false"><param name="clicktoplay" value="false"><param name="showcontrols" value="false"><param name="animationatstart" value="false"><param name="transparentatstart" value="true"><param name="senderrorevents" value="true"><param name="displaysize" value="4"></OBJECT></div>';
	}
	
	// ===================================================
	// Detect ActiveX Architecture on Both IE and on Gecko
	// and generates appropriate MediaPlayer object
	// returns versionInfo
	// ===================================================
	this.versionDetection = function () {
		var wmpInfo = {
			installed: false,
			scriptable: false,
			type: null,
			versionInfo: null
		};
		
		var platform = navigator.platform;
		platform = platform.toLowerCase();
		
		if((window.ActiveXObject && navigator.userAgent.indexOf('Windows') != -1) || window.GeckoActiveXObject)
		{
			var player = createActiveXObject(this.wmp7ID);
			if(player)
			{
				wmpInfo.installed = true;
				wmpInfo.scriptable = true;
				wmpInfo.versionInfo = player.versionInfo;
				this.wmp7to9();
			}
			else
			{
				player = createActiveXObject(this.wmp64ID);
				if(player)
				{
					wmpInfo.installed = true;
					wmpInfo.scriptable = true;
					wmpInfo.versionInfo = "6.4";
					this.wmp64();
				}
			}
		}
		else if((window.ActiveXObject && platform.indexOf('mac') != -1) || window.GeckoActiveXObject)
		{
			var player = createActiveXObject(this.wmp7ID);
			if(player)
			{					
				wmpInfo.installed = true;
				wmpInfo.versionInfo = "7.1";
				this.wmp7to9();
			}
		}
		return wmpInfo.versionInfo;
	}
	
	this.version = this.versionDetection();	
	
	// ================================================
	// Media Control Methods 
	// ================================================
	/*---- SHOW -----*/
	this.show = function () {
		var o;
		if (this.version == "0" || this.version == null) {
			return;
		} else if (this.version == "6.4") {			
			o = document.getElementById("LayerWMP64");			
			
		} else {
			o = document.getElementById("LayerWMP7to9");
		}
		o.style.visibility = "visible";
		o.style.top = 6;
		o.style.left = 21;
	}
	
	/*---- HIDE -----*/
	this.hide = function () {
		var o;
		if (this.version == "0" || this.version == null) {
			return;
		} else if (this.version == "6.4") {			
			o = document.getElementById("LayerWMP64");			
			
		} else {
			o = document.getElementById("LayerWMP7to9");
		}
		o.style.visibility = "hidden";
		o.style.top = -200;
		o.style.left = -200;
	}
	
	/*---- SET URL -----*/
	this.setUrl = function(url) {
		if (this.version == "0" || this.version == null) {			
			document.location.href = url;
			return true;
		} else if (this.version == "6.4") {			
			document.getElementById("WindowsMediaPlayer64").ShowControls = 'false';
			document.getElementById("WindowsMediaPlayer64").FileName = url;
			document.getElementById("WindowsMediaPlayer64").Open(url);
		} else {
			document.getElementById("WindowsMediaPlayer7to9").URL = url;
		}
	}
	
	/*---- PLAY -----*/
	this.play = function() {
		if (this.version == "0" || this.version == null) {
			return;
		} else if (this.version == "6.4") {					
			document.getElementById("WindowsMediaPlayer64").play();
		} else {
			document.getElementById("WindowsMediaPlayer7to9").controls.play();
		}
	}
	
	/*---- PAUSE -----*/
	this.pause = function() {
		if (this.version == "0" || this.version == null) {
			return;
		} else if (this.version == "6.4") {			
			document.getElementById("WindowsMediaPlayer64").pause();
		} else {
			document.getElementById("WindowsMediaPlayer7to9").controls.pause();
		}
	}
	
	/*---- STOP -----*/
	this.stop = function() {
		if (this.version == "0" || this.version == null) {
			return;
		} else if (this.version == "6.4") {
			document.getElementById("LayerWMP64").style.visibility = "hidden";
			document.getElementById("WindowsMediaPlayer64").stop();
			document.getElementById("WindowsMediaPlayer64").CurrentPosition = 0
		} else {
			mp.setUrl('');
			document.getElementById("LayerWMP7to9").style.visibility = "hidden";
			document.getElementById("WindowsMediaPlayer7to9").controls.stop();			
		}
	}	
	
	/*---- SET VOLUME -----*/
	this.setVolume = function(value){		
		if (this.version == "0" || this.version == null) {
			return;
		} else if (this.version == "6.4") {
			document.getElementById("WindowsMediaPlayer64").volume = -100 * (100 - value);
		} else {
			document.getElementById("WindowsMediaPlayer7to9").settings.volume = value;
		}
	}
	
	/*---- GET VOLUME -----*/
	this.getVolume = function() {
		if (this.version == "0" || this.version == null) {
			return -1;
		} else if (this.version == "6.4") {
			return document.getElementById("WindowsMediaPlayer64").volume;
		} else {
			return document.getElementById("WindowsMediaPlayer7to9").settings.volume;
		}
	}
}



function FlashVersion()
{
  if(navigator.plugins && navigator.plugins.length)		// Navigator-based browsers
  {
    for (var i=0;i<navigator.plugins.length;i++)
    {
      if (navigator.plugins[i].name.indexOf('Shockwave Flash') != -1)
	  {
	    var d, darr, majarr, maj, minarr, min;
	    d = navigator.plugins[i].description;
        darr = d.split(" ");

        majarr = darr[2].split(".");
        maj = majarr[0];
		if ( darr[3] != "" ) {
			minarr = darr[3].split("r");
		} else {
			minarr = darr[4].split("r");
		}
        min = minarr[1] > 0 ? minarr[1] : 0;
        return parseFloat(maj + "." + min);
	  }
    }
  }
  else if (window.ActiveXObject)		// IE
  {
    for (var i=15;i>=2;i--)
	{
	  try
	  {
	    var f = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
		if (f)
		{
			var v = f.GetVariable("$version");
			var varr = v.split(" ");
			var majmin = varr[1].split(",");
			return parseFloat(majmin[0]+"."+majmin[2]);
		}
	  }
	  catch(e)
	  {}
	}
  }
  else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1)
    return 4;	// WebTV 2.6 supports Flash 4
  else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1)
    return 3;	// WebTV 2.5 supports Flash 3
  else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1)
    return 2;	// older WebTV supports Flash 2

  return -1.0;	// can't detect
}



	function Flash(movie, id, width, height, ver, bg, fv)
	{
		this.movie = movie;
		this.id = id;
		this.width = width;
		this.height = height;
		this.ver = ver ? ver : "8,0,0,0";

		this.align ="middle";

		this.attributes = new Array();
		this.params = new Object();

		if(bg)
			this.setParam("bgcolor", bg);
		if(fv)
			this.setParam("FlashVars", fv);

		this.setParam("allowScriptAccess", "sameDomain");
		this.setParam("quality", "high");
	}

	Flash.prototype.addAttribute = function(n, v)
	{
		if(v)
			this.attributes[this.attributes.length] = n + '="' + v + '"';
		else
			this.attributes[this.attributes.length] = n;
	}

	Flash.prototype.setParam = function(n, v)
	{
		this.params[n] = v;
	}

	Flash.prototype.render = function()
	{
		if(this.ver.length < 2)
			this.ver += ",0,0,0";

		var s = '<object id="' + this.id + '" width="' + this.width + '" height="' + this.height + '" align="' + this.align + '" ';
		s += 'classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + this.ver + '" ';
		for(var i=0; i<this.attributes.length; i++)
			s += this.attributes[i] + " ";
		s += '>';

		s += '<param name="movie" value="' + this.movie + '" />';
		s += '<param name="WMode" value="' + "Transparent" + '" />';
		for(var k in this.params)
			s += '<param name="' + k + '" value="' + this.params[k] + '" />';

		s += '<embed src="' + this.movie + '" ';
		s += 'width="' + this.width + '" height="' + this.height + '" name="' + this.id + '" align="' + this.align + '" ';
		for(var k in this.params)
			s += k + '="' + this.params[k] + '" ';

		s += 'swLiveConnect="true" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />';

		s += '</object>';
		document.write(s);
	}
