/**
 * popupBox
 * 
 * Copyright (c) 2009 Shohei Tanaka
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 */


var gtemFile = new Array('main1',
		'main2',
		'main3',
		'main4'
		);

function PopupSubMenu() {}

PopupSubMenu.prototype = {
	click: function(trgObj) {
		for (i in gtemFile) {
			
			if (trgObj != gtemFile[i]) {
				
				var subMenuElm = document.getElementById(gtemFile[i] + '-target');
				if((subMenuElm != null) || (subMenuElm != undefined)){
					this.hideElement(subMenuElm);
				}
				
				var subMenuElm = document.images[gtemFile[i]];
				if((subMenuElm != null) ||(subMenuElm != undefined)){

				}
			}

		}
		
		var subMenuElm = document.getElementById(trgObj  + '-target');
		this.showElement(subMenuElm);
		
		
	},
	showElement: function(obj) {
		obj.style.visibility = 'visible';
	},
	
	hideElement: function(obj) {
		obj.style.visibility = 'hidden';
	}
}

var PSM = new PopupSubMenu();



  per = 0
  function picFin()
  {
    if(per<100){
       per = per+2;
       pic.filters['alpha'].opacity = per;
       setTimeout("picFin()",50);}
  }


