function getBrand(){
	var brand = getParameter(window.location.href,"brand");
	if (brand == "") {
      brand = "cadillac";
    }
	brand = brand.toLowerCase();
	return brand;
}

function printFAQ(){
	window.open("/vc/bluetooth/xml/"+getBrand()+"/FAQ.html");	
}

function printPhones(serviceProviderName){
	var brand = getBrand();
	var serviceProviderPage = "allProviders.jsp?brand="+brand;
	if (serviceProviderName == "all")
		serviceProviderPage = "allProviders.jsp?brand="+brand;
	else
		serviceProviderPage = serviceProviderName+".jsp?brand="+brand;
	window.open("/vc/bluetooth/"+serviceProviderPage);	
}

var sectionPrint;
var contentPrint;

function printSection (titleS, contentS){
	sectionPrint = titleS;
	contentPrint = contentS;
	
	var brand = getBrand();
	
	contentS = contentS.split("</font>").join("");
	contentS = contentS.split("</FONT>").join("");
	contentS = contentS.split("<font face='GM Sans Regular' size='12pt'>").join("");
	contentS = contentS.split("<font face='Verdana2' size='10pt'>").join("");
	contentS = contentS.split("<FONT FACE='Verdana2' SIZE='10' COLOR='#000000' LETTERSPACING='0' KERNING='0'>").join("");
	contentS = contentS.split("<FONT FACE='GM Sans Regular' SIZE='12'>").join("");
	contentS = contentS.split("<FONT FACE='GM Sans Regular' SIZE='12' COLOR='#000000' LETTERSPACING='0' KERNING='0'>").join("");		
	contentS = contentS.split("<font size='12'>").join("");
	contentS = contentS.split("<FONT FACE='Times New Roman' SIZE='12' COLOR='#000000' LETTERSPACING='0' KERNING='0'>").join("");
	contentS = contentS.split("< br/>").join("");
	contentS = contentS.split("<li/>").join("");
	contentS = contentS.split("<FONT FACE='Times New Roman'>").join("");
	contentS = contentS.split("<LI></LI>").join("");
	contentS = contentS.split("<p>").join("");
	contentS = contentS.split("<p align='left'>").join("");
	contentS = contentS.split("<P ALIGN='LEFT'>").join("");
	contentS = contentS.split("</b>").join("</b><br />");
	contentS = contentS.split("<br /><b>").join("<b>");
	contentS = contentS.split("<b>").join("<br /><b>");
	contentS = contentS.split("</p>").join("<br />");
	contentS = contentS.split("</P>").join("<br />");
	contentS = contentS.split("<font face='GG Superscript'>").join("");
	contentS = contentS.split("<FONT FACE='GG Superscript'>").join("");
	
	/*var url = "/vc/bluetooth/printSection.jsp";
	url = addParameter(url ,'sectionName',titleS.split("&").join(escape("&")));
	url = addParameter(url ,'sectionContent',contentS.split("&").join(escape("&")).split("#").join(escape("#")));

	window.open(url);*/
	document.getElementById("sectionName").value = titleS;
	document.getElementById("sectionContent").value = contentS;
	document.getElementById("brandName").value = brand;
	document.getElementById("frmPrint").submit();
}