
function $(a) {
  return document.getElementById?document.getElementById(a):null;
}

var impeach_dialog = {
	showImpeach:function(param) {
		document.getElementById('notKnow1').style.visibility = "hidden"
		this.screenDark();
		$('impeachDialog').style.left = (document.documentElement.clientWidth - parseInt($('impeachDialog').style.width))/2 + 'px';
		$('impeachDialog').style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - parseInt($('impeachDialog').style.height))/2 + 'px';
		this.showImpeachDialog();
		// impeach
		var tModule = 'ware';
		var tAction = 'explain';
		var tWidth = 416;
		var tHeight = 230;					
		$('ifImpeach').width = tWidth;
		$('impeachDialog').style.width = tWidth + 'px';
		$('impeachDialog').style.height = tHeight + 'px';	
		document.postImpeach.module.value = tModule;
		document.postImpeach.action.value = tAction;	
		$('postImpeach').target = "ifImpeach";
		$('postImpeach').submit();
	},screenDark:function() {
		
		if( $('screen') != null ){
			var screen=$('screen');
			screen.style.display="block";
		}
		if(! screen){
			var screen=document.createElement("div");
			document.body.appendChild(screen);			
		}	
		screen.id = "screen";
		screen.style.cssText = "position:absolute; left:0px; top:0px; background-color:#000000";
		screen.style.width = document.body.scrollWidth + "px";
		screen.style.height = document.body.scrollHeight + "px";
		$('screen').onclick = function(){
			impeach_dialog.closeImpeach();
		}
		if (document.all){
			screen.style.filter = "alpha(opacity:20)";
		} else {
			screen.style.MozOpacity = ".2";
		}
	},showImpeachDialog:function(){
		$('impeachDialog').style.display = "block";
	},closeImpeach:function(){
		$('impeachDialog').style.display = "none";
		$('screen').style.display = "none";
	}
};

/*function check(){
	var content = document.impeach.content.value;
	if (content == "")
	{
		alert("錯誤：補充說明不能為空！");
		return false;
	}
}*/
