// -------------------------------------------------------------------------- \\
// Valida E-Mail
function isEmail ( iCampo, iNomeCampo ) {
	var str	= iCampo.value;
	var r1	= new RegExp( "(@.*@)|(\\.\\.)|(@\\.)|(^\\.)" );
	var r2	= new RegExp( "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$" );
	if ( ( !r1.test( str ) && r2.test( str ) ) ) {
		return ( true );
	} else {
		iCampo.focus();
		alert( iNomeCampo + " inválido!" );
		return ( false );
	}
}
// -------------------------------------------------------------------------- \\
function isVasio ( iCampo, iNomeCampo ) {
	if ( iCampo.value == '' ) {
		iCampo.focus();
		alert( iNomeCampo + " inválido!" );
		return ( true );
	} else {
		return ( false );
	}
}
// -------------------------------------------------------------------------- \\
// Abre popup comum
var intPopUp = false;
function popUp ( strURL, intWidth, intHeight ) {
	if ( intPopUp ) {
		objPopUp.close();
	} else {
		intPopUp = !intPopUp;
	}
	objPopUp = open( strURL, 'popUpWin', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbar=no, resizable=no, width=' + intWidth + ', height=' + intHeight + ', left=10, top=10' );
}
// -------------------------------------------------------------------------- \\
// Função pra ampliar imagem em PopUp
function abrePopImg ( strURLImg, strTitulo ) {
	var objJanela	= window.open( '', '_' + parseInt( Math.random() * 666 ) + '_', 'statusbar=0, menubar=0, width=1, height=1, left=0, top=0, scrollbars=0' );
	var strHTML	= '';
		strHTML += '<HTML>\n';
		strHTML += '<HEAD>\n';
		strHTML += '<TITLE>' + strTitulo + '</TITLE>\n';
		strHTML += '<style type="text/css">body { margin: 0px; }</style>\n';
		strHTML += '<script language="JavaScript">\n';
		strHTML += 'function redimencionar () {\n';
		strHTML += '	var intW = document.images[0].width;\n';
		strHTML += '	var intH = document.images[0].height;\n';
		strHTML += '	var strTemScroll = 0;\n';
		strHTML += '	if ( intW > screen.width ) {\n';
		strHTML += '		intW			= ( screen.width );\n';
		strHTML += '		var intPx		= 0;\n';
		strHTML += '		strTemScroll	= 1;\n';
		strHTML += '	} else {\n';
		strHTML += '		var intPx = ( ( screen.width  / 2 ) - ( intW / 2 ) ) - 5;\n';
		strHTML += '	}\n';
		strHTML += '	if ( intH > screen.height ) {\n';
		strHTML += '		intH			= ( screen.height  - 26 );\n';
		strHTML += '		var intPy		= 0;\n';
		strHTML += '		strTemScroll	= 1;\n';
		strHTML += '	} else {\n';
		strHTML += '		var intPy = ( ( screen.height / 2 ) - ( intH / 2 ) ) - 10;\n';
		strHTML += '	}\n';
		strHTML += '	if ( strTemScroll == 1 ) {\n';
		strHTML += '		document.body.scroll = "yes";\n';
		strHTML += '		if ( ( intW + 28 ) <= screen.width ) {\n';
		strHTML += '			intW	+= 28;\n';
		strHTML += '			intPx	-= 11;\n';
		strHTML += '		}\n';
		strHTML += '	}\n';
		strHTML += '	window.moveTo( intPx, intPy );\n';
		strHTML += '	window.resizeTo( intW, intH );\n';
		strHTML += '};\n';
		strHTML += 'var inter = setInterval( function () {\n';
		strHTML += '	redimencionar();\n';
		strHTML += '}, 1000 );\n';
		strHTML += '</script>\n';
		strHTML += '</HEAD>\n';
		strHTML += '<BODY>\n';
		strHTML += '<IMG SRC="' + strURLImg + '" ALT="' + strTitulo + '">\n';
		strHTML += '</BODY>\n';
		strHTML += '</HTML>\n';
		strHTML += '<!-- //--Zoqmq--\\\\ -->';
	objJanela.document.write( strHTML );
}
// -------------------------------------------------------------------------- \\
// 
var objRadioPop = new Object();
function radioAbre ( intMusicaId ) {
	var booAbre = true;
	try {
		if ( window.objRadioPop.booRadioPopAberto ) {
			booAbre = false;
		} else {
			booAbre = true;
		}
	}
	catch ( objE ) {
		booAbre = true;
	}
	if ( booAbre ) {
		if ( intMusicaId == undefined || intMusicaId == 0 || intMusicaId == '' ) {
			intMusicaId = '0';
		}
		objRadioPop = window.open( "radio_pop.php?musicaId=" + intMusicaId, "objRadioPop", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbar=no, resizable=no, width=327, height=254, left=10, top=10" );
	}
}
// -------------------------------------------------------------------------- \\
//--Zoqmq--\\