/* FECHA */

/* Español */

function fecha_hoy() {  
var ndia  = new Array('Domingo', 'Lunes', 'Martes', 'Mi&eacute;rcoles', 'Jueves', 'Viernes', 'S&aacute;bado');  
var nmes  = new Array('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre');  
var ahora;  
var fecha = new Date();  
var any=fecha.getFullYear();  
var mes   = fecha.getMonth();  
var dia   = fecha.getDay();  
var num   = fecha.getDate();  
ahora = ndia[dia] + ", " + num + " de " + nmes[mes] + " de " + any;  
return ahora;
}



/* Català */

function data_avui() {  
var ndia  = new Array('Diumenge', 'Dilluns', 'Dimarts', 'Dimecres', 'Dijous', 'Divendres', 'Dissabte');  
var nmes  = new Array('Gener', 'Febrer', 'Març', 'Abril', 'Maig', 'Juny', 'Juliol', 'Agost', 'Setembre', 'Octubre', 'Novembre', 'Desembre');  
var ahora;  
var fecha = new Date();  
var any=fecha.getFullYear();  
var mes   = fecha.getMonth();  
var dia   = fecha.getDay();  
var num   = fecha.getDate();  
ahora = ndia[dia] + ", " + num + " de " + nmes[mes] + " de " + any;  
return ahora;
}


/* English */

function date_today() {  
var ndia  = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');  
var nmes  = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');  
var ahora;  
var fecha = new Date();  
var any=fecha.getFullYear();  
var mes   = fecha.getMonth();  
var dia   = fecha.getDay();  
var num   = fecha.getDate();  
ahora = ndia[dia] + ", " + num + " / " + nmes[mes] + " / " + any;  
return ahora;
}

/* Precarga de imagenes */

function MM_preloadImages() {
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


/* Mostrar/Ocultar capas */

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}



/* Control Formulario */

function comprobar(which){

var pass=true
if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.id.substring(0,8)=="required"){
if( ((tempobj.type=="text"||tempobj.type=="textarea") && (tempobj.value==''||tempobj.value==' '))
||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
pass=false
break
}
}
}
}
if (!pass){
alert("Debes rellenar todos los campos obligatorios para enviar el formulario")
return false
}
else
return true
}

function EsNumerico(idobj){
   var chr;
   if (idobj.value==null || idobj.value.length==0) { return false; }
   for (var i=0;i<idobj.value.length;i++){
     chr=idobj.value.substring(i,i+1);
     if (chr<"0"||chr>"9") return 0;
   }
   return 1;
}

var lwr = 'abcdefghijklmnñopqrstuvwxyzàèéíòóú';
var upr = 'ABCDEFGHIJKLMNÑOPQRSTUVWXYZÀÈÉÍÒÓÚ ';
var cadcaracters = lwr + upr;

function EsTexto(parm,lng) {
  if(lng==null){ lng=1; }
  if(lng > 0 && (parm.value==null || parm.value.length=="" || parm.value.length<lng) ){ return false; }

  for (i=0; i<parm.value.length; i++) {
    if (cadcaracters.indexOf(parm.value.charAt(i),0) == -1){ return false; }
  }
  return true;
}

function valida_email(obj)
{
  if (obj.value=='') { return 0; }
  else {
    if ( /^[A-Za-z0-9\.+_-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,6}$/.test(obj.value)) {
       return 1;
    }
    else{ return 9; }
  }
}

/* Maxlength TextArea */

/***********************************************
* Textarea Maxlength script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)
}




/* A PARTIR DE AQUI: HIPOTECAS*/



/* Hipofinan */

function capital(cuota, interes_anual, anyos, periodos_anyo)
{
	interes_anual /= 100;
	var aux = 1.0 - Math.pow((1.0 + interes_anual / periodos_anyo), -(anyos * periodos_anyo));
	return(cuota * aux / (interes_anual / periodos_anyo));
}
function cuota(capital, interes_anual, anyos, periodos_anyo)
{
	interes_anual /= 100;
	var aux = 1.0 - Math.pow((1.0 + interes_anual / periodos_anyo), -(anyos * periodos_anyo));
	return(capital * (interes_anual / periodos_anyo) / aux);
}
function cuotav(capital, interes_f, anyos_f, interes_v, anyos_v, periodos_anyo)
{
	var cuota_fija = cuota(capital, interes_f, anyos_f + anyos_v, periodos_anyo);
	
	if (anyos_v > 0)
	{
		var capital_restante, capital_amortizado, interes_amortizado, pagos_fijo, i;
		pagos_fijo = anyos_f * periodos_anyo;
		capital_restante = capital;
		for(i = 1; i <= pagos_fijo; i++)
		{
			interes_amortizado = capital_restante * interes_f / (periodos_anyo * 100.0);
			capital_amortizado = cuota_fija - interes_amortizado;
			capital_restante = capital_restante - capital_amortizado;
		}

		return cuota(capital_restante, interes_v, anyos_v, periodos_anyo);
	}
	return cuota_fija;
}
function tae(C, c, n, q)
{
	if (isNaN(c)) return NaN;
	
	var max_dif = 1; if (c < 2) max_dif = 0.2
	var I = 5.0;
	var increm = 1.0;
	var c_aux = cuota(C, I, n, q);
	var dif = c - c_aux;
	var dif_aux ,maxloops = 50;
	
	increm = Math.abs(increm) * (dif / Math.abs(dif)); // poner el signo correcto
	
	if (isNaN(c_aux)) return NaN;

	for (var counter = 0; Math.abs(dif) > max_dif && counter <= maxloops; ++counter)
	{
		I += increm;
		c_aux = cuota(C, I, n, q);
		dif_aux = dif;
		dif = c - c_aux;
		
		increm = dif * increm / (dif_aux - dif);
	//	increm = Math.abs(increm) * (dif / Math.abs(dif)); // poner el signo correcto (no hace falta)
	}

	return I;
}
function plazo(C, c, I, q)
{
	if (isNaN(c)) return NaN;

	var maxloops = 1000;
	var dif_aux = 0;
	var n = 25.0;
	var increm = 1.0;
	var c_aux = cuota(C, I, n, q);
	var dif = c_aux - c;

	if (isNaN(c_aux)) return NaN;

	for (var counter = 0; n > 0 && n <= 100 && counter < maxloops; counter++) // counter se añade para evitar un blucle infinito en caso de errores en el código
	{

		if (Math.abs(dif + dif_aux) < Math.max(dif, dif_aux)) // ((Math.abs(dif) + Math.abs(dif_aux))))
		{
			if (Math.abs(dif) < Math.abs(dif_aux))
				return n;
			else
				return n - increm;
		}
		increm = Math.abs(increm) * (dif / Math.abs(dif)); // poner el signo correcto
		n += increm;
		c_aux = cuota(C, I, n, q);
		dif_aux = dif;
		dif = c_aux - c;
	}
	return n;
}
//_________________________________________________________
function isEmpty(s){return ((s == null) || (s.length == 0));}
function redondear(numero, decimales)
{
	if (isEmpty(numero) || numero == '-' || numero == '+')
		return '';
	if (numero > 99999999999) // los numeros grandes los aproxima como quiere...
		return numero;
	if (isEmpty(decimales)) decimales = 0;
	var aux = Math.pow(10, decimales);
	return (Math.round(numero * aux)/aux);
}



/* Format Num ***************************************************************************************/

function euro_keypress(){restringirNumero(1000000000, 2);}
function euro_blur(obj){esNumeroEntre(obj, 1000000000, 2);}
function tipo_keypress(){restringirNumero(1000000, 3);}
function tipo_blur(obj){esNumeroEntre(obj, 1000000, 3);}
function trim(s){return s.replace(/(^\s*)|(\s*$)/g, '');}
function restringirNumero(max, decimales, bSign, bThousand, bAllow_leading_zeros)
{// evento onKeyPress
	var objTxt = event.srcElement;
	var objValue = objTxt.value;
	var keyCode = event.keyCode;
	
	if (decimales == null) decimales = -2;
	if (bSign == null) bSign = false;
	if (bThousand == null) bThousand = true;
	if (bAllow_leading_zeros == null) bAllow_leading_zeros = false;


	if ((keyCode == 43 || keyCode == 45) && objValue.indexOf('+') == -1 && objValue.indexOf('-') == -1 && bSign)
	{
		// Se ponga donde se ponga un signo siempre aparece al principio y
		// después el cursor se va al final del objeto.
		event.returnValue = false;
		objTxt.value = String.fromCharCode(keyCode) + objTxt.value;
		return false;
	}
	if ((keyCode > 57 || keyCode < 43 || keyCode == 47) || (keyCode == 43 || keyCode == 45) && (objValue.indexOf('+') > -1 || objValue.indexOf('-') > -1 || !bSign) || ((keyCode == 44 || keyCode == 46) && (objValue.indexOf(',') > -1 || decimales == -2)))
	{
		event.returnValue = false;
		esNumeroEntre(objTxt, max, decimales, bSign, bThousand, bAllow_leading_zeros);
		return false;
	}
	if (keyCode == 46) // punto (.)
		event.keyCode = 44; // coma (,)
}
function formatNum(valor, decimales, bSign, bThousand, bAllow_leading_zeros)
{
	var val = stripSpaces(valor);

	if (decimales == null) decimales = -2;
	if (bThousand == null) bThousand = true;
	if (bSign == null) bSign = false;
	if (bAllow_leading_zeros == null) bAllow_leading_zeros = false;

	if (bSign)
		val = comprobarSigno(val); // en esta función ya se llama a stripLeadingZeros(val)
	else
	{
		val = val.replace(/[+-]/g , '');
		if (!(bAllow_leading_zeros && (decimales == -2 || decimales == 0) && !bThousand))
			val = stripLeadingZeros(val);
	}

	if (decimales > -2)
		val = limpiarDecimal(val, decimales);

	if (bThousand)
		val = ponerPuntos(val);
	
	if (isNaN(quitarFormatoNumero(val))) // en caso de que se hubiera pegado un valor erroneo.
		val = valor;
		
	return val;
}

function esNumeroEntre(objTxt, max, decimales, bSign, bThousand, bAllow_leading_zeros)
{
	if (decimales == null) decimales = -2;
	if (bThousand == null) bThousand = true;
	if (bSign == null) bSign = false;
	if (bAllow_leading_zeros == null) bAllow_leading_zeros = false;

	var num = objTxt.value;
	if (decimales == -2)
	{
		num = num.replace(/[,]/g , '');
		objTxt.value = num;
	}
	num = quitarFormatoNumero(num);
	if (trim(num) == '' || trim(num) == '.')
	{
		objTxt.value = '';
		return true;
	}

	var mensaje = 'Debe ser un número menor que ' + ponerPuntos(max) + '\n(el signo decimal debe ser la coma ",")';

	if (!bAllow_leading_zeros)
		num = (num == '')? num: parseFloat(num);

	if (num == '' || (esNumero(num) && num <= max))
	{
		num += '';
		num = num.replace(/[.]/g, ',');
		objTxt.value = formatNum(num, decimales, bSign, bThousand, bAllow_leading_zeros);
		return true;
	}

	alert(mensaje);
	objTxt.focus();
	objTxt.select();
	return false;
}
function esNumero(dato)
{
	dato = '' + dato;
	return (dato != '' && !isNaN(dato) && dato.indexOf('E') == -1 && dato.indexOf('e') == -1);
}
function ponerPuntos(num)
{
	num = '' + num;
	var aux_i = '';
	var aux_d = '';
	var numero = num.replace(/[.]/g, ''); // limpiar formato pero dejar la coma (,)
	var num_sin_dec;
	var decimales = '';
	var num_puntos = '';
	var signo = numero.charAt(0);
	if (signo == '-' || signo == '+')
		numero = numero.substr(1);
	else
		signo = '';
	if (numero.indexOf(',') != -1)
	{
		num_sin_dec = numero.substring(0, numero.indexOf(','));
		decimales = numero.substr(numero.indexOf(','));
	}
	else
		num_sin_dec = numero;

	if (num_sin_dec.length > 3)
	{
		aux_i = num_sin_dec;
		while (aux_i.length > 3)
		{
			aux_d = aux_i.substr(aux_i.length - 3);
			aux_i = aux_i.substr(0, aux_i.length - 3);
			num_puntos = '.' + aux_d + num_puntos;
		}
		num = signo + aux_i + num_puntos + decimales;
	}
	else
		num = signo + numero;
	return num;
}
function quitarFormatoNumero(dato)
{
	datAo = '' + dato;
	dato = dato.replace(/[.]/g, '');
	dato = dato.replace(/\,/g, '.');
	return dato;
}

function stripSpaces(s)
{
	return s.replace(/\s/g, '');
}
function comprobarSigno(value)
{
	value = stripLeadingZeros(value);
	if (value == '-' || value == '+') return '';
	if (value.lastIndexOf('+') > 0)
		return value.replace(/[+]/g, '');
	if (value.lastIndexOf('-') > 0)
		return value.replace(/[-]/g, '');
	return value;
}
function stripLeadingZeros(s)
{
	var signo = s.charAt(0);
	if (signo == '-' || signo == '+')
		s = s.substr(1);
	else
		signo = '';

	for (var i = 0; i < s.length; ++i)
		if (s.charAt(i) != '0' || s.charAt(i+1) == ',' || s.charAt(i+1) == '')
			return signo + s.substr(i);
	return signo + s;
}
function redondear(numero, decimales)
{
	if (numero == null || numero == '-' || numero == '+')
		return '';
	if (numero > 99999999999) // los numeros grandes los aproxima como quiere...
		return numero;
	if (decimales == null) decimales = 0;
	var aux = Math.pow(10, decimales);
	return (Math.round(numero * aux)/aux);
}
function limpiarDecimal(numero, decimales)
{
	if (decimales == null) decimales = -2;
	numero = '' + numero;
	var signo = numero.charAt(0);
	if (signo == '-' || signo == '+')
		numero = numero.substr(1);
	else
		signo = '';

	if (decimales > -1)
	{
		numero = '' + redondear(quitarFormatoNumero(numero), decimales);
		numero = numero.replace(/[.]/g, ',');
	}

	var coma_index = numero.indexOf(',');
	if (coma_index == (numero.length - 1))
		numero = numero.substr(0, coma_index);
	else if (coma_index == 0)
		numero = '0' + numero;

	numero = signo + numero;

	return numero;
}




/* Calculo de la hipoteca **********************************************************************************************/

var q = 12;
function calcular()
{
	var C = quitarFormatoNumero(document.credito.C.value);
	var n = quitarFormatoNumero(document.credito.n.value);
	var I = quitarFormatoNumero(document.credito.I.value);
	var cu = quitarFormatoNumero(document.credito.cu.value);

	if (C == '' && n != '' && I != '' && cu != '')
		calcularCapital(cu, I, n, q);
	else if (n == '' && C != '' && I != '' && cu != '')
		calcularPlazo(C, cu, I, q);
	else if (I == '' && n != '' && C != '' && cu != '')
		calcularInteres(C, cu, n, q);
	else if (cu == '' && n != '' && I != '' && C != '')
		calcularCuota(C, I, n ,q);
	else
		alert('Debe rellenar todos los valores menos el que desea calcular.');
}
function calcularPlazo(C, cu, I, q)
{
	var p = plazo(C, cu, I, q);
	if (isNaN(p))
		alert('Los datos proporcionados no son coherentes.\nEl cálculo no se puede hacer.\n');
	else if (p <= 0)
		document.credito.n.value = '< 0';
	else if (p > 100)
		document.credito.n.value = '> 100';
	else
		document.credito.n.value = p;
}
function calcularCapital(cu, I, n, q)
{
	var c = capital(cu, I, n, q);
	if (isNaN(c))
		alert('Los datos proporcionados no son coherentes.\n\nEl cálculo no se puede hacer.\n');
	else
		document.credito.C.value = ponerPuntos(Math.round(c));
}
function calcularCuota(C, I, n ,q)
{
	var c = cuota(C, I, n ,q);
	if (isNaN(c))
		alert('Los datos proporcionados no son coherentes.\n\nEl cálculo no se puede hacer.\n');
	else
	{
		c = '' + redondear(c, 2);
		document.credito.cu.value = ponerPuntos(c.replace(/[.]/g, ','));
	}
}
function calcularInteres(C, cu, n, q)
{
	var i = tae(C, cu, n, q);
	if (isNaN(i))
		alert('Los datos proporcionados no son coherentes.\n');
	else if (i >= 0)
	{
		i = '' + redondear(i, 3);
		document.credito.I.value = i.replace(/[.]/g, ',');
	}
	else
		alert('El interés calculado es menor que cero. \n\nLa cuota y/o el plazo son demasido bajos.\n');
}

/************************** CONTROLA FLASH */

/**
 * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
 *   legal reasons.
 */
 
 
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;
