function doSearch(sWhat) {
	$("#reSearch").val(sWhat);
	document.getElementById("form_reSearch").submit();
}
function popUp(url){
	window.open(url,'_blank');
}
function go2scroll(id){
    var altura = $(id).offset().top;
    $('html').animate({ scrollTop: altura }, "fast");
}
var timer = 0;
function timerac(value){
	timer = value;
}
function fadeDrop(){
	if ( timer == 1 ) { $("#dropmenu1_b").fadeOut("fast"); }
}
function dropWide(){
 	$("#dropmenu1_b").fadeIn("fast");
}

$("#flechita_allpass").ready(function(){
    $("#flechita_allpass").click(function(){
        $("#dropmenu_allpass").fadeIn("fast");
    });
    $("#dropmenu_allpass").mouseover(function(){
        timer = 0;
    });
    $("#dropmenu_allpass").mouseout(function(){
        timer = 1;
    });
    $("body").mouseover(function(){
        if ( timer == 1 ) {
        $("#dropmenu_allpass").fadeOut("fast");
        }
    });
});

function radio1(){
    $("#google_search, #busqueda_normal").toggle();
    $("#google_s")[0].checked=false;
    $("#google_s1")[0].checked=true;
    $("#goofull_s")[0].checked=true;
    $("#goofull_s1")[0].checked=false;
}
function bookmark(bookmarkurl,bookmarktitle) {
    if (document.all)
    window.external.AddFavorite(bookmarkurl,bookmarktitle)
    else if (window.sidebar) // firefox
    window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
}

function unCheckAllButRadio(oRadio,value) {
    var or = document.getElementsByName(oRadio);
    for(i=1; i<=10; i++) {
    or2=document.getElementById('opcion_login_'+i);
    if (or2==null || or2=='undefined') return;
    if (or2.value!=value) or2.checked=false;
    }
    return; 
}
function foco(){
	$('#usuario_wap').focus();
	$('#usuario_wap').val('');
	return;
}


$(document).ready(function(){

$("#usuario_wap").keyup(function (e) {

	var reg = /^7\d*/
	if(!reg.test(this.value)) {
		this.value = 7;
	}
/*      if (e.which == 32 || (65 <= e.which && e.which <= 65 + 25)
                        || (97 <= e.which && e.which <= 97 + 25)) {
        var c = String.fromCharCode(e.which);
        $("p").append($("<span/>"))
              .children(":last")
              .append(document.createTextNode(c));
      } else if (e.which == 8) {
        // backspace in IE only be on keydown
        $("p").children(":last").remove();
      }
      $("div").text(e.which);*/
    });
});