
		function DownloadFile(filename1)
		{
						var w;
					var url = new String("./Video/"+filename1);
					//w = window.open(url	, 'newwin', "width=0, height=0, left=0, top=0, menubar=no, status=no, location=no, toolbar=no, scrollbars=no, resizable=yes");
					window.location.href=url;
		}
     	var rating1,rating2,rating3,flashFile;
   	rating1=0;
   	rating2=0;
   	rating3=0;
   	flashFile=1;
   
   	function doStream(sid)
   	{
   		flashFile = sid;
   		rollBack();
   	}

   	function rollBack()
   	{
   		if(flashFile==1 && rating1!=0)
   		{
   			document.imgRating.src="images/img" + rating1 + ".gif";
   			return true;
   		}
   		if(flashFile==2 && rating2!=0)
   		{
   			document.imgRating.src="images/img" + rating2 + ".gif";
   			return true;
   		}
   		if(flashFile==3 && rating3!=0)
   		{
   			document.imgRating.src="images/img" + rating3 + ".gif";
   			return true;
   		}
   		document.imgRating.src="images/img1.gif";
   	}
   	function doRate(rt)
   	{
   		document.getElementById('hiddenrate').value=rt;
   		
   	}
     	
   	function CreateAJAX()
		{
			var xmlhttp;
			try 
			{
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) 
			{
				xmlhttp = null;
			}
			if(!xmlhttp && typeof XMLHttpRequest != "undefined")
				xmlhttp = new XMLHttpRequest();
			if (!xmlhttp)
				xmlhttp = null; 
			return xmlhttp;
		}
		var xmlHTTP = CreateAJAX();

		function handleResponse() 
		{
			if(xmlHTTP.readyState == 4)
			{
				var response = xmlHTTP.responseText;
				if(response=="success")
				{
					spnRateForm.innerHTML=thank;
					rating1=0;
					rating2=0;
					rating3=0;
					rollBack();
				}
				else
				{
					//spnRateForm.innerHTML="Error occured" + spnRateForm.innerHTML;
					spnRateForm.innerHTML = response;
				}
			}
		}
		function Sucessful()
		{
			
			if(document.Form1.TextBox1.value=="")
			{
				alert("Please Enter the Name");
				document.Form1.TextBox1.focus();
				return false
			}
			if(document.Form1.TextBox2.value=="")
			{
				alert("Please Enter the Email Id");
				document.Form1.TextBox2.focus();
				return false
			}
			alert("Rate has been added sucessfully");
			document.Form1.action="VideoContestRate.aspx";
			
		}
		
