function siguiente(id){
	
	if(id == 1){
	  document.getElementById('1').style.display = 'none';
	  document.getElementById('2').style.display = 'block';
	  document.getElementById('4').style.display = 'none';
	  document.getElementById('5').style.display = 'block';
	}else{
	  document.getElementById('2').style.display = 'none';
	  document.getElementById('3').style.display = 'block';
	  document.getElementById('5').style.display = 'none';
	}
}

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; 
}

var id_activo = 'm_1_1';

function quitar_clase(clase_off) {
	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];
			if(document.getElementById(nombre)) {
				document.getElementById(nombre).setAttribute('class', clase_off);
				document.getElementById(nombre).setAttribute('className', clase_off);
			}
		}
	}
}

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

var id_activo_ = 'm_1_1';

function quitar_clase_(clase_off) {
	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];
			if(document.getElementById(nombre)) {
				document.getElementById(nombre).setAttribute('class', clase_off);
				document.getElementById(nombre).setAttribute('className', clase_off);
			}
		}
	}
}

function poner_clase_(id, clase_on, clase_off) {
	quitar_clase_(clase_off);
	var marcar = id.split('_');
	var nombre = marcar[0];
	for(i=1; i<=marcar.length-1; i++) {
		nombre += '_'+marcar[i];
		if(document.getElementById(nombre)) {
			document.getElementById(nombre).setAttribute('class', clase_on);
			document.getElementById(nombre).setAttribute('className', clase_on);
		}
	}
	id_activo_ = id;
}

function cargar(archivo, forma, id) {
	var ajax=nuevoAjax();
	var caja_scroll = 'texto_scroll';
	switch(forma) {
		case 1:
			ajax.open("POST", "include/"+archivo, true);
			caja_scroll = 'producto_scroll';
		break;
		//indirecto
		case 2:
			ajax.open("POST", "include/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;
			makeScrollbar( $(caja_scroll), $('scrollbar1'), $('handle1') );
			//setTimeout("persiana()",1000);
		} 
	}
	ajax.send(null);
}

function cargaries(archivo, id) {
	var ajax=nuevoAjax();
	var caja_scroll = 'ies_scroll';
	ajax.open("POST", "include/nocache_ies.php?archivo="+archivo, true);
	ajax.onreadystatechange=function() { 
		if (ajax.readyState==4){
			document.getElementById(id).innerHTML = ajax.responseText;
			makeScrollbar( $(caja_scroll), $('scrollbar1'), $('handle1') );
			//setTimeout("persiana()",1000);
		} 
	}
	ajax.send(null);
}

function imprSelec(nombre) {
	window.open('include/ficha.php?id='+nombre, 'ficha', 'width=700,height=700,scrollbars=yes');
  /*var ficha = document.getElementById(nombre);
  document.getElementById('diagrama').style.display = 'block';
  var ventimp = window.open(' ', 'popimpr');
  ventimp.document.write('<link href="css/ficha.css" rel="stylesheet" type="text/css" />');
  ventimp.document.write('<div id="detalle">');
  ventimp.document.write(ficha.innerHTML);
  ventimp.document.write('</div>');
  ventimp.document.close();
  ventimp.print( );
  ventimp.close();*/
} 

function buscar(evt) {
	evt = (evt) ? evt : event;
	var charCode = (evt.which) ? evt.which : evt.keyCode;
	if(charCode == 13){
		if(document.getElementById('buscar').value != '') {
			cargar('menu_productos2.php', 1, 'submenu');
			cargar('buscar.php?buscar='+document.getElementById('buscar').value, 1, 'contenido');
			document.getElementById('buscar').value = '';
		} else {
			alert('Debes completar el campo de busqueda');
		}
	}
}

function buscar_() {
	if(document.getElementById('buscar').value != '') {
		cargar('menu_productos2.php', 1, 'submenu');
		cargar('buscar.php?buscar='+document.getElementById('buscar').value, 1, 'contenido');
		document.getElementById('buscar').value = '';
	} else {
		alert('Debes completar el campo de busqueda');
	}
}

function borrar() {
	document.getElementById('submenu').innerHTML = '';
}

function valida_n() {
	if(document.getElementById('usuario_n').value == '' || document.getElementById('clave_n').value == '') {
		alert('Es necesario completar los campos');
	} else {
		usuario = document.getElementById('usuario_n').value;
		clave = document.getElementById('clave_n').value;
		cargar('nacionales.php?usuario='+usuario+'&clave='+clave, 1, 'contenido');
	}
}

function valida_e() {
	if(document.getElementById('usuario_e').value == '' || document.getElementById('clave_e').value == '') {
		alert('Es necesario completar los campos');
	} else {
		usuario = document.getElementById('usuario_e').value;
		clave = document.getElementById('clave_e').value;
		cargar('extranjeros.php?usuario='+usuario+'&clave='+clave, 1, 'contenido');
	}
}

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 = '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);
}

//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;
	var cerrar = document.createElement('div');
	cerrar.id = 'cerrar';
	cerrar.innerHTML = '<a href="javascript:cerrar_ventana_();"><img src="imagenes/window_close.png" align="absmiddle" border="0" /></a>';
	contenedor.appendChild(cargando);
	contenedor.appendChild(imagen);
	contenedor.appendChild(cerrar);
	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);
												elemento = document.getElementById('cerrar');
												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);
}

function cerrar_ventana_() {
	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);
}

function checkS(e) {
	var posx = 0;
	var posy = 0;
    if (!e) var e = window.event;
    if (e.pageX || e.pageY)
    {
        posx = e.pageX;
        posy = e.pageY;
    }
    else if (e.clientX || e.clientY)
    {
        posx = e.clientX;
        posy = e.clientY;
    }
	document.getElementById('nota').style.left = (posx+5)+'px';
	document.getElementById('nota').style.top = (posy-18)+'px';
}

function nota(opcion) {
	if(opcion == 1){
		document.getElementById('nota').style.visibility = 'visible';
	}else{
		document.getElementById('nota').style.visibility = 'hidden';
	}
}

function checkD(e) {
	var posx = 0;
	var posy = 0;
    if (!e) var e = window.event;
    if (e.pageX || e.pageY)
    {
        posx = e.pageX;
        posy = e.pageY;
    }
    else if (e.clientX || e.clientY)
    {
        posx = e.clientX;
        posy = e.clientY;
    }
	document.getElementById('diagrama').style.left = (posx-300)+'px';
	document.getElementById('diagrama').style.top = (posy-200)+'px';
}

/*function ver_diagrama(opcion) {
	if(opcion == 1){
		document.getElementById('diagrama').style.visibility = 'visible';
	}else{
		document.getElementById('diagrama').style.visibility = 'hidden';
	}
}*/

function ver_diagrama(opcion) {
	if(opcion == 1){
		document.getElementById('diagrama').style.display = 'block';
	}else{
		document.getElementById('diagrama').style.display = 'none';
	}
}

function simbologia() {
	window.open('include/simbologia.html', 'simbologia', 'width=620,height=600,scrollbars=yes');
}

function ver_dato(id, total) {
	for(i=1; i<=total; i++) {
		var nombre = 'datos'+i;
		document.getElementById(nombre).style.display = 'none';
	}
	nombre = 'datos'+id;
	document.getElementById(nombre).style.display = 'block';
}

function detalle_info(img) {
	var left = (screen.width-78)/2;
	var top = (screen.height-58)/2;
	window.open('include/imagen.php?img='+img, 'detalle', 'width=78,height=58,scrollbars=no,left='+left+',top='+top);
}

function valEmail(valor){
    re=/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/
    if(!re.exec(valor))    {
        return false;
    }else{
        return true;
    }
}

function enviar(){
	var continuar = 0;
	var mensaje = "Debes completar el formulario";
	
	if(document.getElementById("nombre").value == ""){
		continuar = 1;
	}
	if(document.getElementById("apellido").value == ""){
		continuar = 1;
	}
	if(document.getElementById("profesion").value == ""){
		continuar = 1;
	}
	if(document.getElementById("email").value == ""){
		continuar = 1;
	}
	 if (!valEmail(document.getElementById("email").value)){
        continuar = 1;
    }
	if(document.getElementById("pais").value == "" ){
		continuar = 1;
	}
    else
    {
        if(document.getElementById("pais").value == 1 ){
            if(document.getElementById("estado1").value ==  ""){
                   continuar = 1;
            }
        }
        if(document.getElementById("pais").value == 2 ){
            if(document.getElementById("pais2").value ==  ""){
                   continuar = 1;
            }
            if(document.getElementById("estado2").value ==  ""){
                   continuar = 1;
            }
        }      
    }
	if(document.getElementById("ciudad").value == ""){
		continuar = 1;
	}	
	if(document.getElementById("calle").value == ""){
		continuar = 1;
	}
	if(document.getElementById("numero").value == ""){
		continuar = 1;
	}
	if(document.getElementById("colonia").value == ""){
		continuar = 1;
	}
	if(document.getElementById("cp").value == ""){
		continuar = 1;
	}
    if(document.getElementById("empresa").value == ""){
		continuar = 1;
	}
    if(document.getElementById("medio").value == ""){
		continuar = 1;
	}
	if(continuar == 0){
		var estado = (document.getElementById("estado1").value == "")? document.getElementById("estado2").value : document.getElementById("estado1").value ;
		var pais = (document.getElementById("pais").value == 1)? "MEXICO" : document.getElementById("pais2").value ;
		
		var parametros = 'nombre='+document.getElementById('nombre').value;
		parametros += '&apellido='+document.getElementById('apellido').value;
		parametros += '&profesion='+document.getElementById('profesion').value;
		parametros += '&calle='+document.getElementById('calle').value;
		parametros += '&numero='+document.getElementById('numero').value;
		parametros += '&colonia='+document.getElementById('colonia').value;
		parametros += '&cp='+document.getElementById('cp').value;
		parametros += '&ciudad='+document.getElementById('ciudad').value;
		parametros += '&estado='+estado;
		parametros += '&pais='+pais;
        parametros += '&empresa='+document.getElementById('empresa').value;
        parametros += '&email='+document.getElementById('email').value;
		parametros += '&medio='+document.getElementById('medio').value;
		
		var ajax=nuevoAjax();
		ajax.open("POST", "include/guardar.php?"+parametros, true);
		ajax.onreadystatechange=function() { 
			if (ajax.readyState==1){
				//document.getElementById ('persiana').style.visibility = 'visible';
			}
			if (ajax.readyState==4){
				document.getElementById('respuesta').innerHTML =  '<span class="titulo">T&uacute; solicitud ha sido enviada</span>';//ajax.responseText;
			} 
		}
		ajax.send(null);
	}else{
		alert(mensaje);
	}
}

function cargaContenido(idSelectOrigen)
{
	var itemSelect = document.getElementById('pais').value;
	//Mexico
	if(itemSelect == 1){
        document.getElementById('pais2').value = "";
        document.getElementById('pais2').style.display = 'none';
        document.getElementById('pais2').disabled = true;
        
		document.getElementById('estado1').disabled = false;
		document.getElementById('estado1').style.display = 'block';
		
		document.getElementById('estado2').value = "";
		document.getElementById('estado2').disabled = true;
		document.getElementById('estado2').style.display = 'none';
	}
	//Extranjero
	else if(itemSelect == 2){
    	document.getElementById('pais2').value = "";
        document.getElementById('pais2').style.display = 'block';
        document.getElementById('pais2').disabled = false;
        
		document.getElementById('estado2').disabled = false;
		document.getElementById('estado2').style.display = 'block';
		document.getElementById('estado2').value = "";
        
		document.getElementById('estado1').disabled = true;
		document.getElementById('estado1').style.display = 'none';
	}
	else{
        document.getElementById('pais2').value = "";
        document.getElementById('pais2').style.display = 'none';
        document.getElementById('pais2').disabled = true;
    
		document.getElementById('estado1').style.display = 'none';

		document.getElementById('estado2').value = "";
		document.getElementById('estado2').style.display = 'block';
		document.getElementById('estado2').disabled = true;
	}
	
	
}
//Codigo 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;