function startUpload(){
      document.getElementById('f1_upload_process').style.visibility = 'visible';
      document.getElementById('f1_upload_form').style.visibility = 'hidden';
      return true;
}

function stopUpload(success,respondtext){
      var result = '';
      if (success == 1){
         result = '<span class="msg"><\/span><br />';
		 
		  //document.getElementById("showres").innerHTML = respondtext;
		  window.location = respondtext;

      }
      else {
         result = '<span class="emsg">There was an error during file upload!<\/span><br/><br/>';
      }
      document.getElementById('f1_upload_process').style.visibility = 'hidden';
      document.getElementById('f1_upload_form').innerHTML = result + '<label style="color:#ffffff;">File: <input name="myfile" type="file" size="30" style="background:#FFFFFF none;" /><\/label><label><input type="submit" name="submitBtn" class="sbtn" value="Upload" /><\/label>';
      document.getElementById('f1_upload_form').style.visibility = 'visible';      
      return true;   
}
function checkfile(){
var littlecheck = document.getElementById("myfile").value;
littlecheck = littlecheck.toLowerCase();
var fileok = 0;

if(littlecheck.lastIndexOf(".jpg") > 0) { fileok = 1;}
if(littlecheck.lastIndexOf(".jpeg") > 0) { fileok = 1;}
if(littlecheck.lastIndexOf(".png") > 0) { fileok = 1;}
if(littlecheck.lastIndexOf(".bmp") > 0) { fileok = 1;}

if(fileok == 0){
 document.getElementById("myfile").value = null;
 alert("Please upload only .jpg , .png , .bmp extention file");
} 

}
function switchbox(id){
if(id == 1){
     	 document.getElementById('switchbox2').style.display = 'block';
	      document.getElementById('switchbox').style.display = 'none';
}else{
	      document.getElementById('switchbox2').style.display = 'none';
 			document.getElementById('switchbox').style.display = 'block';

}

}
