<!--
var t=0;
var maxcount=1;
function AddMoreFiles(divId,type) {
    //alert(t)
   // alert(t)
 
    if(t<maxcount)
    {

        
        var validateOption="";
        if(t==0)
        {
            validateOption="validate";
        }   

        var ImgID=type+"_files"+t;
        //alert(type)
        var txt = "<table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1	\" ><tr>  <td valign=\"top\" align=\"left\"> <span class=\"div_ErrorMsg\">* </span><input '  type=\"file\" name='"+type+"_files[]' name='"+type+"_files'"+t+"' onblur=\"Validate"+type+"Upload(this,'"+ImgID+"',true)\" id='"+ImgID+"' alt=\"Validate"+type+"Upload##"+validateOption+"##Please upload the file.\"></td>";
		
        txt +="<td valign=\"top\"><select style='height:20px'   name='year"+t+"'>\n";
        var d = new Date();
        var curr_year = d.getFullYear();
        var syear=curr_year-50;
        while(curr_year>=syear)
        {
            txt +="<option value="+curr_year+">"+curr_year+"</option>\n";
            curr_year=curr_year-1;
        }
        txt +="</select></td>";
		
        txt +="<td valign=\"top\" ><input class='fileupload_C' type='text' name='title"+t+"' id='title"+t+"' ></td>\n";
		
        txt +="<td valign=\"top\" ><input class='fileupload_C' type='text' name='photographer"+t+"' id='photographer"+t+"' ></td></tr>\n";
		
         txt +="<tr><td colspan=\'4\' align='left'><span class='div_ErrorMsg' id='inf_title"+t+"'></span><span class='div_ErrorMsg' id='inf_photographer"+t+"'></span></td></tr>";
        
        txt +="<tr><td colspan=\'4\' align='left'><span id='inf_"+ImgID+"'></span></td></tr>\n</table>";


        var dv=document.createElement('div'+type);
        dv.innerHTML=txt;
        document.getElementById(divId).appendChild(dv);

    //  document.getElementById(divId).innerHTML=document.getElementById(divId).innerHTML+txt;
    }else
    {
        try{
        document.getElementById("divMaxError").innerHTML="Maximum number of files exceeded"
        }catch(e){}
    }
    t=t+1;
}

//document.getElementById("dvFile").innerHTML += txt;
 
//
//function validate(f){
//    var chkFlg = false;
//    for(var i=0; i < f.length; i++) {
//        //alert(f.elements[i].type);
//        //alert(f.elements[i].value);
//        //alert('sdfsdf');
//        if(f.elements[i].type=="file" && f.elements[i].value != "") {
//            var type=f.elements[i].value.split(".");
//            checkreturntype=type[1];
//            // alert(checkreturntype);
//            if(checkreturntype =="jpg" || checkreturntype =="jpeg" || checkreturntype == "JPG" || checkreturntype == "JPEG")
//            {
//                chkFlg=true
//            }else{
//                alert("Only JPG formats are supported");
//                return false;
//            }
//        }
//        if(f.elements[i].type=="text" && f.elements[i].value != "") {
//            if(!isHaveSpecialChar_line(f.elements[i].value))
//            {
//                alert(f.elements[i].name+" textbox should not contain special characters");
//                // var tname=f.elements[i].name;
//                // alert(tname);
//                // document.form.tname.focus();
//                return (false);
//            }
//
//        }
//
//    }
//    if(!chkFlg) {
//        alert('Please browse/choose at least one file');
//        return false;
//    }
//
//    return true;
//}
//-->
