function refrescaycierra() {
window.opener.location.href = window.opener.location.href;
window.close();
}

function abrir_menu(url) {
	var modificadores = 'scrollbars=yes,status=yes,menubar=yes';
	modificadores = modificadores + ',left= 80, top= 80 ';
	modificadores = modificadores + ',width=800';
	modificadores = modificadores + ',height=500';
	modificadores = modificadores + ',fullscreen = 0';
    ww = window.open(url,'MenuAdmin',modificadores);
}

function abrir_ventana(url,ancho,alto) {
	var modificadores = 'scrollbars=yes,status=yes,menubar=yes';
	modificadores = modificadores + ',left= 80, top= 80 ';
	modificadores = modificadores + ',width=' + ancho;
	modificadores = modificadores + ',height=' + alto;
	modificadores = modificadores + ',fullscreen = 0';
    ww = window.open(url,'MenuAdmin',modificadores);
}

function embedFlash (id,width,height,align,src,bgcolor,flashvars,base){

  var objects                 = [];

  objects['id']               = id;
  objects['classid']          = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
  objects['codebase']         = 'http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0';
  objects['width']            = width;
  objects['height']           = height; 
  objects['align']            = align;

  var params                  = [];

  params['allowscriptaccess'] = 'samedomain';
  params['movie']             = src
  params['base']              = base
  params['quality']           = 'high'
  params['bgcolor']           = bgcolor;
  params['wmode']             = 'transparent';
  params['flashvars']         = flashvars;

  var embeds                  = [];

  embeds['name']              = objects['id'];
  embeds['src']               = params['movie'];
  embeds['flashvars']         = params['flashvars'];
  embeds['base']              = params['base'];
  embeds['quality']           = params['quality'];
  embeds['bgcolor']           = params['bgcolor'];
  embeds['allowscriptaccess'] = params['allowscriptaccess'];
  embeds['width']             = objects['width'];
  embeds['height']            = objects['height'];
  embeds['align']             = objects['align'];
  embeds['type']              = 'application/x-shockwave-flash';
  embeds['pluginspage']       = 'http://www.macromedia.com/go/getflashplayer';
  embeds['wmode']             = params['wmode'];

  var objectString;
  var paramString             = '';
  var embedString;

  // Build the object tag
  objectString = '<object ';

  for (var object in objects){
    objectString += object + '="' + objects[object] + '" ';
  }

  objectString += '>\n';
  
  // Build the params
  for (var param in params){
    paramString += '<param name="' + param + '" value="' + params[param] + '" />\n';
  }
 

  // Build the embed tag   
  embedString = '<embed ';
  
  for (var embed in embeds){
    embedString += embed + '="' + embeds[embed] + '" ';
  }

  embedString += '/>\n';

  // Print the object
  document.write(objectString);
  document.write(paramString);
  document.write(embedString);
  // Close the object
  document.write('</object>\n');
}


// Original code (youngpup’s Sleight): http://youngpup.net/2001/sleight
// Updated by Drew McLellan at http://www.allinthehead.com/retro/69
// namespace and onload event added by zigotica.com
var OPACITIES = {
	addLoadEvent : function (fn) {
		var old = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = fn;
		} else {
			window.onload = function() {
				old();
				fn();
			}
		}
	},

	alphaBackgrounds : function() {
		var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
		var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);
		if (itsAllGood) {
			for (i=0; i<document.all.length; i++) {
				var bg = document.all[i].currentStyle.backgroundImage;
				if (bg.match(/\.png/i) != null) {
					var mypng = bg.substring(5,bg.length-2);
					var repetido = document.all[i].currentStyle.backgroundRepeat;
					if (repetido == 'no-repeat')
						document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='crop')";
					else
						document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='scale')";
					document.all[i].style.backgroundImage = "url('')"; //doesn't exist?*/
				}
			}
		}
	}
	
}

if (document.getElementById && document.getElementsByTagName && navigator.appVersion.indexOf("MSIE") > -1 && !window.opera) {
	OPACITIES.addLoadEvent(function(){OPACITIES.alphaBackgrounds();})
}
