
function getValue(varname)
{
  // First, we load the URL into a variable
  var url = window.location.href;

  // Next, split the url by the ?
  var qparts = url.split("?");

  // Check that there is a querystring, return "" if not
  if (qparts.length == 0)
  {
    return "";
  }

  // Then find the querystring, everything after the ?
  var query = qparts[1];

  // Split the query string into variables (separates by &s)
  var vars = query.split("&");

  // Initialize the value with "" as default
  var value = "";

  // Iterate through vars, checking each one for varname
  for (i=0;i<vars.length;i++)
  {
    // Split the variable by =, which splits name and value
    var parts = vars[i].split("=");
    
    // Check if the correct variable
    if (parts[0] == varname)
    {
      // Load value into variable
      value = parts[1];

      // End the loop
      break;
    }
  }
  
  // Convert escape code
  value = unescape(value);

  // Convert "+"s to " "s
  value.replace(/\+/g," ");

  // Return the value
  return value;
}



if (getValue("bcpid")!="") {
	var xPlayer = getValue("bcpid");
};
if (getValue("bclid")!="") {
	var xLineup = getValue("bclid");
};
if (getValue("bctid")!="") {
	var xTitle = getValue("bctid");
};



function RunFoo()
{

if (screen.height<=768) {
	var screenH = 768;
} else {
	var screenH = screen.height;
}


if (parseInt(navigator.appVersion)>3) {
	if (navigator.appName=="Netscape") {
		var winH = window.innerHeight;
	}
	if (navigator.appName.indexOf("Microsoft")!=-1) {
		var winH = document.body.offsetHeight;
	}
}


	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" height="'+screenH+'" id="flashObj" align="middle">\n');
	document.write('<param name="allowScriptAccess" value="always" />\n');
	document.write('<param name="movie" value="theavenue.swf" />\n');
	document.write('<param name="FlashVars" value="winH='+winH+'&zPlayer='+xPlayer+'&zLineup='+xLineup+'&zTitle='+xTitle+'">\n');
	document.write('<param name="quality" value="high" />\n');
	document.write('<param name="scale" value="noscale" />\n');
	document.write('<param name="salign" value="lt" />\n');
	document.write('<param name="bgcolor" value="#000000" />\n');
	document.write('<embed src="theavenue.swf" FlashVars="winH='+winH+'&zPlayer='+xPlayer+'&zLineup='+xLineup+'&zTitle='+xTitle+'" quality="high" scale="noscale" salign="lt" bgcolor="#000000" width="100%" height="'+screenH+'" name="flashObj" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
	document.write('</object>\n');

}








