function GetElementById(a){return document.getElementById(a)}function Hidden(a){a.style.display="none"}function Show(a){a.style.display=""}function Redirection(){var a=document.forms[0],b=a.action,c=a.target;a.action=window.location.href.split("?")[0]+"?Redirection=1";a.target="_blank";a.submit();a.action=b;a.target=c}function ShowPhoto1(){largePhoto.src=largePhoto1URL}function ShowPhoto2(){largePhoto.src=largePhoto2URL}function ShowPhoto3(){largePhoto.src=largePhoto3URL}function Uploader_FileUploadStart(){GetElementById("ButtonValider").disabled=true}function Uploader_FileUploadComplete(a){var b=GetElementById("Photo1"),c=GetElementById("Photo2"),d=GetElementById("Photo3"),e=GetElementById("HiddenPhoto1"),f=GetElementById("HiddenPhoto2"),g=GetElementById("HiddenPhoto3");if(a.isValid)if(b.src==""){b.src=a.callbackData;Show(GetElementById("FramePhoto1"));e.value=b.src}else if(c.src==""){c.src=a.callbackData;Show(GetElementById("FramePhoto2"));f.value=c.src}else if(d.src==""){d.src=a.callbackData;Show(GetElementById("FramePhoto3"));Hidden(GetElementById("panelUploader"));g.value=d.src}GetElementById("ButtonValider").disabled=false}function Uploader_SwapPhoto(c,d){var f=GetElementById("HiddenPhoto1"),g=GetElementById("HiddenPhoto2"),h=GetElementById("HiddenPhoto3"),b=GetElementById("Photo"+c),a=GetElementById("Photo"+d),e=b.src;if(a.src=="")b.removeAttribute("src");else b.src=a.src;if(e=="")a.removeAttribute("src");else a.src=e;if(b.src=="")Hidden(GetElementById("FramePhoto"+c));else Show(GetElementById("FramePhoto"+c));if(a.src=="")Hidden(GetElementById("FramePhoto"+d));else Show(GetElementById("FramePhoto"+d));f.value=GetElementById("Photo1").src;g.value=GetElementById("Photo2").src;h.value=GetElementById("Photo3").src}function Uploader_RemovePhoto(a){var b=GetElementById("HiddenPhoto1"),c=GetElementById("HiddenPhoto2"),d=GetElementById("HiddenPhoto3");GetElementById("Photo"+a).removeAttribute("src");Hidden(GetElementById("FramePhoto"+a));Show(GetElementById("panelUploader"));if(a==1){Uploader_SwapPhoto(1,2);Uploader_SwapPhoto(2,3)}else a==2&&Uploader_SwapPhoto(3,2);b.value=GetElementById("Photo1").src;c.value=GetElementById("Photo2").src;d.value=GetElementById("Photo3").src}
