   function generate_code(){
	if(document.choose_code.document_type[0].checked == true){
		type = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>';
		content = '<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">';
		meta_end = '';
	}
	if(document.choose_code.document_type[1].checked == true){
		type = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n<html>';
		content = '<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1">';
		meta_end = '';
	}
	if(document.choose_code.document_type[2].checked == true){
		type = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
		content = '<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" />';
		meta_end = ' /';
	}
	if(document.choose_code.document_type[3].checked == true){
		type = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">';
		content = '<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" />';
		meta_end = ' /';
	}
	title = '<title>'+document.choose_code.title.value+'</title>';
	desc = '<meta name="description" content="'+document.choose_code.description.value+'"'+meta_end+'>';
	key = '<meta name="keywords" content="'+document.choose_code.keywords.value+'"'+meta_end+'>';
	list_code = type+'\n';
	list_code +='<head>\n';
	list_code +=title+'\n';
	list_code +=desc+'\n';
	list_code +=key+'\n';
	list_code +=content+'\n';
	list_code +='</head>\n';
	list_code +='<body>\n';
	list_code +='</body>\n';
	list_code +='</html>';
	document.code.result.value = list_code;	
}
