﻿function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function accionDeshabilitada() {
	domAlert("Esta función esta deshabilitada temporalmente");
}
function aviso_legal() {
    window.open(jsRootFq + "AvisoLegal", "aviso", "width=715, height=490, left=, top=, scrollbars=1");
}
function condiciones_uso() {
	window.open(jsRootFq+"ContratoCondicionesDeUso", "condicionesuso", "width=715, height=480, left=, top=, scrollbars=1");
}
function lopd() {
	window.open(jsRootFq+"LOPD", "lopd", "width=700, height=420, left=, top=");
}
function condi_ventas() {
    window.open(jsRootFq + "CondicionesDeVenta", "condiventas", "width=715, height=480, left=, top=, scrollbars=1");
}

function validaEmail(email) {
	tmp = true;
	////////////////////////////
	arroba = email.indexOf("@", 0);
	if (arroba == -1 || arroba < 2) {
		tmp = false;
	}
	punto = email.lastIndexOf(".", email.length);
	if (punto < arroba || punto == -1 || punto > email.length - 2) {
		tmp = false;
	}
	return tmp;
}

//crear un form y hacer post automaticamente
function autoCreateForm(url, elems, target) {
    if (url) {
        var target_txt = "";
        if(target)
            target_txt = ' target="'+target+'"';
		
        var form = $('<form method="post" action="' + url + '"'+target_txt+'></form>');
		$.each(elems, function (key, value) {
			form.append($('<input type="hidden" value="' + value + '" name="' + key + '"/>"'));
		});
		form.appendTo("body").submit();
	}
}
function resizeme() {
    $('div.ll').css({
        height: $('body .container').height()
    });
    $('div.rr').css({
        height: $('body .container').height()
    });
}
$(document).ready(function () {
    //$('body .container').css({ zIndex: 2 });
    $(window).bind("resize", resizeme);
    resizeme();
})
