/* WASAN ISLAND / JS */

/* gallery */
var Gallery_POS = 1;
var Gallery_Max = 33;
function GallySwitch(inIMG) {
	document.getElementById('Image').src = 'data/gally/Wasan'+inIMG+'.jpg';
}
function picDown() {
	Gallery_POS = (Gallery_POS>1)? Gallery_POS-1 : Gallery_Max;
	GallySwitch(Gallery_POS);
}
function picUp() {
	Gallery_POS = (Gallery_POS<Gallery_Max)? Gallery_POS+1 : 1;
	GallySwitch(Gallery_POS);
}
/* gallery ENDE */

/* resize */
function rePosition() {

  var ref_Heigh;
  if (self.innerHeight)  {
    // all except Explorer
    ref_Heigh = self.innerHeight;
  } else if (document.documentElement && document.documentElement.clientHeight) {
    // Explorer 6 Strict Mode
    ref_Heigh = document.documentElement.clientHeight;
  } else if (document.body)  {
    // other Explorers
    ref_Heigh = document.body.clientHeight;
  }
  
  var ele_aa = document.getElementById('Content');
  var ele_aa_height = ele_aa.offsetHeight;
  var newMarginTop = Math.floor( (ref_Heigh - ele_aa_height) / 2 );
  ele_aa.style.margin = eval(newMarginTop)+'px auto 0px auto';
 
} 
/* resize ENDE */

/* WASAN ISLAND / JS ENDE*/