/***************************************************************************************************************************************
 *   otto von quast  javascript
 ***************************************************************************************************************************************
 *
 *	variables		see below
 *	ovq_km_show		show kiss mouth for given menue entry
 *	ovq_km_hide		hide kiss mouth for given menue entry
 *      ovq_wiovq_move          move the image on the "who is ovq" page
 *
 ***************************************************************************************************************************************
 *
 *	03.01.08	ste	started 
 *	
 ***************************************************************************************************************************************/

// init
var ovq_km_cur = '' ;
var ovq_km_image = 'ovqkissimg-' ;
var ovq_sheep_image = 'ovqblogimg-' ;
var ovq_wiovq_aid = 'ovqwiovqlink-' ;
var ovq_wiovq_pos1 = '' ;

/* show kiss mouth for given menue entry */
function ovq_km_show( kmid ) {
  oimg = document.getElementById( ovq_km_image + kmid ) ;
  if( ovq_km_cur == '' && oimg.style.visibility == 'visible' )
   ovq_km_cur = kmid ;
  if( ! oimg ) 
    return false ;
  oimg.style.visibility = 'visible' ;
  return true ;
}

/* hide kiss mouth for given menue entry */
function ovq_km_hide( kmid ) {
  if( kmid != ovq_km_cur ) {
    oimg = document.getElementById( ovq_km_image + kmid ) ;
    if( ! oimg ) 
      return false ;
    oimg.style.visibility = 'hidden' ;
  }
  return true ;
}

/* show given sheep image an hide the other */
function ovq_sheep_show( sid, hid ) {
  oimg = document.getElementById( ovq_sheep_image + sid ) ;
  if( ! oimg ) 
    return false ;
  oimg.style.visibility = 'visible' ;
  oimg = document.getElementById( ovq_sheep_image + hid ) ;
  if( ! oimg ) 
    return false ;
  oimg.style.visibility = 'hidden' ;
  return true ;
}

/* move the image on the "who is ovq" page */
function ovq_wiovq_move() {
  if( ovq_wiovq_pos1 == '' ) {
    ovq_wiovq_pos1 = document.getElementById( ovq_wiovq_aid + '1' ) ;
    ovq_wiovq_pos2 = document.getElementById( ovq_wiovq_aid + '2' ) ;
    ipos1 = 175;
    ipos2 = -557;
    if( ! ovq_wiovq_pos1 )
      return false ;
   }
  ipos1 += 1;
  if( ipos1 == 907 ) {
    ipos1 = 0 ;
    ipos2 = -557 ;
   }
  if( ipos1 > 350 ) {
    ipos2++  ;
  }
  //alert( ovq_wiovq_pos.style.left ) ;
  ovq_wiovq_pos1.style.left = ipos1 + 'px' ; 
  ovq_wiovq_pos2.style.left = ipos2 + 'px' ; 
  setTimeout( 'ovq_wiovq_move()', 10 ) ;
  return true ;
}
