var bn_location_href = window.location.href;
bnShowObserver();
 
/*
If we're on an domain that uses the English language, use semi-www_en customer code,
otherwise use the international version.
*/
function getCustomerCode() {
	if ((bn_location_href.search(/^https?:\/\/[^\/]*www.semi.org\/en\//) ==-1) && 
		(bn_location_href.search(/^https?:\/\/[^\/]*www.semiconwest.org\//)== -1) &&
		(bn_location_href.search(/^https?:\/\/[^\/]*www.fpdtoday.org\//) ==-1) &&
		(bn_location_href.search(/^https?:\/\/[^\/]*www.pvgroup.org\//)==-1)  )
	{
		return "www_in";	
	}
	else 
	{
		return "www_en";
	}
}

function bnShowObserver() {	
	var cust_code = getCustomerCode();
	if (bn_location_href.indexOf("https://") == 0) {
	   baynote_tag.server = "https://semi-" + cust_code + ".baynote.net";
	} else {
	   baynote_tag.server = "http://semi-" + cust_code + ".baynote.net";
	}
	baynote_tag.customerId="semi";
	baynote_tag.code=cust_code;
	baynote_tag.type="baynoteObserver";	
	baynote_tag.show();
	
}