function WriteSubMenuLayerBlank( id ) {
	document.write('<div style=" position: absolute; visibility: hidden; width: 1px; z-index: 1;" id="' + id + '"></div>');
}

function WriteMenuRightTop( id, onmouseover, onmouseout, table_width ) {

	tw = table_width;

	document.write('<div class="MenuPopup" ' + 
		'onmouseover=" ' +
		onmouseover +
		'return true; " ' +

		'onmouseout=" ' + 
		onmouseout +
		'return true; " ' +

		'id="' + id + '" style="width: '+tw+'px" >');


	if ( !tw || tw == 'undefined' || tw.length < 2 ) {
		tw = 0;
	}


	if ( tw < 160 ) {
		tw = 160;
	}

	if ( tw > 250 ) {
		tw = 250;
	}

//alert(tw);

	document.write('' +
		'<table width="'+tw+'" class="MenuRight" border="0" cellpadding="0" cellspacing="0">' +
		'<tr>' +
		'<td><span></span></td>' +
		'<td class="MenuDownTL"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
		'<td class="MenuRightT"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
		'<td class="menuRightT"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
		'<td class="MenuDownTR"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
		'</tr>' +
	'');

}



function WriteMenuRightItem( id, onmouseover, onmouseout, first, child_flag, selected_flag, title, link, tool_tip ) {
	link_text1 = '<a href="' + link + '" class="MenuDown" title="' + tool_tip + '" >';
	link_text2 = '</a>';
	if ( link == '' ) {
		link_text1 = '<b>';
		link_text2 = '</b>';
	}

	text_class = 'MenuDown';
	if ( selected_flag == 1 ) {
		text_class = 'MenuDown';
		link_text1 = '<b>';
		link_text2 = '</b>';
	}

	tdl_class = 'MenuRightL';
	if ( first == 1 ) {
		tdl_class = 'MenuRightA';
	}



	if ( child_flag != 1 ) { 
		document.write(''+
			'<tr ' + 
			'onmouseover=" ' +
			onmouseover +
			' " ' +
			'onmouseout=" ' +
			onmouseout +
			' " ' +
			' >' +
			'<td class="'+tdl_class+'"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
			'<td class="MenuDown"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
			'<td class="MenuDown" width="99%">' +
			link_text1 +
			'<div class="MenuDown">' +
			title +
			'</div>' +
			link_text2 +
			'</td>' +
			'<td class="MenuDownRA"><div class="_MenuDownRA"><img src="/images/common/sp.gif" width="9" height="9" border="0" alt=""></div></td>' +
			'<td class="MenuDownR"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
			'</tr>' +
		'');

	} else {
		document.write(''+
			'<tr ' + 
			'onmouseover=" ' +
			onmouseover +
			' " ' +
			'onmouseout=" ' +
			onmouseout +
			' " ' +
			' >' +
			'<td class="'+tdl_class+'"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
			'<td class="MenuDown"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
			'<td class="MenuDown" width="99%">' +
			link_text1 +
			'<div class="MenuDown">'+
			title +
			'</div>' +
			link_text2 +
			'</td>' +
			'<td class="MenuDownRA"><div class="MenuDownRA" id="' + id + '"><img src="/images/common/sp.gif" width="9" height="9" border="0" alt="" id="image_' + id + '"></div></td>' +
			'<td class="MenuDownR"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
			'</tr>' +
		'');
	}
}


function WriteMenuRightItemSeparator(  ) {
	document.write('<tr>' +

	'<td class="MenuRightL"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
	'<td class="MenuDown"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
	'<td class="MenuDownSeparator" colspan="2"><div class="MenuDownSeparator"><img src="/images/common/sp.gif" width="9" height="1" alt=""></div></td>' +
	'<td class="MenuDownR"><img src="/images/common/sp.gif" width="9" height="1" alt=""></td>' +

	'</tr>' +
	'');
}

function WriteMenuRightBottom( ) {

	document.write('' +
		'<tr>' +
		'<td><span></span></td>' +
		'<td class="MenuDownBL"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
		'<td class="MenuDownB" colspan="2"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
		'<td class="MenuDownBR"><img src="/images/common/sp.gif" width="9" height="9" alt=""></td>' +
		'</tr></table>' +
	'');


	document.write('</div>');
}


