// global click container setup
if (tekoglobal == null) {
	var tekoglobal = new Array();
}
tekoglobal[bfss_arg] = bfss_linkArray;

// browser check
var ua,an,ie,mac,win,ns,ns6,ge;
ua=navigator.userAgent;
an=navigator.appName;
ie=ua.indexOf('MSIE')>=0;
mac=ua.indexOf('Mac')>=0;
win=ua.indexOf('Windows')>=0;
unx=ua.indexOf('Unix')>=0;
ns=an.indexOf('Netscape')>=0;
ns6=ua.indexOf('Netscape6')>=0;
ge=ua.indexOf('Gecko')>=0;

//clickthrough handling
function bfss_click(command,args,id) {
	c = command.substring(0,6);
	if (c == "banner") {
		bfss_doClick(tekoglobal[id][0]);
	} else {
		return false;
	}
}



function bfss_doGetURL(x,id) {
 	bfss_doClick(tekoglobal[id][x]);
}

function bfss_doClick(x) {
 if (x.substring(0,4) !== "http"){
  tmp = bfss_clickthrough.substring(12,bfss_clickthrough.length-8);
  top.location= bfss_clickthrough.substring(12,bfss_clickthrough.length-8)
 } else {
  if (bfss_target == '_top') {
    top.location=x;
   } else {
    window.open(x);
   }
 }
} 

// flash writing
if (ie&&win) {
 document.write('<script language=vbscript\>\non error resume next\nSub ' + bfss_id + '_FSCommand(ByVal command, ByVal args)\ncall bfss_click(command, args,' + bfss_arg + ')\nend sub</script\>\n');
 document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id=' + bfss_id + ' width='+bfss_width+' height='+bfss_height+'><param name=movie value="'+bfss_flashfile+'"><param name=quality value=high><param name=wmode value=opaque><param name=loop value=true>');
 document.write('<a href="'+bfss_URL+'"><img src="'+bfss_altimg+'" width='+bfss_width+' height='+bfss_height+' border=0></a>');
 document.write('</object>');
} else if (ns && !unx && !ns6 && !ge && navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash'] && navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin && navigator.plugins && navigator.plugins['Shockwave Flash']) {
 document.write('<embed src="'+bfss_flashfile+'" name="' + bfss_id + '" swLiveConnect=true width='+bfss_width+' height='+bfss_height+' quality=high wmode=opaque loop=true type="application/x-shockwave-flash"><noembed><a href="'+bfss_URL+'"><img src="'+bfss_altimg+'" width='+bfss_width+' height='+bfss_height+' border=0></a></noembed></embed>');
 document.write('<script>\n function ' + bfss_id + '_DoFSCommand(command,args){\n bfss_click(command,args,'+ bfss_arg + '); \n}\n</script>\n');
} else {
 document.write('<a href="'+bfss_altURL+'"><img src="'+bfss_altimg+'" width='+bfss_width+' height='+bfss_height+' border=0></a>');
};
