function UploadVideoPage(){var d=document.getElementById('CenterPage');d.innerHTML=' ';var DATA='<FORM name="upload" ENCTYPE="multipart/form-data" ACTION="/servlet/UpLoadServlet" METHOD="POST" onsubmit="CheckUploadForm()">'+'<table width="330" height="150" border="0" cellpadding="0" cellspacing="0">'+'<tr>'+'<td width="10" height="150" valign="top"></td>'+'<td width="437" valign="top"><table width="320" height="150" border="0" align="left" cellpadding="0" cellspacing="0">'+'<tr>'+'<td height="40" colspan="6" class="uploadHeading">Upload Video </td>'+'</tr>'+'<tr>'+'<td width="110" height="15" class="videoTitle" >Video Title* </td>'+'<td width="0" height="15"></td>'+'<td width="220" height="30" colspan="4"><input name="utitle" type="text" size="40" class="UploadText" id="utitle"/></td>'+'</tr>'+'<tr>'+'<td width="81" height="15" class="videoTitle"> Duration*</td>'+'<td width="1" height="15"></td>'+'<td width="46" height="15"><input name="duration" type="text" size="6"  class="UploadText" id="duration"/></td>'+'<td width="10" height="15" align="left" valign="middle" class="UploadText"></td>'+'<td width="35" align="left" valign="middle" class="UploadText">Seconds</td>'+'<td width="133" height="30" align="center" class="UploadText">(Only numeric values) </td>'+'</tr>'+'<tr>'+'<td width="81" height="15" class="videoTitle">Discription </td>'+'<td width="1" height="15"></td>'+'<td height="15" colspan="4"><textarea name="discription" cols="30" rows="4" id="discription"></textarea class="UploadText"></td>'+'</tr>'+'<tr>'+'<td width="110" height="15" class="videoTitle">Upload  Video*</td>'+'<td width="0" height="15"></td>'+'<td width="220" height="30" colspan="4"><input TYPE="FILE" NAME="Filename1" class="UploadText"/></td>'+'</tr>'+'<tr>'+'<td width="81" height="50"></td>'+'<td width="1" height="50"></td>'+'<td height="50" colspan="4"><table width="150" height="50" border="0" cellpadding="0" cellspacing="0">'+'<tr>'+'<td width="78" height="50" align="center"><a href="javascript:void(0)" onClick="SubmitUploadForm()"><img src="../image/WVImage/Home/SubmitButton.gif" alt="Click for Submit" width="60" height="20"/></a></td>'+'<td width="122" height="50"><a href="javascript:void(0);"><img src="../image/WVImage/Home/SubmitButton.gif" alt="Click for Submit" width="60" height="20"/></a></td>'+'</tr>'+'</table></td>'+'</tr>'+'</table></td>'+'</tr>'+'</table></form>';document.getElementById('NaukariAdd').style.display='block';d.innerHTML=DATA;}
function CheckUploadForm(){if(document.getElementById('utitle').value.length<=5){alert('Length of Video Title should be greater than 4 characters.');return 0;}
if(document.getElementById('utitle').value.length>40){alert('Length of Video Title should be Less than 40 characters.');return 0;}
if(document.upload.duration.value==""){alert('Please enter Video Duration.');return 0;}
for(var i=65;i<123;i++){for(var j=0;j<document.upload.duration.value.length;j++){if(unescape('%'+i.toString(16))==document.upload.duration.value.charAt(j)){alert('Please enter only numbers in Video Duration.');return 0;}}}
for(var i=0;i<48;i++){for(var j=0;j<document.upload.duration.value.length;j++){if(unescape('%'+i.toString(16))==document.upload.duration.value.charAt(j)){alert('Please enter only numbers in Video Duration.');return 0;}}}
if(document.upload.discription.value==""){alert('Please Select Video discription.');return 0;}
if(document.upload.Filename1.value==""){alert('Please Select Video File.');return 0;}}
function SubmitUploadForm(){var boundaryString='AaB03x';var boundary='--'+boundaryString;try{if(CheckUploadForm(document.upload)==0){return 0;}
var onSubserUrl='/servlet/UpLoadServlet';if(window.ActiveXObject){objAddRequest=new ActiveXObject('Microsoft.XMLHTTP');}
else{objAddRequest=new XMLHttpRequest();mWindow="nonWindows";}
if(objAddRequest){objAddRequest.onreadystatechange=submitInfo;objAddRequest.open('Post',onSubserUrl);if(typeof httpRequest.setRequestHeader!='undefined'){httpRequest.setRequestHeader('Content-Type','multipart/form-data; boundary='+boundaryString);}
if(mWindow=='nonWindows'){objAddRequest.send('');}
else{objAddRequest.send();}}}
catch(e){alert("Exception in onSubmitchekUserId funtion:->"+e);}}
function submitInfo(){try{if(objAddRequest.readyState==4){if(sessionRequest.status==200){var responseStr=objAddRequest.responseText;alert('response :-> '+responseStr)}}}
catch(ex){alert("Exception in onSubmitsendInfo funtion:->"+ex);}}