// javascript de monedas

function findPos(obj){

this.X = obj.offsetLeft;

this.Y = obj.offsetTop;

while(obj.offsetParent){

this.X=this.X+obj.offsetParent.offsetLeft;

this.Y=this.Y+obj.offsetParent.offsetTop;

if(obj==document.getElementsByTagName('body')[0]){break}

else{obj=obj.offsetParent;}

}

return this

}

var monedas_Y;

var visualizar_monedas=false;

var foco_monedas=false;



function onclikMouse(obj)

{

  p=findPos(obj);

  visualizar_monedas=true;

  y=document.getElementById("flores_m_solapa");

  y.style.top=p.Y-1;

  y.style.left=p.X-2;  

  y.style.visibility="visible";

  x=document.getElementById("flores_m");

  x.style.top=p.Y+20;

  x.style.left=p.X-144;  

  x.style.visibility="visible";

  //movepic("flecha_monedas","images/flecha_monedas_select.gif");

  monedas_Y=p.Y;

}



var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture

if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove

//document.onmousemove = getMouseXY;

// Temporary variables to hold mouse x-y pos.s

var tempX = 0

var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {

try

{

  if (IE) { // grab the x-y pos.s if browser is IE

    tempX = event.clientX + document.body.scrollLeft

    tempY = event.clientY + document.body.scrollTop

  } else {  // grab the x-y pos.s if browser is NS

    tempX = e.pageX

    tempY = e.pageY

  }  

  // catch possible negative values in NS4

  if (tempX < 0){tempX = 0}

  if (tempY < 0){tempY = 0}  

  // show the position values in the form named Show

  // in the text fields named MouseX and MouseY

//  document.write(tempX+'<br>');

  //alert(tempX);

  //alert(tempY);

  return true;

  } catch(e) { alert(e);};

}

function movepic(img_name,img_src) {

  x=document.getElementById(img_name);

  x.src=img_src;

}



function onMouseOut(obj)

{

   

  if (visualizar_monedas=true&&(tempY<monedas_Y)||foco_monedas)

  {

  visualizar_monedas=false;

  //obj.style.visibility='hidden';

  x=document.getElementById("flores_m_solapa");

  x.style.visibility='hidden';

  x=document.getElementById("flores_m");

  x.style.visibility='hidden';

  //movepic("flecha_monedas","images/flecha_monedas.gif");

  }

  foco_monedas=false;

}

function onMouseOver()

{

  if (!visualizar_monedas&&!foco_monedas)

  {

  monedas_Y=tempY;

  x=document.getElementById("flores_m");

  x.style.visibility="visible";

  x=document.getElementById("flores_m_solapa");

  x.style.visibility="visible";



  //movepic("flecha_monedas","images/flecha_monedas_select.gif");

  }

  if (!visualizar_monedas) visualizar_monedas=true;

  if (!foco_monedas) foco_monedas=true;

}

function selectM(codigoMoneda)

{
/*x=document.getElementById("change_m");
x.flores_m.value=codigoMoneda;
x.submit();
*/
document.change_m.flores_m.value=codigoMoneda;
document.change_m.submit();

}

function nada(){return false;};

// JavaScript Document


