var msg_Number = "Please enter a number";
var msg_NumberF = "SVP indiquer un numéro";
var aDefMSColor  = new Array(3);
if(typeof(aDefMSColorWL) != 'undefined'){
	aDefMSColor[0]	= aDefMSColorWL[0];
	aDefMSColor[1]	= aDefMSColorWL[1];
	aDefMSColor[2]  = aDefMSColorWL[2];
}
else{
	aDefMSColor[0]	= "#3366FF";
	aDefMSColor[1]	= "#FFFF00";
	aDefMSColor[2]  = "#FF6666";
}

function VMStart()
{
	document.writeln('<div class="VMContainer">');
}
function VMEnd()
{
	document.writeln('</div>');
}
// ignore the insurance for now, leave 555 and 101 for testing
function bUseInsurance(Level, Text)
{
	if(Level == 3 &&
		( Text == 'Insurance' || Text == 'Assurance') ){
		if( typeof(DealerID) != 'undefined' && (DealerID == 101 || DealerID == 555) )
			return true;
		else
			return false;
	}
	else
		return true;
}

function VMAdd(Level, Link, Text, Sel_str, Options)
{
	var i_temp = 0;
	var cl_div_name = "VM" + Level;
	var cl_div_name_sd = "VM" + Level + "SelD";
	var cl_div_name_st = "VM" + Level + "SelT";
	var ln_str = "<div class=\"";
	var Sel = false;
	if(Sel_str == Text) Sel = true;
	//if( bUseInsurance(Level, Text) == false) return;
	
	if(Level == 1){
		Sel = 0;
		Link = '';
	}
	if(Sel == true)
		ln_str += cl_div_name_sd + "\">";
	else
		ln_str += cl_div_name + "\">";
	if(Link.length > 0 && Sel == false)
		ln_str += "<a href=\"" + Link + "\">";
	if(Sel == true){
		ln_str += "<table class=\"" + cl_div_name_st + "\">";
		ln_str += "<tr>";
		ln_str += "<td>";
	}
	if(Text.length > 0){
		if(typeof(Options) != 'undefined'){
			// expand-able: put the icon in the front of the text
			if(Options == 1){
			}
			// expanded
			if(Options == 2){
			}
			
		}
		ln_str += Text;
		if(Sel == true){
			ln_str += "</td><td align=right valign=center><img src=\"./Images/MenSel.gif\" /></td></tr></table>";
		}
	}
	if(Link.length > 0 && Sel == false)
		ln_str += "</a>";
	ln_str += "</div>";
	
	document.writeln(ln_str);
}
function PageTopEnd()
{
   
	document.writeln('</td><td valign=\"top\">');
}
function PageBottom()
{
	document.writeln("</td></tr></table>");
}

