
var cf_agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_ie     = ((cf_agt.indexOf("msie") != -1) && (cf_agt.indexOf("opera") == -1));
var is_ie6    = (is_ie && (is_major == 4) && (cf_agt.indexOf("msie 6.")!=-1) );

var posLeftClosed = '';
var posLeftOpen = '';

//alert(document.body.clientWidth);
if ((document.body.clientWidth + 0) < 1064) {
	posLeftClosed = '860px';
	posLeftOpen = '669px';
} else {
	//var numwidth = 860 + (((document.body.clientWidth+0) - 1064)/2 );
	var numwidth = 860;
	//var numwidth2 = 669 + (((document.body.clientWidth+0) - 1064)/2 );
	var numwidth2 = 669;
	posLeftClosed = numwidth + 'px';
	posLeftOpen = numwidth2 + 'px';
}

var str='';
str+='<style type="text\/css">';
str+='#KPI_CF {';
str+='	position: absolute;	';
str+='	margin:0px 0pt 0px 0px;';
str+='  text-align: left;';
str+='  left: ' + posLeftClosed + ';';
str+='  top: 133px;';
str+='  z-index: 10004;';
if(!is_ie6){
	// Fix for IE6
    str+='	height: 43px;';
}
str+='}';
str+='<\/style>';
str+='<div id="KPI_CF">';
str+='<div id="rightWidget">';
str+='<\/div>';
str+='<\/div>';
str+='<scr' + 'ipt type="text\/javascript">';
str+='function setFlashSize_right(flashFile){';
str+='	if (flashFile == \'unavailable\') {';
str+='		this.f=document.getElementById("KPI_CF"); ';
str+='		this.f.style.height= "262px"; ';
str+='      this.f.style.left= "' + posLeftOpen + '";';
str+='      this.f.style.top= "132px";';

	str+='	this.f.style.width= "334px"; ';

str+='	} else {';
str+='		this.f=document.getElementById("KPI_CF"); ';
str+='		this.f.style.height= "262px";';
str+='      this.f.style.left= "' + posLeftOpen + '";';
str+='      this.f.style.top= "132px";';

	// Fix for IE6 that requires width not be set
	str+='	this.f.style.width= "334px"; ';

str+='	}';
str+='}';
str+='function setFlashSize_right_close(){';
str+='	this.f=document.getElementById("KPI_CF"); ';
str+='	this.f.style.height= "43px"; ';
str+='  this.f.style.left= "' + posLeftClosed + '";';
str+='      this.f.style.top= "133px";';

	// Fix for IE6 that requires width not be set
	str+='	this.f.style.width= "137px"; ';

str+='}';
str+='function channelfinderjs(clientid,zip){';
str+='  setFlashSize_right("Unavailable"); ';
str+='}';
str+='var so = new SWFObject("http:\/\/bbca.channelfinder.net\/swf\/cf_bbca_widget_expand.swf", "channelfinder", "100%", "100%", "9", "#FFFFFF");';
str+='	so.addParam("quality", "high");';
str+='	so.addParam("wmode", "transparent");';
str+='	so.addParam("allowscriptaccess","always");';
str+='	so.addParam("salign", VALUE="B");';
str+='	so.addParam("scale", VALUE="noscale");';
str+='	so.addParam("bgcolor","#FFFFFF");';
str+='	so.write("KPI_CF");';
str+='		this.f=document.getElementById("KPI_CF"); ';
str+='		this.f.style.height= "43px"; ';
	// Fix for IE6 that requires width not be set
	str+='	this.f.style.width= "137px"; ';
str+='<\/scr' + 'ipt>';
document.write(str);

