// JavaScript Document

function openref(url,name1,width,height) // function to open window in center of screen
{
	//alert(parent.frames['bottomFrame'].enableSound);
	
	w=width
	h=height
	l = Math.round((screen.Width-w)/2)
	t = Math.round((screen.Height-h)/2)
	win_name1=open(url,name1,'left='+l+',top='+t+',width='+w+',height='+h+', fullscreen=no, status=no,toolbar=no,menubar=no,resizable=yes');
	if (window.focus) {win_name1.focus()}
	
	if(parent.frames['bottomFrame'].enableSound=='true'){
	parent.frames['bottomFrame'].popSound="true";	
	soundHandler("false");	
	}
}

function setPanel(panel, header, body) {
	// shows or hides the specified panel. body and header
	// booleans indicate which part of the panel
	// needs to be shown or hidden
	if (header) {
		showBlock(panel + '_header');
		showBlock(panel + '_up');
		showBlock(panel + '_down');
	}
	else {
		hideBlock(panel + '_header');
	}
	if (body) {
		showBlock(panel + '_body');
		showBlock(panel + '_up');
		hideBlock(panel + '_down');
	}
	else {
		hideBlock(panel + '_body');
		showBlock(panel + '_down');
		hideBlock(panel + '_up');
	}
}

function showBlock(control) {
	// show specified block
	var control_handle = document.getElementById(control);
	control_handle.style.display = 'block';
}

function hideBlock (control) {
	// hide specified block
	var control_handle = document.getElementById(control);
	control_handle.style.display = 'none';
}

