var monthArray = new Array();
monthArray['Jan'] = "January";
monthArray['Feb'] = "February";
monthArray['Mar'] = "March";
monthArray['Apr'] = "April";
monthArray['May'] = "May";
monthArray['Jun'] = "June";
monthArray['une'] = "June";
monthArray['Jul'] = "July";
monthArray['Aug'] = "August";
monthArray['Sept'] = "September";
monthArray['Oct'] = "October";
monthArray['Nov'] = "November";
monthArray['Dec'] = "Devember";

function openWindow(anchor, options)
{
	var args = '';

	if (typeof(options) == 'undefined')
	{
		var options = new Object();
	}

	if (typeof(options.name) == 'undefined')
	{
		options.name = 'win' + Math.round(Math.random()*100000);
	}

	if (typeof(options.height) != 'undefined' && typeof(options.fullscreen) == 'undefined')
	{
		args += "height=" + options.height + ",";
	}

	if (typeof(options.width) != 'undefined' && typeof(options.fullscreen) == 'undefined')
	{
		args += "width=" + options.width + ",";
	}

	if (typeof(options.fullscreen) != 'undefined')
	{
		args += "width=" + screen.availWidth + ",";
		args += "height=" + screen.availHeight + ",";
	}

	if (typeof(options.center) == 'undefined')
	{
		options.x = 0;
		options.y = 0;
		args += "screenx=" + options.x + ",";
		args += "screeny=" + options.y + ",";
		args += "left=" + options.x + ",";
		args += "top=" + options.y + ",";
	}

	if (typeof(options.center) != 'undefined' && typeof(options.fullscreen) == 'undefined')
	{
		options.y=Math.floor((screen.availHeight-(options.height || screen.height))/2) - (screen.height-screen.availHeight);
		options.x=Math.floor((screen.availWidth-(options.width || screen.width))/2)-(screen.width-screen.availWidth);
		args += "screenx=" + options.x + ",";
		args += "screeny=" + options.y + ",";
		args += "left=" + options.x + ",";
		args += "top=" + options.y + ",";
	}

	if (typeof(options.scrollbars) != 'undefined')
	{
		args += "scrollbars=1,";
	}
	if (typeof(options.menubar) != 'undefined')
	{
		args += "menubar=1,";
	}
	if (typeof(options.locationbar) != 'undefined')
	{
		args += "location=1,";
	}
	if (typeof(options.resizable) != 'undefined')
	{
		args += "resizable=1,";
	}

	// alert(args);
	var win = window.open(anchor, options.name, args);
	return false;
}


function podcastPlayer(divname, playerid, soundfile, width, height, autostart)
{
	var so = new SWFObject("/flash/podcast/audio-player/player.swf", divname, width, height, "8", "#ffffff");

	if (typeof autostart == 'undefined' ) autostart = "no";

	// alert(autostart);
	so.addParam("quality", "high");
	so.addParam("wmode", "transparent");
	so.addParam("menu", "false");
	so.addParam("movie", "/flash/podcast/audio-player/player.swf");
	// var flashVarString= "playerID=" + playerid + "&amp;soundFile=" + soundfile ;
	var flashVarString= "playerID=" + playerid + "&amp;soundFile=" + soundfile + "&amp;autostart=" + autostart;
	// alert(flashVarString);
	so.addParam("FlashVars", flashVarString);
	// so.addParam("FlashVars", "playerID=4&amp;soundFile=/collateral/podcast/casestudy/Cbeyond.mp3");
	so.write(divname);
}

function prepareDiggThis(title, url)
{
	// alert("Title is: " + $("h1:first").text());
	alert("Title is: " + title);
	alert("URL is: " + url);
}

