function openPopup(sUrl,sName,iWidth,iHeight) {
	newWin = window.open(sUrl,sName,'width=' + (iWidth + 16) + ',height=' + (iHeight + 16) + ',status=no,toolbar=no,location=no,directories=no,menubar=no,resizable=yes,scrollbars=no');
	newWin.moveTo((screen.width-iWidth)/2,(screen.height-iHeight)/2-18);
	newWin.focus();
}

function openPopupSB(sUrl,sName,iWidth,iHeight) {
	newWin = window.open(sUrl,sName,'width=' + (iWidth + 16) + ',height=' + (iHeight + 16) + ',status=no,toolbar=no,location=no,directories=no,menubar=no,resizable=yes,scrollbars=yes');
	newWin.moveTo((screen.width-iWidth)/2,(screen.height-iHeight)/2-18);
	newWin.focus();
}

function CheckEmail(sForm,sField,sMsg) {
	oObj = eval(sForm + "." + sField);
	sEmailType = /^[a-z0-9][a-z0-9_\.-]*@[a-z0-9][a-z0-9_\.-]*\.([a-z]{2}|com|org|net|mil|gov|edu|biz|info|name)$/i;
	if (! sEmailType.test(oObj.value)) {
		window.alert(sMsg);
		oObj.focus();
		return false;
	}
	else return true;
}

function CheckAlpha(sForm,sField,sMsg) {
	oObj = eval(sForm + "." + sField);
	if (oObj.value == "") {
		oObj.focus();
		window.alert(sMsg);
		return false;
	}
	else return true;
}

function changeDetailImg(sFile) {
	document.detailImg.src = sFile;
}

function play(iId,iIdt,iIdp) {
	if (parent.mainWindow) {
		oObj = parent;
		sPath = '..';
	}
	else {
		oObj = parent.parent;
		sPath = '../..';
	}
//	oObj = parent;
	sPath = '/shop';
	if (! oObj.window.playWindow) {
		oObj.bFirstCall = true;
	}
	else {
		if (! oObj.playWindow.closed) {
			oObj.bFirstCall = false;
		}
		else {
			oObj.bFirstCall = true;
		}
	}
	if (oObj.bFirstCall == true) {
		sUrl = sPath + '/plakPlayer.php?id=' + iId + '&idt=' + iIdt + '&idp=' + iIdp;
		sWindowRef = 'plakPlay';
		iWidth = 292;
		iHeight = 482;
		oObj.playWindow = window.open(sUrl,sWindowRef,'width=' + iWidth + ',height=' + iHeight + ',status=no,toolbar=no,location=no,directories=no,menubar=no,resizable=no,scrollbars=no');
		oObj.playWindow.moveTo((screen.width-iWidth)/2,(screen.height-iHeight)/2-18);
	}
	else {
		sUrl = sPath + '/playerControl.php?id=' + iId + '&idt=' + iIdt + '&idp=' + iIdp;
		oObj.playWindow.frames['playerControl'].location= sUrl;
	}
//	oObj.playWindow.focus();
}