function writeViewMenuPrefix( pIdprefix, pLabel, pLabeltype, pLabelwidth, pMaxcount, pDisplayview ) {
	//Set defaults
	var vLabeltype = (pLabeltype == undefined || pLabeltype == null) ? "tag" : pLabeltype;
	var vLabelwidth = (pLabelwidth == undefined || pLabelwidth == null || pLabelwidth < 100) ? 190 : pLabelwidth;
	var vMaxcount = (pMaxcount  == undefined || pMaxcount  == null || pMaxcount  < 1) ? 5 : pMaxcount;	
	var vDisplayview = (pDisplayview == undefined || pDisplayview == null || pDisplayview > 0) ? true : pDisplayview;
	//Set Constants
	var cnst_textbgcolor = 'background-color: #4B4C4D; ';
	var cnst_tagstyle = 'style="' + cnst_textbgcolor + 'height:19px; width:';
	var cnst_iconsuffix = 'Icon" style="width: 15px; height: 19px; background-color: #DB4600; font-weight: bold; font-size: 9pt; color: white; font-face: arial,san-serif; text-align: center;">&nbsp;&gt;&nbsp;</span>';
//	var cnst_tagimage = '<img src="/images/tagarrow.gif/$file/tagarrow.gif" border="0" alt="->" align="bottom" width="15" height="19">';
	var cnst_labeltagstyle = 'style="' + cnst_textbgcolor + 'font-size: 9pt; font-weight: bold; color: white; vertical-align: top;';
	var cnst_labelspacersuffix = 'TextSpacer" style="width: 8px; ' + cnst_textbgcolor + '">&nbsp;</span>'; //&nsp; added for Mozilla
	var cnst_labeltextstyle = 'style="font-weight: bold; color: black; height:16px; vertical-align: middle;';
	var cnst_listtstyle = 'style="font-size:8pt; font-family:Arial,san-serif; ';
	var cnst_selectstyle = cnst_listtstyle + " width:";
	var cnst_selectprefix = "<select id=viewMenu size=";
	var cnst_onChangeSameWin = ' onChange="goToSelectedURL(this);" ';
	var cnst_onChangeNewWin = ' onChange="goToSelectedURLNewWindow(this);" ';
	var cnst_spanbegin = '<span id="';
	var cnst_spanend = "</span>";
	var cnst_stylebegin = 'style="';
	var cnst_quote = '"';
	var cnst_quoteend = '" ';
	var cnst_px = "px;";
	
	var spanbegin = cnst_spanbegin + pIdprefix;
	document.writeln(spanbegin + cnst_quote + ">");
	if (vLabeltype == "text") {
		document.write(spanbegin + "Label" + cnst_quoteend + cnst_labeltextstyle + cnst_quote + ">");
		document.write(pLabel);
		document.writeln(cnst_spanend);
		document.writeln("<br>");
	} else {
		document.writeln(spanbegin + "Tag" + cnst_quoteend + cnst_tagstyle + vLabelwidth + ";" + cnst_quote + ">");
		document.writeln(spanbegin + cnst_iconsuffix );
		document.writeln(spanbegin + cnst_labelspacersuffix);
		document.write(spanbegin + "Label" + cnst_quoteend + cnst_labeltagstyle + cnst_quote + ">");
		document.write(pLabel);
		document.writeln(cnst_spanend);
		document.writeln(cnst_spanend)
		document.writeln("<br>");
	}
	if (vDisplayview) { 
		document.writeln("<br>");
		document.writeln(spanbegin + "Menu" + cnst_quoteend + ">");
		document.write(cnst_selectprefix + vMaxcount + cnst_onChangeNewWin );
		document.writeln(cnst_selectstyle + (vLabelwidth - 5) + cnst_px + cnst_quoteend + ">");
	} else {
		document.writeln(cnst_spanend);
	}
	return (true);
}
function writeViewMenuSuffix( pViewAllUrl ) {
	var cnst_vwallend = '<img src="/images/viewall.gif/$file/viewall.gif" alt="View All" width="86" height="18"></a><br>&nbsp;<br>';
	var cnst_spanend = "</span>";
	document.writeln("&nbsp;<br>");
	if (pViewAllUrl != "") {
		document.write('<a href="' + pViewAllUrl + '">');
		document.writeln(cnst_vwallend);
	}
	document.writeln(cnst_spanend);
	document.writeln(cnst_spanend);
	return (true);
}

