var strMenu = '';
var imgPath = "";
var imgCount = 1;
var bLastMenuL1 = false;
var bSelected = false;

function startMenu(){
	strMenu = '<table width="100%" border="0" cellspacing="0" cellpadding="0">' +
				'<tr>'+
              		'<td colspan="3"><img src="' + imgPath +'images/spacer.gif" width="10" height="4"></td>'+
            	'</tr>';

}


function endMenu(){

	strMenu +='<tr>' +
				 '<td colspan="3" height="10"><img src="' + imgPath +'images/spacer.gif" width="10" height="25"></td>' +
			'</tr>' +
			'</table>';
	document.write(strMenu);
}

function addMenuHead(strHead){

strMenu += '<tr>' +
				 '<td colspan="3" class="left_menuH_cell">'+ strHead +'</td>' +
			'</tr>' +
		 	'<tr>' +
                 '<td colspan="3"><img src="' + imgPath +'images/spacer.gif" width="10" height="4"></td>'+
			'</tr>'


}
function addMenuL1(strTitle,strLink,bSelected){
	
if(!bSelected){
	strMenu += '<tr>'+
				'<td height="20" width="10" valign="top">&nbsp;</td>'+
				'<td colspan="2" class="left_menuL1_cell" ><a href="'+ strLink +'" class="leftmenuL1_text" >' + strTitle + '</a></td>'+
			'</tr>' +
			'<tr>' +
				'<td colspan="3"><img src="' + imgPath +'images/dotline.gif"></td>' +
			'</tr>';
	}else{
	strMenu += '<tr>'+
				'<td height="20" width="10" valign="top">&nbsp;</td>'+
				'<td colspan="2" class="left_menuL1_cell" ><a href="'+ strLink +'" class="leftmenuL1_select" >' + strTitle + '</a></td>'+
			'</tr>' +
			'<tr>' +
				'<td colspan="3"><img src="' + imgPath +'images/dotline.gif"></td>' +
			'</tr>';
	}
imgCount++;
}

function addMenuL2(strTitle,strLink,bLastMenuL1){

if(!bLastMenuL1){

	strMenu +='<tr>'+ 
				'<td height="20" width="10">&nbsp;</td>'+
                '<td width="15" valign="top" align="center"><img name="bul'+imgCount+'" src="' + imgPath +'images/arrow_red.gif" ></td>'+
                '<td class="left_menuL2_cell" ><A href="'+ strLink +'" class="leftmenuL2_text" onMouseOver="mouseOver(\'bul'+ imgCount +'\',\'images/arrow_red_over.gif\')" onMouseOut="mouseOut(\'bul'+ imgCount +'\',\'images/arrow_red.gif\')">'+ strTitle +'</A></td>'+
			'</tr>';
			  
	}else{
	strMenu +='<tr>'+ 
				'<td height="20" width="10">&nbsp;</td>'+
                '<td width="15" valign="top"><img name="bul'+imgCount+'" src="' + imgPath +'images/arrow_red.gif" ></td>'+
                '<td class="left_menuL2_cell"><a href="'+ strLink +'" class="leftmenuL2_text" onMouseOver="mouseOver(\'bul'+ imgCount +'\',\'images/arrow_red_over.gif\')" onMouseOut="mouseOut(\'bul'+ imgCount +'\',\'images/arrow_red.gif\')">'+ strTitle +'</a></td>'+
             '</tr>';
	}
	
	imgCount++;
}

function startMenuL2(){
	bLastMenuL1 = false;
	strMenu +='<tr>'+
                 '<td colspan="3"><img src="' + imgPath +'images/spacer.gif" width="10" height="4"></td>'+
              '</tr>';
}

function endMenuL2(){

strMenu += '<tr>'+
              '<td colspan="3"><img src="' + imgPath +'images/spacer.gif" width="10" height="4"></td>'+
            '</tr>'+
            '<tr>' +
                   '<td colspan="3"><img  src="' + imgPath +'images/dotline.gif" ></td>'+
            '</tr>' ;
}

function showAlert(alertVar){

alert(alertVar);

}

function mouseOver(name,image){

var rPath=imgPath + image;
	document.images[name].src = rPath;
	
}

function mouseOut(name,image){
var rPath=imgPath + image;
	document.images[name].src = rPath;

}



