/*************************************************************************

		Miscellaneous functions

*************************************************************************/

function openAudioPlayer(url) {
		w = 360;
		h = 260;
		LeftPosition = (screen.width)  ? (screen.width-w)  / 2 : 200;
		TopPosition  = (screen.height) ? (screen.height-h) / 2 : 150;
		settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',resizable';

		wName = '/mediaPlayer?keyword='+url+'&type=a';
		window.open(wName, '_blank', settings);
}

function openVideoPlayer(url) {
		w = 560;
		h = 410;
		LeftPosition = (screen.width)  ? (screen.width-w)  / 2 : 200;
		TopPosition  = (screen.height) ? (screen.height-h) / 2 : 150;
		settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',resizable';

		wName = '/mediaPlayer?keyword='+url+'&type=v';
		window.open(wName, '_blank', settings);
}

function openBuylink(url) {
		if(url != 'noChange')
			window.open(url, '_blank');
}

function checkUncheckAll(CheckBoxControl) {
	if (CheckBoxControl.checked == true) {
		document.newsletterSignUp.listID[0].checked = true;
		document.newsletterSignUp.listID[1].checked = true;
		document.newsletterSignUp.listID[2].checked = true;
		document.newsletterSignUp.listID[3].checked = true;
	}
	else {
		document.newsletterSignUp.listID[0].checked = false;
		document.newsletterSignUp.listID[1].checked = false;
		document.newsletterSignUp.listID[2].checked = false;
		document.newsletterSignUp.listID[3].checked = false;
	}
}
function uncheckAlle() {
	document.newsletterSignUp.checkall.checked = false;
}

function showMsg(page) {
	w = 360;
	h = 190;
	LeftPosition = (screen.width)  ? (screen.width-w)  / 2 : 200;
	TopPosition  = (screen.height) ? (screen.height-h) / 2 : 150;
	settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition;
	
	if(page == 'success') {
		window.open('/newsletter/success','_blank', settings);
	}
	else {
		if(page == 'fail') {
			window.open('/newsletter/fail','_blank', settings);
		}
	}
}