function playerPrompt(str, ID) {
	var displayText = '';
	if (str == 's') {
		displayText += 'View Player Info';
		displayText += '<iframe src="prompts/player_info_window.asp?ID=' + ID + '" id="playerinfoframe" name="playerinfoframe" width="295" height="290" frameborder="0"></iframe>';
		displayText += '<div style="text-align:center"><a href="#" id="promptclose" name="promptclose" onclick="playerPrompt(\'h\',\'\')" border=0 style="border:solid 1px DDDDDD; padding:5px" align="right" alt="Close">x</a></div>';
	}
	setPrompt(str,displayText,300,300);
}

function setPrompt(str,displayText,w,h) {
	if (str == 's') {
		var windowWidth		= getWinWidth();
		var windowHeight	= getWinHeight();
		var rightOffset		= 50;
		var bottomOffset	= 20;
		var xPos			= (windowHeight - h) / 2 - bottomOffset;
		var yPos			= (windowWidth - w) / 2 - rightOffset;	
		changeStyle('prompt', 'width', w);
		changeStyle('prompt', 'height', h);	
		changeStyle('promptcontainer', 'top', xPos);
		changeStyle('promptcontainer', 'left', yPos);
		changeStyle('prompt', 'visibility', 'visible');
	} else {
		changeStyle('prompt', 'visibility', 'hidden');
		changeStyle('prompt', 'width', 0);
		changeStyle('prompt', 'height', 0);			
	}
	changeProperty('prompt', 'innerHTML', displayText);
}

function getWinWidth() {
	var myWidth = 0
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
	} else if( document.documentElement && document.documentElement.clientWidth ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	} else if( document.body && document.body.clientWidth ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	}
	return myWidth
}

function getWinHeight() {
	var myHeight = 0
	if( typeof( window.innerHeight ) == 'number' ) {
		//Non-IE
		myHeight = window.innerHeight;
	} else if( document.documentElement && document.documentElement.clientHeight ) {
		//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && document.body.clientHeight ) {
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	}
	return myHeight
}

function changeStyle(objectID, propertyName, propertyValue){
		document.getElementById(objectID).style[propertyName] = propertyValue;
	}
	function changeProperty(objectID, propertyName, propertyValue){
		document.getElementById(objectID)[propertyName] = propertyValue;
	}
	function getStyleValue(objectID, propertyName){
		return document.getElementById(objectID).style[propertyName];
	}
	function getPropertyValue(objectID, propertyName){
		return document.getElementById(objectID)[propertyName];
	}
	
	