
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 numwidth2 = 669 + (((document.body.clientWidth+0) - 1064)/2 );
	var numwidth = 859;
	var numwidth2 = 670;
	posLeftClosed = numwidth + 'px';
	posLeftOpen = numwidth2 + 'px';
}

var str='';
//str+='<style type="text\/css">';
//str+='#CF_KPI {';
//str+='	position: absolute;	';
//str+='	margin:0px 0pt 0px 0px;';
//str+='	padding:0px 0pt 0px 0px;';
//str+='  border:2px solid red;';
//str+='  text-align: right;';
//str+='  left: ' + posLeftClosed + ';';
//str+='  top: 135px;';
//str+='  z-index: 99995;';
//if(!is_ie6){
	// Fix for IE6
    //str+='	height: 40px;';
//}
//str+='}';
//str+='<\/style>';
str+='<div id="CF_KPI">';
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("CF_KPI"); ';
str+='      this.f.className= "CF-expanded";';
str+='		this.f.style.height= "247px"; ';
//str+='      this.f.style.left= "' + posLeftOpen + '";';
//str+='      this.f.style.top= "132px";';

	str+='	this.f.style.width= "198px"; ';

str+='	} else {';
str+='		this.f=document.getElementById("CF_KPI"); ';
str+='      this.f.className = "CF-expanded";';
str+='		this.f.style.height= "247px";';
//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= "198px"; ';

str+='	}';
str+='}';
str+='function setFlashSize_right_close(){';
str+='	this.f=document.getElementById("CF_KPI"); ';
str+='  this.f.className = "CF-normal";';
str+='	this.f.style.height= "38px"; ';
//str+='  this.f.style.left= "' + posLeftClosed + '";';
//str+='      this.f.style.top= "135px";';

	// Fix for IE6 that requires width not be set
	str+='	this.f.style.width= "157px"; ';

str+='}';
str+='function channelfinderjs(clientid,zip){';
str+='  setFlashSize_right("Unavailable"); ';
str+='}';
str+='var so = new SWFObject("http:\/\/bbca.channelfinder.net\/swf\/cf_bbca_v2_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("CF_KPI");';
str+='		this.f=document.getElementById("CF_KPI"); ';
str+='		this.f.style.height= "38px"; ';
str+='      this.f.className = "CF-normal";';
	// Fix for IE6 that requires width not be set
	str+='	this.f.style.width= "157px"; ';
str+='<\/scr' + 'ipt>';
document.write(str);
