<!--
function host(u){
return u;}
if(!desp)
var desp=false;
function Login(ref){
if($("#dvlogin").html()=='')
$("#dvlogin").load('/Servicios/login.aspx');
$('#hopc').val(ref);
return slide_effect("dvlogin",desp);}
function slide_effect(i,d){
if(d){
$('#hModAd').removeClass("u").addClass("d");
$("#"+i).animate({height:'0'},1000);}else{
$('#hModAd').removeClass("d").addClass("u");
$("#"+i).animate({height:'90px'},1000);}
desp=!desp;
return false;}
function SendLogin(){
var nick=$('#txtnick').val();
var pass=$('#txtpass').val();
var sesion="0";
if($('#chksesion:checked').val()=='on')
sesion="1";
var url='/ws/motos.asmx/Login?Nick='+nick+'&Pass='+pass+'&Sesion='+sesion;
cadena=getVal(url);
if(cadena!=''){
o=$('#spinfo');
switch(cadena){
case'0':
if($('#hopc').val()=='1')
window.location='/GTA/Default.aspx';
else
window.location.reload();
break;
case'1':
o.html('Email o Nick erroneo').addClass('error');
return false;
break;
case'2':
o.html('Contraseña erronea').addClass('error');
return false;
break;
case'3':
o.html('Email o Nick erroneo').addClass('error');
return false;
break;
case'4':
o.html('Se ha producido un error').addClass('error');
return false;
break;}}}
function GetMenu(){
var indice=document.cookie.indexOf("idcnet")
if(indice>-1){
$("#recursive").fadeOut('slow',function(){
v=getVal('/ws/motos.asmx/GetMenu?seclogin='+leerCookie('seclogin'));
if(v!=''){
$('#recursive').html(v);
$('.nostyle_shown').show();
$('.nostyle_hidden').hide();
if($('#div_opina').size()>0){
usr=$(v.split('&')[0].replace('Hola ','')).find('b').text();
$('#ahModAd').hide();
$('#txtNombre').css('margin-right','116px').val(usr);
if(usr==''){
t='No dispones de nick. Escribe un nick como tu nombre de usuario público.';
$('#txtNombre').attr('rel','1').val(t).addClass('small_info').click(function(){
if($(this).val()==t)$(this).val('').removeClass('small_info');});}
else
$('#txtNombre').attr('disabled',true);}}
$("#recursive").fadeIn('slow');});}else{
$('.nostyle_shown').hide();
$('.nostyle_hidden').show();}}
function leerCookie(nombre){
var g=document.cookie;
var indice=g.indexOf(nombre)
if(indice>-1){
a=g.substring(g.indexOf(nombre+'=')+nombre.length+1,g.length);
if(a.indexOf(';')!=-1)a=a.substring(0,a.indexOf(';'))
return a;}else
return'';}
function CloseSes(){
getVal('/ws/motos.asmx/CloseSession?a=a');
window.location.reload();}
function getVal(url){
$.ajax({
url:url+"&ord="+Math.random()*10000000000000000,
async:false,
success:function(xml){
s=$(xml).find('string').text();},
error:function(){s='';}});
return s;}
function retValidate(e,btn){
var code;
if(document.all)code=event.keyCode;
else code=e.keyCode;
if(code==13){$("#"+btn).click();return false;}
else return true;}
var NombreControl="_ctl0_ContentPlaceHolder1_";
var SC;
var IM;
var JM=-96;
function cargarFoto(Foto)
{
var Objeto="imgFotogrande";
document.getElementById(Objeto).src=Foto;}
function ScrollUp(speed){
if(document.getElementById){
if(parseInt(IM.style.marginTop)<=0)
IM.style.marginTop=(parseInt(IM.style.marginTop)+speed)+"px";
document.getElementById('TimerId').value=setTimeout("ScrollUp("+speed+")",10);
document.getElementById('IconUp').src=document.getElementById(NombreControl+'imgUpRoller').value;}}
function ScrollDown(speed){
if(document.getElementById){
if(parseInt(IM.style.marginTop)>=(parseInt(SC.style.height)-parseInt(IM.style.height)))
{
IM.style.marginTop=(parseInt(IM.style.marginTop)-speed)+"px";
document.getElementById('TimerId').value=setTimeout("ScrollDown("+speed+")",10);
document.getElementById('IconDown').src=document.getElementById(NombreControl+'imgDownRoller').value;}
else
{
IM.style.marginTop=parseInt(SC.style.height)-parseInt(IM.style.height);}}}
function ScrollStop(tipo){
if(document.getElementById){
if(tipo==1)
{
document.getElementById('IconUp').src=document.getElementById(NombreControl+'imgUpOriginal').value;}
else
{
document.getElementById('IconDown').src=document.getElementById(NombreControl+'imgDownOriginal').value;}
clearTimeout(document.getElementById('TimerId').value);}}
function ScrollInit(){
if(document.getElementById("divIMG")!=null)
{
if(document.getElementById){
SC=document.getElementById("DivScroll");
IM=document.getElementById("divIMG");
document.getElementById("divIMG").style.marginLeft=0;}}}
function ScrollInit2(){
if(document.getElementById("divIMG")!=null)
{
if(document.getElementById){
SC=document.getElementById("DivScroll");
IM=document.getElementById("divIMG");
posicion=(pos-2)*JM
if(posicion>0){
IM.style.marginTop='0px';}
else{
IM.style.marginTop=(posicion)+'px';}
document.getElementById("imagen_"+pos).style.border='2px solid red';}}}
if(document.getElementById(NombreControl+"posicion").value!=""){
var pos=document.getElementById(NombreControl+"posicion").value;
window.onload=ScrollInit2;
if(document.getElementById("jump").value!=""){
JM=document.getElementById("jump").value;}}
else{
window.onload=ScrollInit;}
document.onkeyup=KeyCheck;
function KeyCheck(e){
var KeyID=(window.event)?event.keyCode:e.keyCode;
switch(KeyID){
case 37:
case 38:
location.href=document.getElementById(NombreControl+'urlprevious').value;
break;
case 32:
case 39:
case 40:
location.href=document.getElementById(NombreControl+'urlnext').value;
break;}}
//--->