function makeWindow(choose_window, H, W, X, Y, str){
	X=(X)?X:"320";
	Y=(Y)?Y:"200";
	
	switch(choose_window){
		case "REGISTER" : var newWindow = window.open('hawk_1/register/register.php' + str, 'Online_Registration', 'HEIGHT='+H+', WIDTH='+W+', menubar=0, toolbar=0, left='+X+', top='+Y+', scrollbars=Yes'); newWindow.focus(); void(0); break;
		case "LOGIN" : var newWindow = window.open('hawk_1/login/login.php' + str, 'Online_Login', 'HEIGHT='+H+', WIDTH='+W+', menubar=0, toolbar=0, left='+X+', top='+Y+', scrollbars=Yes'); newWindow.focus(); void(0); break;
		case "ADMIN" : var newWindow = window.open('hawk_1/admin/admin_envelope.php' + str, 'Online_Registration', 'HEIGHT='+H+', WIDTH='+W+', menubar=0, toolbar=0, left='+X+', top='+Y+', scrollbars=Yes'); newWindow.focus(); void(0); break;
		case "EDIT_REPLY" : var newWindow = window.open('hawk1/blog/edit_reply.php' + str, 'Edit_Reply', 'HEIGHT='+H+', WIDTH='+W+', menubar=0, toolbar=0, left='+X+', top='+Y+', scrollbars=Yes'); newWindow.focus(); void(0); break;
	}
}

function closeWIndow(){
	if(newWindow){
		newWindow.close();
		newWindow = null;
	}

}

function addComplaint(){
	var v_complaint = document.getElementById('complaint').value;	
	var v_description = document.getElementById('description').value;
	var v_union = v_complaint + ' (' + v_description + ') ';
	var v_TabComplaints = document.getElementById('TabComplaints').value;	
	
	document.getElementById('TabComplaints').value = (v_TabComplaints)? v_TabComplaints + '\r' + v_union : v_union;
	document.getElementById('complaint').value = '';	
	document.getElementById('description').value = '';
}

function addExamination(){
	var v_examination = document.getElementById('examination').value;	
	var v_examination_remark = document.getElementById('examination_remark').value;
	var v_union = v_examination + ' (' + v_examination_remark + ') ';
	var v_TabExamination = document.getElementById('TabExamination').value;	
	
	document.getElementById('TabExamination').value = (v_TabExamination)? v_TabExamination + '\r' + v_union : v_union;
	document.getElementById('examination').value = '';	
	document.getElementById('examination_remark').value = '';
}

function addDiagnosis(){
	var v_diagnosis = document.getElementById('diagnosis').value;	
	var v_union = v_diagnosis;
	var v_TabDiagnosis = document.getElementById('TabDiagnosis').value;	
	
	document.getElementById('TabDiagnosis').value = (v_TabDiagnosis)? v_TabDiagnosis + '\r' + v_union : v_union;
	document.getElementById('diagnosis').value = '';	
}

function addInvestigations(){
	var v_investigation = document.getElementById('investigation').value;	
	var v_union = v_investigation;
	var v_TabInvestigation = document.getElementById('TabInvestigation').value;	
	
	document.getElementById('TabInvestigation').value = (v_TabInvestigation)? v_TabInvestigation + '\r' + v_union : v_union;
	document.getElementById('investigation').value = '';	
}