function popup(width,height){
	window.open("", "popUp", "resizable=yes,scrollbars=yes,toolbar=no,width="+width+",height="+height+"");
}

var ap_instances = new Array();

function ap_stopAll(playerID) {
	for(var i = 0;i<ap_instances.length;i++) {
		try {
			if(ap_instances[i] != playerID) document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 1);
			else document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 0);
		} catch( errorObject ) {
			// stop any errors
		}
	}
}

function ap_registerPlayers() {
	var objectID;
	var objectTags = document.getElementsByTagName("object");
	for(var i=0;i<objectTags.length;i++) {
		objectID = objectTags[i].id;
		if(objectID.indexOf("audioplayer") == 0) {
			ap_instances[i] = objectID.substring(11, objectID.length);
		}
	}
}

var ap_clearID = setInterval( ap_registerPlayers, 100 );

function adjustDivs(firstID,secondID,firstPadding,secondPadding,firstIDset,secondIDset)
{
	var fHeight = xHeight(firstID);
	var fHeightAdd = (firstPadding);
	var fHeightNew = (parseInt(fHeight) + parseInt(fHeightAdd));
	var sHeight = xHeight(secondID);
	var sHeightAdd = (secondPadding);
	var sHeightNew = (parseInt(sHeight) + parseInt(sHeightAdd));
	var maxHeight = Math.max(fHeightNew,sHeightNew);
	xHeight(firstIDset, maxHeight);
	xHeight(secondIDset, maxHeight);
}