//Código cargar paginas
function nuevoAjax() { 
	var xmlhttp=false;
	try{
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e){
		try{
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(E){
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
		}
	}
	return xmlhttp; 
}

function persiana() {
	document.getElementById ('persiana').style.visibility = "hidden";
}

var id_activo = '';

function quitar_clase() {
	if(document.getElementById(id_activo)) {
		var desmarcar = id_activo.split('_');
		var nombre = desmarcar[0];
		for(i=1; i<=desmarcar.length-1; i++) {
			nombre += '_'+desmarcar[i];
			document.getElementById(nombre).setAttribute('class', 'inactivo');
			document.getElementById(nombre).setAttribute('className', 'inactivo');
		}
	}
}

function poner_clase(id) {
	quitar_clase();
	var marcar = id.split('_');
	var nombre = marcar[0];
	for(i=1; i<=marcar.length-1; i++) {
		nombre += '_'+marcar[i];
		document.getElementById(nombre).setAttribute('class', 'activo');
		document.getElementById(nombre).setAttribute('className', 'activo');
	}
	id_activo = id;
}

var id_activo_lateral = '';

function quitar_clase_lateral() {
	if(document.getElementById(id_activo_lateral)) {
		var desmarcar = id_activo_lateral.split('_');
		var nombre = desmarcar[0];
		for(i=1; i<=desmarcar.length-1; i++) {
			nombre += '_'+desmarcar[i];
			document.getElementById(nombre).setAttribute('class', 'opc_lateral');
			document.getElementById(nombre).setAttribute('className', 'opc_lateral');
		}
	}
}

function poner_clase_lateral(id) {
	quitar_clase_lateral();
	var marcar = id.split('_');
	var nombre = marcar[0];
	for(i=1; i<=marcar.length-1; i++) {
		nombre += '_'+marcar[i];
		document.getElementById(nombre).setAttribute('class', 'opc_lateral_activo');
		document.getElementById(nombre).setAttribute('className', 'opc_lateral_activo');
	}
	id_activo_lateral = id;
}

function cargar(archivo, forma, id) {
	var ajax=nuevoAjax();
	switch(forma) {
		case 1:
			ajax.open("POST", "panel/"+archivo, true);
		break;
		//indirecto
		case 2:
			ajax.open("POST", "panel/nocache.php?archivo="+archivo, true);
		break;
	}
	ajax.onreadystatechange=function() { 
		if (ajax.readyState==1){
			document.getElementById ('persiana').style.visibility = 'visible';
		}
		if (ajax.readyState==4){
			document.getElementById (id).innerHTML = ajax.responseText;
			setTimeout("persiana()",1000);
		} 
	}
	ajax.send(null);
}

/*c = 0;

function img_grande(imagen) {
	document.getElementById('img_grande').innerHTML = '<img id="img_show'+c+'" src="'+imagen+'" />';
	nombre = 'img_show'+c;
	valor = (document.getElementById(nombre).width/2)*-1;
	document.getElementById('img_grande').style.marginLeft = valor+'px';
	valor = (document.getElementById(nombre).height/2)*-1;
	document.getElementById('img_grande').style.marginTop = valor+'px';
	document.getElementById('lightbox').style.display = 'block';
	document.getElementById('img_grande').style.display = 'block';
	c++;
}

function img_grande_cierra() {
	document.getElementById('img_grande').innerHTML = '';
	document.getElementById('lightbox').style.display = 'none';
	document.getElementById('img_grande').style.display = 'hidden';
}*/

//Código lightbox
function ventana(archivo) {
	var referencia = document.getElementsByTagName('body')[0];
	var fondo = document.createElement('div');
	fondo.id = 'fondo';
	fondo.onclick = cerrar_ventana;
	fondo.setAttribute('class', 'negro');
	fondo.setAttribute('className', 'negro');
	referencia.appendChild(fondo);
	
	extension = archivo.substring(archivo.lastIndexOf('.')); 
	switch(extension) {
		case '.jpg':
		case '.png':
			abrir_ventana(archivo);
		break;
	}
}

function abrir_ventana(archivo) {
	var _this=this;
	var opacidad = 20;
	if(_this.intervalo)clearInterval(_this.intervalo);
	this.intervalo=setInterval(function() {
											if(opacidad >= 60) {
												clearInterval(_this.intervalo);
												espacio(archivo);
											}
											opacidad += 20;
											set_opacity(document.getElementById('fondo'), (opacidad/100));
										  },1);
}

function set_opacity(div, value) {
    div.style.opacity = value;
    div.style.MozOpacity = value;
    div.style.KhtmlOpacity = value;
    div.style.filter = 'alpha(opacity=' + value*100 + ')';
    div.style.zoom=1;//necesario para Explorer
}

function espacio(archivo) {
	var referencia = document.getElementsByTagName('body')[0];
	var contenedor = document.createElement('div');
	contenedor.id = 'espacio';
	contenedor.setAttribute('class', 'blanco');
	contenedor.setAttribute('className', 'blanco');
	var cargando = document.createElement('img');
	cargando.id = 'cargando';
	cargando.src = 'imagenes/cargando_.gif';
	var imagen = document.createElement('img');
	imagen.id = 'img';
	imagen.src = archivo;
	contenedor.appendChild(cargando);
	contenedor.appendChild(imagen);
	referencia.appendChild(contenedor);
	if(imagen.complete == true) {
		ajusta_espacio();
	} else {
		imagen.onload = ajusta_espacio_evento;
	}
}

ajusta_espacio_evento = function(evt) {
	elemento = document.getElementById('cargando');
	borrar = elemento.parentNode;
	borrar.removeChild(elemento);
	var _this=this;
	var ancho_total = document.getElementById('img').width;
	var alto_total = document.getElementById('img').height;
	if(ancho_total == alto_total) { ancho_total+5; alto_total+5; }
	var ancho = 100;
	var alto = 100;
	if(_this.intervalo)clearInterval(_this.intervalo);
	this.intervalo=setInterval(function() {
											ancho += 20;
											alto += 20;
											if(ancho >= ancho_total-20 && alto >= alto_total-20 ) {
												clearInterval(_this.intervalo);
												document.getElementById('espacio').style.width = ancho_total+'px';
												document.getElementById('espacio').style.height = alto_total+'px';
												muestra();
											} else {
												if(ancho <= ancho_total-20) {
													document.getElementById('espacio').style.width = ancho+'px';
													valor = (ancho/2)*-1;
												    document.getElementById('espacio').style.marginLeft = valor+'px';
												} else {
													document.getElementById('espacio').style.width = ancho_total+'px';
													valor = (ancho_total/2)*-1;
												    document.getElementById('espacio').style.marginLeft = valor+'px';
												}
												if(alto <= alto_total-20) {
													document.getElementById('espacio').style.height = alto+'px';
													valor = (alto/2)*-1;
													document.getElementById('espacio').style.marginTop = valor+'px';
												} else {
													document.getElementById('espacio').style.height = alto_total+'px';
													valor = (alto_total/2)*-1;
													document.getElementById('espacio').style.marginTop = valor+'px';
												}
											}
										  },1);
}

function ajusta_espacio() {
	elemento = document.getElementById('cargando');
	borrar = elemento.parentNode;
	borrar.removeChild(elemento);
	var _this=this;
	var ancho_total = document.getElementById('img').width;
	var alto_total = document.getElementById('img').height;
	if(ancho_total == alto_total) { ancho_total+5; alto_total+5; }
	var ancho = 100;
	var alto = 100;
	if(_this.intervalo)clearInterval(_this.intervalo);
	this.intervalo=setInterval(function() {
											ancho += 20;
											alto += 20;
											if(ancho >= ancho_total-20 && alto >= alto_total-20 ) {
												clearInterval(_this.intervalo);
												document.getElementById('espacio').style.width = ancho_total+'px';
												document.getElementById('espacio').style.height = alto_total+'px';
												muestra();
											} else {
												if(ancho <= ancho_total-20) {
													document.getElementById('espacio').style.width = ancho+'px';
													valor = (ancho/2)*-1;
												    document.getElementById('espacio').style.marginLeft = valor+'px';
												} else {
													document.getElementById('espacio').style.width = ancho_total+'px';
													valor = (ancho_total/2)*-1;
												    document.getElementById('espacio').style.marginLeft = valor+'px';
												}
												if(alto <= alto_total-20) {
													document.getElementById('espacio').style.height = alto+'px';
													valor = (alto/2)*-1;
													document.getElementById('espacio').style.marginTop = valor+'px';
												} else {
													document.getElementById('espacio').style.height = alto_total+'px';
													valor = (alto_total/2)*-1;
													document.getElementById('espacio').style.marginTop = valor+'px';
												}
											}
										  },1);
}

function muestra() {
	var _this=this;
	var opacidad = 20;
	if(_this.intervalo)clearInterval(_this.intervalo);
	this.intervalo=setInterval(function() {
											if(opacidad >= 100) {
												clearInterval(_this.intervalo);
											}
											opacidad += 20;
											set_opacity(document.getElementById('img'), (opacidad/100));
										  },1);
}

cerrar_ventana = function (evt) { 
	var _this=this;
	var opacidad = 80;
	if(_this.intervalo)clearInterval(_this.intervalo);
	this.intervalo=setInterval(function() {
											opacidad -= 20;
											if(opacidad <= 20) {
												clearInterval(_this.intervalo);
												var elemento = document.getElementById('fondo');
												var borrar = elemento.parentNode;
												borrar.removeChild(elemento);
												elemento = document.getElementById('img');
												borrar = elemento.parentNode;
												borrar.removeChild(elemento);
												elemento = document.getElementById('espacio');
												borrar = elemento.parentNode;
												borrar.removeChild(elemento);
											} else {
												set_opacity(document.getElementById('fondo'), (opacidad/100));
												set_opacity(document.getElementById('espacio'), (opacidad/100));
												set_opacity(document.getElementById('img'), (opacidad/100));
											}
										  },1);
}


//Código control de submenu principal
var tma = "";
var idintervalo = new Array();
var idintervalo2 = new Array();
var ejecucion = new Array();
var identificador = "";

function mostrar(id, h) {
	document.getElementById(id).style.visibility = "visible";
	var limite = parseInt(document.getElementById(id).style.height);
	if(isNaN(limite)){
		limite = 0;
	}
	limite += 10;
	altura = h*20;
	if(limite <= altura){
		document.getElementById(id).style.height = limite+"px";
	}else{
		var inter = id.split("ventana");
		var nombre = "lista"+inter[1];
		document.getElementById(nombre).style.display = "block";
		clearInterval(idintervalo[inter[1]]);
		idintervalo[inter[1]] = "";
		identificador =inter[1];
	}
}

function ocultar(id) {
	var inter = id.split("ventana");
	var nombre = "lista"+inter[1];
	document.getElementById(nombre).style.display = "none";
	/*var limite = parseInt(document.getElementById(id).style.height);
	if(isNaN(limite))
		limite = 0;
	limite -= 10;
	if(limite >= 0){
		document.getElementById(id).style.height = limite+"px";
	}else{*/
		var inter = id.split("ventana");
		clearInterval(idintervalo2[inter[1]]);
		idintervalo2[inter[1]] = "";
		document.getElementById(id).style.visibility = "hidden";
		document.getElementById(id).style.height = "0px";
	//}
}

function m(id, h) {
	o(identificador);
	clearInterval(ejecucion[id]);
	clearInterval(idintervalo2[id]);
	idintervalo2[id] = "";
	nombre = "ventana"+id;
	if(idintervalo[id] == "" || idintervalo[id] == undefined){
		idintervalo[id] = window.setInterval("mostrar('"+nombre+"', "+h+")",1);
	}	
}

function o(id) {
	if(id != '') {
		clearInterval(ejecucion[id]);
		clearInterval(idintervalo[id]);
		idintervalo[id] = "";
		nombre = "ventana"+id;
		if(idintervalo2[id] == "" || idintervalo2[id] == undefined)
			idintervalo2[id] = window.setInterval("ocultar('"+nombre+"')",1);
	}
}

function espera(id) {
	ejecucion[id] = setTimeout("o('"+id+"')", 100);
}

var abierto = '';
function cerrar() {
	referencia = abierto.split('_');
	var nombre = 'v';
	for(i=1; i<=referencia.length-1; i++) {
		nombre += '_'+referencia[i];
		if(document.getElementById(nombre)) {
			document.getElementById(nombre).style.display = 'none';
		}
	}
	abierto = '';
}

function abrir(ref) {
	cerrar();
	referencia = ref.split('_');
	var nombre = 'v';
	for(i=0; i<=referencia.length-1; i++) {
		nombre += '_'+referencia[i];
		abierto += '_'+referencia[i];
		if(document.getElementById(nombre)) {
			document.getElementById(nombre).style.display = 'inline-block';
		}
	}
}

//Código para scroll
function arriba(id) {
	document.getElementById(id).scrollTop += 15;
}

function abajo(id) {
	document.getElementById(id).scrollTop -= 15;
}

function izquierda(id) {
	document.getElementById(id).scrollLeft += 15;
}

function derecha(id) {
	document.getElementById(id).scrollLeft -= 15;
}

var identidad;

function mover(direccion, id) {
	clearInterval(identidad);
	switch(direccion) {
		case 1:
			identidad = setInterval('arriba(\''+id+'\')', 50);
		break;
		
		case 2:
			identidad = setInterval('abajo(\''+id+'\')', 50);
		break;
		
		case 3:
			identidad = setInterval('izquierda(\''+id+'\')', 50);
		break;
		
		case 4:
			identidad = setInterval('derecha(\''+id+'\')', 50);
		break;
	}
}

function detener() {
	clearInterval(identidad);
}

function valida_correo() {
	var continuar = 0;
	var mensaje = "*** ERROR ***\n\n";
	if(document.getElementById("nombre").value == ""){
		continuar = 1;
		mensaje += "El campo Nombre es requerido\n";
	}
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.getElementById("correo").value))){
		continuar = 1;
		mensaje += "El campo E-mail no es valido\n";
	}
	if(!(/^(?:\+|-)?\d+$/.test(document.getElementById("telefono").value))){
		continuar = 1;
		mensaje += "El campo Teléfono es requerido\n";
	}
	if(document.getElementById("comentarios").value == ""){
		continuar = 1;
		mensaje += "El campo Comentarios es requerido\n";
	}
	if(continuar == 0){
		parametros = "nombre="+document.getElementById("nombre").value;
		parametros += "&telefono="+document.getElementById("telefono").value+"&correo="+document.getElementById("correo").value;
		parametros += "&comentarios="+document.getElementById("comentarios").value;
		var ajax=nuevoAjax();
		ajax.open("GET", "panel/enviar.php?"+parametros, true);
		ajax.onreadystatechange=function() { 
			if (ajax.readyState==1){
				document.getElementById ('persiana').style.visibility = 'visible';
			}
			if (ajax.readyState==4){
				setTimeout("persiana()",1000);
				if(ajax.responseText == "correcto"){
					alert("Su mensaje fue enviado");
					document.getElementById("nombre").value = "";
					document.getElementById("telefono").value = "";
					document.getElementById("correo").value = "";
					document.getElementById("comentarios").value = "";
				}else{
					alert("Problemas al enviar, intente nuevamente");
				}
			} 
		}
		ajax.send(null);
	}else{
		alert(mensaje);
	}
}

function carga_fondo(id, clase) {
	if(document.getElementById(id)) {
		document.getElementById(id).setAttribute('class', clase);
		document.getElementById(id).setAttribute('className', clase);
	}
}

var ver_img = 1;
function cambiar(id, total) {
	ver_img = id;
	for(i=1; i<=total; i++) {
		var nombre = 'imagen'+i;
		document.getElementById(nombre).style.display = 'none' 
		nombre = 'descripcion'+i;
		document.getElementById(nombre).style.display = 'none';
		nombre = 'i_'+i;
		document.getElementById(nombre).setAttribute('class', 'liga_numero');
		document.getElementById(nombre).setAttribute('className', 'liga_numero');
	}
	nombre = 'imagen'+id;
	document.getElementById(nombre).style.display = 'block' 
	nombre = 'descripcion'+id;
	document.getElementById(nombre).style.display = 'block';
	nombre = 'i_'+id;
	document.getElementById(nombre).setAttribute('class', 'liga_numero_activo');
	document.getElementById(nombre).setAttribute('className', 'liga_numero_activo');
}

function cambiar_flecha(d, total) {
	for(i=1; i<=total; i++) {
		var nombre = 'imagen'+i;
		document.getElementById(nombre).style.display = 'none' 
		nombre = 'descripcion'+i;
		document.getElementById(nombre).style.display = 'none';
		nombre = 'i_'+i;
		document.getElementById(nombre).setAttribute('class', 'liga_numero');
		document.getElementById(nombre).setAttribute('className', 'liga_numero');
	}
	if(d == 1 && ver_img <= (total-1)) {
		ver_img++;
	} else if(d == 2 && ver_img >= 2) {
		ver_img--;
	}
	nombre = 'imagen'+ver_img;
	document.getElementById(nombre).style.display = 'block' 
	nombre = 'descripcion'+ver_img;
	document.getElementById(nombre).style.display = 'block';
	nombre = 'i_'+ver_img;
	document.getElementById(nombre).setAttribute('class', 'liga_numero_activo');
	document.getElementById(nombre).setAttribute('className', 'liga_numero_activo');
}

function cambiar_mover(id, total) {
	for(i=1; i<=total; i++) {
		nombre = 'i_'+i;
		document.getElementById(nombre).setAttribute('class', 'liga_numero');
		document.getElementById(nombre).setAttribute('className', 'liga_numero');
	}
	nombre = 'i_'+id;
	document.getElementById(nombre).setAttribute('class', 'liga_numero_activo');
	document.getElementById(nombre).setAttribute('className', 'liga_numero_activo');
	pos = (265*id)-265;	
	//document.getElementById('ventana').scrollTop = pos;
}

//Código para pegado de swf's
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
var _1a=this.getParams();
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
var _1c=this.getVariablePairs().join("&");
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
var _1d=this.getParams();
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
var _1f=this.getVariablePairs().join("&");
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
return _19;
},write:function(_20){
if(this.getAttribute("useExpressInstall")){
var _21=new deconcept.PlayerVersion([6,0,65]);
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();return true;
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(){
var _23=new deconcept.PlayerVersion([0,0,0]);
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
return _23;};
deconcept.PlayerVersion=function(_27){
this.major=_27[0]!=null?parseInt(_27[0]):0;
this.minor=_27[1]!=null?parseInt(_27[1]):0;
this.rev=_27[2]!=null?parseInt(_27[2]):0;
};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(this.major<fv.major){return false;}
if(this.major>fv.major){return true;}
if(this.minor<fv.minor){return false;}
if(this.minor>fv.minor){return true;}
if(this.rev<fv.rev){
return false;
}return true;};
deconcept.util={getRequestParameter:function(_29){
var q=document.location.search||document.location.hash;
if(q){var _2b=q.substring(1).split("&");
for(var i=0;i<_2b.length;i++){
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
return "";}};
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
var _2d=document.getElementsByTagName("OBJECT");
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
__flash_savedUnloadHandler=function(){};
if(typeof window.onunload=="function"){
var _30=window.onunload;
window.onunload=function(){
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
if(typeof window.onbeforeunload=="function"){
var oldBeforeUnload=window.onbeforeunload;
window.onbeforeunload=function(){
deconcept.SWFObjectUtil.prepUnload();
oldBeforeUnload();};
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
if(Array.prototype.push==null){
Array.prototype.push=function(_31){
this[this.length]=_31;
return this.length;};}
var getQueryParamValue=deconcept.util.getRequestParameter;
var FlashObject=deconcept.SWFObject;
var SWFObject=deconcept.SWFObject;