function sx_panel_init(id,strTop,strLeft,strHeight,strWidth,bolOpen,bolModal,bolFirst){
	var objPanel=document.getElementById("sx_panel_"+id);
	var objParent=objPanel.parentNode;
	var objModal;
	var bolHidden=false;
	if(bolFirst){
		if(strHeight!=""){objPanel.style.height=strHeight;}else{objPanel.style.height="200px";}
		if(strWidth!=""){objPanel.style.width=strWidth;}else{objPanel.style.width="300px";}
	}
	if(objPanel.style.display=="none"){
		bolHidden=true;
		objPanel.style.visibility="hidden";objPanel.style.display="block";
	}
	if(strTop=="center"){objPanel.style.top=getElementTop(objParent)+Math.round((objParent.offsetHeight-objPanel.offsetHeight)/2)+"px";}else if(strTop!=""){objPanel.style.top=strTop;}
	if(strLeft=="center"){objPanel.style.left=getElementLeft(objParent)+Math.round((objParent.offsetWidth-objPanel.offsetWidth)/2)+"px";}else if(strLeft!=""){objPanel.style.left=strLeft;}
	if(bolModal){
		objModal=document.getElementById("sx_panel_modal_"+id);
		objModal.style.top=getElementTop(objParent)+"px";
		objModal.style.left=getElementLeft(objParent)+"px";
	}
	if(bolHidden){
		objPanel.style.display="none";objPanel.style.visibility="visible";
	}
	if(bolFirst){
		if(bolOpen && bolModal){objModal.style.visibility="visible";}else{objModal.style.display="none";objModal.style.visibility="visible";}
		if(bolOpen){objPanel.style.visibility="visible";}else{objPanel.style.display="none";objPanel.style.visibility="visible";}
	}
}

function sx_panel_close(id){
	var objPanel=document.getElementById("sx_panel_"+id);
	var objModal=document.getElementById("sx_panel_modal_"+id);
	objPanel.style.display="none";
	if(objModal!=undefined){objModal.style.display="none";}
}

function sx_panel_open(id){
	var objPanel=document.getElementById("sx_panel_"+id);
	var objModal=document.getElementById("sx_panel_modal_"+id);
	objPanel.style.display="block";
	if(objModal!=undefined){objModal.style.display="block";}
}