function startUpload(id){ document.getElementById('errDimension' + id).style.display = 'none'; document.getElementById('errFormat' + id).style.display = 'none'; if(id=='uploadPhotoeditValid') { document.getElementById('upload_photo' + id + 'ondiv').innerHTML = '' document.getElementById('upload_photo' + id).innerHTML = '' } else { document.getElementById('upload_photo' + id + 'ondiv').innerHTML = '
' document.getElementById('upload_photo' + id).innerHTML = '
' } document.getElementById('photoLinks' + id).innerHTML =''; return true; } function stopUpload(file, filebig, success, id, width, height){ i=id.substr(id.length-1); if(id=='uploadPhotoeditValid') { innerHTMLstart = ''; return true; } function startUploadWithLabel(id){ document.getElementById('errDimension' + id).style.display = 'none'; document.getElementById('errFormat' + id).style.display = 'none'; document.getElementById('photosErr').innerHTML=''; if(id=='uploadPhotoeditValid') { document.getElementById('uploadnow').innerHTML = ''; } else { document.getElementById('uploadnow').innerHTML = '
'; } return true; } function stopUploadWithLabel(file, filebig, success, id, width, height, label){ tmp=label; tmp=tmp.replace(/galleryPhoto/, ""); if(tmp.length>5){ tmp=tmp.replace(/photo/, ""); } i=tmp //alert('id=' + id + ' success=' + success + ' i=' + i + ' label=' + label + ' tmp=' + tmp); //brak pliku lub etykiety if (success == 0){ if(label!='pusty'){ document.getElementById('photosErr').innerHTML=label; } else { document.getElementById(id).style.display='none'; } } //wszystko ok if (success == 1){ //alert(i + ' galleryPhoto' + i); //alert(label); if(label=='galleryPhoto'+i){ document.getElementById('photos').innerHTML=document.getElementById('photos').innerHTML + '
'; } else { document.getElementById('photos').innerHTML=document.getElementById('photos').innerHTML + '
'; } inew=parseInt(i); document.getElementById('numberPhoto').value=(inew+1); } //nieprawidłowe rozmiary pliku if (success == 2){ document.getElementById('photosErr').innerHTML='Nieprawidłowy rozmiar pliku: ' + width + 'x' + height + ''; } //nieprawidłowy typ pliku if (success == 3){ document.getElementById('photosErr').innerHTML='Nieprawidłowy typ pliku.'; } document.getElementById('uploadnow').innerHTML = ''; document.getElementById('filePhoto').value = ''; return true; } function BrowseGalery(idBegin,id,pro){ document.getElementById('browse' + id).style.zIndex = '1000'; if(document.getElementById('browse' + id).style.display=='none'){ if(pro==1) { subid=idBegin; if(document.getElementById('browse' + subid)!=null)document.getElementById('browse' + subid).style.display = 'none'; if(document.getElementById(subid)!=null)document.getElementById(subid).style.zIndex = '0'; for(j=1;j<=10;j++){ if(document.getElementById('browse' + subid + j)!=null)document.getElementById('browse' + subid + j).style.display = 'none'; if(document.getElementById(subid + j)!=null)document.getElementById(subid + j).style.zIndex = '0'; } } document.getElementById('browse' + id).style.display = 'none'; document.getElementById('browse' + id).style.display = 'block'; document.getElementById(id).style.zIndex = '1001'; } else { document.getElementById('browse' + id).style.display = 'none'; document.getElementById(id).style.zIndex = '0'; } } function saveVideo(i, id, value){ innerHTMLbody=getHttp('http://kleje.com.pl/popup/code/saveVideo.asp?lang=pl&value='+encodeURI(value)+'&name=video'+id+'&i='+i); innerHTMLstart = '
'; innerHTMLstart = innerHTMLstart + ''; innerHTMLstop="
" if(innerHTMLbody!=''){ document.getElementById('upload_photo'+id+'ondiv').innerHTML= innerHTMLstart+innerHTMLstop; document.getElementById('upload_photo'+id).innerHTML = innerHTMLstart+innerHTMLstop; document.getElementById('photoLinks' + id).innerHTML = 'Usuń Usuń'; document.getElementById('browse' + id).style.display = 'none'; } else { document.getElementById('errFormat' + id).style.display = 'block'; } } function deleteVideo(i, id){ innerHTMLbody=getHttp('http://kleje.com.pl/popup/code/saveVideo.asp?lang=pl&delete=1&name='+id+'&i='+i); innerHTMLstart = '
'; innerHTMLstartondiv = innerHTMLstart + ''; innerHTMLstart = innerHTMLstart + 'Kliknij, aby dodać film'; innerHTMLstop="
" if(innerHTMLbody!=''){ document.getElementById('upload_photo'+id+'ondiv').innerHTML= innerHTMLstartondiv+innerHTMLstop; document.getElementById('upload_photo'+id).innerHTML = innerHTMLstart+innerHTMLstop; document.getElementById('photoLinks' + id).innerHTML = ''; document.getElementById('video' + id).value = ''; } } function getStateList(){ element=document.getElementById('id_country').options[document.getElementById('id_country').selectedIndex]; id_country=element.value; stateList=getHttp('http://kleje.com.pl/popup/code/getState.asp?lang=pl&id_country='+id_country); if(stateList!=''){ document.getElementById('id_state').innerHTML = stateList; } else { document.getElementById('id_state').innerHTML = ""; } }