<!--
function getFront(mainStr, searchStr) {
	var foundOffset = mainStr.indexOf(searchStr);
	if (foundOffset == -1) {return null;}
	mainStr.substring(0, foundOffset);
	return mainStr.substring(0, foundOffset);
}

function getEnd (mainStr, searchStr) {
	var foundOffset = mainStr.indexOf(searchStr);
	if (foundOffset == -1) {return null;}
	return mainStr.substring(foundOffset + searchStr.length, mainStr.length);	
}

function replaceString (mainStr, searchStr, replaceStr){	
	var front = getFront(mainStr, searchStr);
	var end = getEnd(mainStr, searchStr);
	if ((front != null) && (end != null)){
		return front + replaceStr + end;
	}
	return null;
}

function getFileName(strPath){
	inicio = strPath.lastIndexOf("\\") + 1;
	fim = strPath.length;
	return strPath.substring(inicio, fim);
}

function MakeArray(n) {
	this.length = n;
	for (var i=1;i<=n;i++) {
		this[i] = null;
	}
	return this;
}

function ValidaVideo (form) {

	//if (form.Video.value.indexOf(form.codigo.value + ".wmv") == -1) {
	//	alert('O arquivo de vídeo está com nome/formato incorreto.');
	//	form.Video.focus();
	//	return false;
	//}

	if (form.FotoVideo.value == '') {
		alert('Selecione a foto do vídeo.');
		form.FotoVideo.focus();
		return false;
	}		
		
	if (form.FotoVideo.value.indexOf(form.codigo.value + "_v.jpg") == -1) {
		alert('A foto do Vídeo está com o nome/formato incorreto.');
		form.Video.focus();
		return false;
	}
	
	return true;	
}

function isImage(strFile){
	if (strFile != ''){
		strFile = strFile.toUpperCase();
		return ((strFile.indexOf('.BMP') > -1) || (strFile.indexOf('.JPG') > -1) || (strFile.indexOf('.JPEG') > -1) || (strFile.indexOf('.GIF') > -1));
	}else{
		return true;		
	}
}
//-->
