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;

function openWindow(x) {
	if (target=="_top"){
		if (FitNewWinHeight[x]&&FitNewWinWidth[x]) {
			window.open(URL[x],'NewWin','height='+FitNewWinHeight[x]+',width='+FitNewWinWidth[x]);
		} else {
			top.location=URL[x];
		}
	} else {
		if (FitNewWinHeight[x]&&FitNewWinWidth[x]) {
			window.open(URL[x],'NewWin','height='+FitNewWinHeight[x]+',width='+FitNewWinWidth[x]);
		} else {
			window.open(URL[x]);
		}
	}
}

function banner_click_DoFSCommand(command, args) {
if (command == "banner_click"){
  if (target=="_top")
   {top.location=URL[1] + args;}
  else
   {window.open(URL[1] + args);}
 }
 else if (command == "banner_click2"){openWindow(2);}
 else if (command == "banner_click3"){openWindow(3);}
 else if (command == "banner_click4"){openWindow(4);}
 else if (command == "banner_click5"){openWindow(5);}
 else if (command == "banner_click6"){openWindow(6);}
 else if (command == "banner_click7"){openWindow(7);}
 else if (command == "banner_click8"){openWindow(8);}
}

if (ie&&win) {
 document.write('<script language=vbscript\>\non error resume next\nSub banner_click_FSCommand(ByVal command, ByVal args)\ncall banner_click_DoFSCommand(command, args)\nend sub</script\>\n');
 document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id=banner_click width='+width+' height='+height+'><param name=movie value="'+flashfile+'"><param name=quality value=high><param name=wmode value=opaque><param name=loop value=true>');
 document.write('<a href="'+altURL+'" target="'+target+'"><img src="'+altimg+'" width='+width+' height='+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="'+flashfile+'" name=banner_click swLiveConnect=true width='+width+' height='+height+' quality=high wmode=opaque loop=true type="application/x-shockwave-flash"><noembed><a href="'+altURL+'" target="'+target+'"><img src="'+altimg+'" width='+width+' height='+height+' border=0></a></noembed></embed>');
} else {
 document.write('<a href="'+altURL+'" target="'+target+'"><img src="'+altimg+'" width='+width+' height='+height+' border=0></a>');
}


