var team = new Array();

function __DIV__ (myid) {
	//property
	this.name = myid
	this.elm = document.getElementById(myid)
	this.css = this.elm.style	
//	this.elm.obj = this //アクセスできるように、このDIVエレメントに自作オブジェクトをアタッチ
	team[team.length] = this //registering	
	
	
	//method
	this.echo = function (c) {
		this.elm.innerHTML = c
	}	
	this.on = function  () {
		this.css.display = "block"
	}
	this.off = function  () {
		this.css.display = "none"
	}
	
//	this.elm.onmouseup = function () {
//	}
//	this.elm.onmousedown = function  () {
//	}
//		
//	
//	this.elm.onmouseover = function  () {
//	}
//	this.elm.onmouseout = function  () {
//	}
	
}


function show (obj,tag) {

	resetDIV ()
	obj.on()

}

function resetDIV () {
	for (i=0;i<team.length;i++) team[i].off()
}

function nav (url) {
	
	switch (url) {
	    case "babysafe" : goto = "./babysafe.html"; break;
	    case "cart" : goto = "./products/viewcart.html"; break;
	    case "order" : goto = "./products/order.html"; break;
	    default : goto = "#";
	}
	
	self.location.href = goto
}



