/* Image Rollovers */
// Functions for preloading mouseovers and mouseouts

if (document.images) {
	// OVER STATES
	DownloadOver = new Image()
	DownloadOver.src="images/common/com_btn_download-ovr.gif"
	TopOver = new Image()
	TopOver.src="images/common/com_ico_top-ovr.gif"
	PrintOver = new Image()
	PrintOver.src="images/common/com_ico_print-ovr.gif"
	Download_SiteOver = new Image()
	Download_SiteOver.src="images/common/com_ico_dl-ovr.gif"
	Launch_ChatOver = new Image()
	Launch_ChatOver.src="images/shout-outs/con_btn_launchchat-ovr.gif"
	
	// OUT STATES
	DownloadOut = new Image()
	DownloadOut.src="images/common/com_btn_download-off.gif"
	TopOut = new Image()
	TopOut.src="images/common/com_ico_top-off.gif"
	PrintOut = new Image()
	PrintOut.src="images/common/com_ico_print-off.gif"
	Download_SiteOut = new Image()
	Download_SiteOut.src="images/common/com_ico_dl-off.gif"
	Launch_ChatOut = new Image()
	Launch_ChatOut.src="images/shout-outs/con_btn_launchchat-off.gif"
}

var clicked = null

function over(whichimage){
	if (document.images){
		if (clicked != whichimage){
			document.images[whichimage].src = eval(whichimage + "Over.src")
		}
		window.status=whichimage;
	}
}

function out(whichimage){
	if (document.images){
		if (clicked != whichimage){
			document.images[whichimage].src = eval(whichimage + "Out.src")
		}
		window.status='';
	}
}


/* Popup Scripts */
function openPopup(URL, name, width, height, scrollbars){
	if (window.screen) {
		var left = (screen.width - width) / 2;															
		var top = (screen.height - height) / 2;
		var screenPosition = 'left=' + left + ',top=' + top;
	}
	thisWin = window.open(URL, name, 'width=' + width + ',height=' + height + ',toolbar=no,location=no,status=no,menubar=no,' + 'scrollbars=' + scrollbars + ',resizable=no' + ((screenPosition != '') ? ',' + screenPosition : ''));
	thisWin.focus();
}

function defaultPopup(URL, name){
	openPopup(URL, name,'600','400','yes');
}

function chatPopup(URL, name){
	openPopup(URL, name,'600','400','no');
}
