var global_show_up = new Array();
var show_up;
function findDOM(id)
{
	if(document.getElementById)
		return document.getElementById(id);
	else
		return document.id;
}


function showUp(id)
{	show_up = id;
	deter(id);

	var obj = findDOM(id);
//	if(obj.style.visibility=='hidden')
		obj.style.visibility = 'visible'
//	else
//		obj.style.visibility=="hidden";


	function deter(id)
	{	var exist_=false;
		for(var i = 0 ;i < global_show_up.length ; i++)
			if(global_show_up[i]==id)
				exist_ = true;
		if(!exist_)
			global_show_up[global_show_up.length]=id;
		return global_show_up;
	}

}

function showDown(id)
{
	if(id!=show_up)
		findDOM(id).style.visibility = "hidden";
	show_up="";
}

function hideAll()
{
	for(var i = 0 ; i < global_show_up.length ;i++)
		if(show_up!=global_show_up[i])
			findDOM(global_show_up[i]).style.visibility = 'hidden';
}


function window_(mypage)
{
	var win=null;
	var myname = 'Details';
	var w = '780';
	var h = '450';
	var scroll = 'yes';
	var pos = 'center';

	if(pos=="center")
	{
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!="center" && pos!="random") || pos==null)
	{
		LeftPosition=0;
		TopPosition=20;
	}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=yes,directories=no,status=no,menubar=yes,toolbar=yes,resizable=yes';
	win=window.open(mypage,myname,settings);
	if (win.opener == null)
		win.opener = self;

	returnValue=false;
	return false;
}


function window_small(mypage)
{
	var win=null;
	var myname = 'Details';
	var w = '600';
	var h = '455';
	var scroll = 'yes';
	var pos = 'center';

	if(pos=="center")
	{
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!="center" && pos!="random") || pos==null)
	{
		LeftPosition=0;
		TopPosition=20;
	}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=yes,directories=no,status=no,menubar=yes,toolbar=yes,resizable=yes';
	win=window.open(mypage,myname,settings);
	if (win.opener == null)
		win.opener = self;

	returnValue=false;
	return false;
}
