function ValidateVideoUploadForm(supportedFormats)
{
	var error = document.getElementById("lblError");
	var name = document.getElementById("txtVideoName");
	if(name !=null && name.value == 0)
	{
	    alert('Please enter Video name');
		//error.innerHTML = "Please enter Video name";
		return false;
	}
	var FilePath = document.getElementById("FileUploadedVideo");
	if(FilePath.value == 0)
	{
	    alert('Please select a Video to upload');
		//error.innerHTML  = 'Please select a Video to upload';
		return false;
	}
	var Terms = document.getElementById("cbTerms");
	if(!Terms.checked)
	{
	    alert('Please indicate your acceptance of the Terms of Use by checking the box');
		//error.innerHTML  = 'Please indicate your acceptance of the Terms of Use by checking the box';
		return false;
	}
	fileExtension = FilePath.value.split(".");
	//alert(supportedFormats.indexOf(fileExtension[fileExtension.length - 1]));
	if(supportedFormats.indexOf(fileExtension[fileExtension.length - 1].toLowerCase()) < 1)
	{
        alert('Fliqz supports the following video formats: '+ supportedFormats);
		//error.innerHTML  = 'Fliqz supports the following video formats: '+ supportedFormats;
		return false
	}
	//error.innerHTML = "Video uploading, Please wait...";
/*	if(IsBrowserIE())
	{
		var fso = new  ActiveXObject("Scripting.FileSystemObject");
		var filesize = fso.GetFile(FilePath.value).size/1024;
		if (filesize > parseInt(document.getElementById("hdnRequestLength").value))
		{
			error.innerHTML  = "You have attempted to upload a file that exceeds " + document.getElementById("hdnRequestLength").value/1024 + " MB limit. Please try uploading a smaller file.";
			error.innerHTML = '';
			return false;
		}
	}*/
}

function IsBrowserIE()
{
	return navigator.appName.indexOf("Microsoft") != -1;
}

function playAudio(fileName){
		so.addVariable('soundPath', fileName);		
		so.addVariable("autoPlay", "yes");
		so.write("flashPlayer");
}
function stop(){
	so.addVariable("autoPlay", "no");
	so.write("flashPlayer");
}
