count=function(obj){var ret=0;for(var i in obj)if(typeof obj[i]!='function')ret++;return ret};demoSizes={'iphone_portrait_75pct_withoutStatusBar':{w:240,h:360}};menuOver=function(key,over){var $li=$('#menu>li').filter(function(){return $(this).attr('i:key')==key});if($li.hasClass('active'))return;$li.css('background-position','left '+(over?'center':'top'))};nextColor=function(){if(window.igo.cStep==100){window.igo.cStep=0;window.igo.colorA=window.igo.colorB;window.igo.colorB=((window.igo.colorB+1)%window.igo.colors.length)}else{window.igo.cStep+=2}col=[Math.round(window.igo.colors[window.igo.colorA][0]/ 100 * (100-window.igo.cStep) + window.igo.colors[window.igo.colorB][0] /100*window.igo.cStep),Math.round(window.igo.colors[window.igo.colorA][1]/ 100 * (100-window.igo.cStep) + window.igo.colors[window.igo.colorB][1] /100*window.igo.cStep),Math.round(window.igo.colors[window.igo.colorA][2]/ 100 * (100-window.igo.cStep) + window.igo.colors[window.igo.colorB][2] /100*window.igo.cStep)];col=[(col[0]<16?'0':'')+col[0].toString(16),(col[1]<16?'0':'')+col[1].toString(16),(col[2]<16?'0':'')+col[2].toString(16)];document.getElementById('headerWrap').style.background='#'+col[0]+col[1]+col[2]};nextAnimFrame=function(){var box=window.animBox;switch(++box.frame){case 1:case 2:box.pages[0].animate({left:box.frame*-264},box.tt);break;case 3:box.pages[1].css({left:24,top:84,width:105,height:70}).show().animate({left:0,top:0,width:264,height:176},box.tt);break;case 4:box.pages[2].css({left:0,top:0}).show();box.pages[1].hide();case 5:case 6:case 7:case 8:case 9:case 10:box.pages[2].animate({left:box.pages[2].position().left-264},box.tt);break;case 11:box.pages[4].css({opacity:0}).show().animate({opacity:1},box.tt);break;case 12:box.pages[3].css({left:0,top:0,width:264,height:176,opacity:1}).show();box.pages[4].hide();box.pages[2].hide();box.pages[3].animate({left:24,top:84,width:105,height:70},box.tt);setTimeout(animFadeFrame,box.tt);break;case 13:case 14:box.pages[0].animate({left:(14-box.frame)*-264},box.tt);break}if(box.frame==14)box.frame=0};animFadeFrame=function(){window.animBox.pages[3].animate({opacity:0},window.animBox.tt)};startAnim=function(box){window.animBox=box;var wrap=$('<div class="animWrap"></div>');wrap.append($('<img src="http://static.igomatik.com/skins/chameleon/gfx/comics/back.png" class="back" />'));box.pages=[];for(var i=0;i<=4;i++)wrap.append(box.pages[i]=$('<img src="http://static.igomatik.com/skins/chameleon/gfx/comics/page'+i+'.png" />').hide());box.pages[0].show();box.frame=0;box.tt=500;box.timer=setInterval(nextAnimFrame,1500+box.tt);box.append(wrap)};$(document).ready(function(){window.igo={lang:document.documentElement.getAttribute('xml:lang'),menu:[],colors:[[171,58,58],[217,217,45],[53,126,53],[45,132,132],[62,62,124],[118,70,118]],colorA:0,colorB:1,cStep:0,demos:{}};if($('#userListRequest').length>0){$.getJSON('/aja/userListRequestGet.php',userListRequestGetCallback)}if($('#artistListInfoChanges').length>0){$.getJSON('/aja/artistListInfoChangesGet.php',artistListInfoChangesGetCallback)}if($(window).height()>600)$('#body').addClass('tall');$('#languages').children().addClass('item');$('#languages').prepend('<li class="capT">&nbsp;</li>').append('<li class="capB">&nbsp;</li>');$('#menu').removeClass('undone').addClass('done').children('li').each(function(){var $this=$(this),key=$this.attr('i:key'),href=$this.children().attr('href');$this.empty();$this.css("background","url(http://static.igomatik.com/skins/chameleon/gfx/header/menu-"+window.igo.lang+"/"+key+".png) no-repeat left "+($this.hasClass('active')?'bottom':'top'));window.igo.menu.push({key:key,href:href})});var menumap="<map name=\"menumap\">",n=0,x=0;for(var n in window.igo.menu){var item=window.igo.menu[n];x=80*n;menumap+="<area shape=\"polygon\" coords=\""+[x+141,0,x+155,0,x+155,20,x+30,84,x+30,100,x,100,x,73].join(',')+"\" href=\""+item.href+"\" onmouseover=\"menuOver('"+item.key+"', true);\" onmouseout=\"menuOver('"+item.key+"', false);\" />"}var w=75+80*n;menumap+="</map><img id=\"menuImg\" src=\"http://static.igomatik.com/skins/chameleon/gfx/pix.gif\" width=\""+w+"\" height=\"100\" style=\"margin-left:-"+w+"px\" usemap=\"#menuMap\" />";$('#menu').after(menumap);nextColor();window.t=setInterval("nextColor();",66);if(anim=$('.comics_slideshow'))startAnim(anim);$('.tooltip').bind('mouseenter',function(e){var $this=$(this);if(typeof $this.data('tooltip')=="undefined"){var pos=$this.offset();$this.data('tooltip',$('<div class="tooltip_popup" style="top: -1000px;">'+$this.attr('tooltip')+'</div>'));$(document.body).append($this.data('tooltip'));var x=pos.left,y=pos.top;switch($this.attr('ttdir')){case'sene':x=x+$this.outerWidth()-$this.data('tooltip').outerWidth();y=y+$this.outerHeight();break;case'swse':x=x-$this.data('tooltip').outerWidth();y=y+$this.outerHeight()-$this.data('tooltip').outerHeight();break;case'swnw':y=y+$this.outerHeight();break;case'sesw':x=x+$this.outerWidth();y=y+$this.outerHeight()-$this.data('tooltip').outerHeight();break}$this.data('tooltip').css({left:x,top:y}).hide()}$this.data('tooltip').fadeIn(200)}).bind('mouseleave',function(e){$(this).data('tooltip').fadeOut(200)});$('.openable').bind('click',function(e){var $this=$(this);if($this.hasClass('open')){$this.next().hide(500)}else{$this.next().show(500)}$this.toggleClass('open').toggleClass('closed')}).filter('.closed').next().hide();$('.demo').each(function(){var demoID=$(this).attr('demo');$.getJSON('/Demos/'+demoID+'/demo.json',{id:this.id},function(data){var id=this.url.split('?')[1].split('=')[1],$device=$('#'+id),demoID=data['demoID']=$device.attr('demo'),base='/Demos/'+demoID+'/'+window.igo.lang;data.w=demoSizes[data.device].w;data.h=demoSizes[data.device].h;data.wpx=data.w+'px';data.hpx=data.h+'px';data.mwpx=(data.w/2)+'px'; data.mhpx=(data.h/2)+'px'; data.nwpx=(-data.w)+'px';data.nhpx=(-data.h)+'px';window.igo.demos[id]=data;$device.addClass(data.device);var $view=$('<div class="contentView"></div>').appendTo($device);for(var i in data.screens){data.screens[i].image=$('<img src="http://static.igomatik.com'+base+'/'+data.screens[i].image+'" />').hide().appendTo($view)}$device.children('.loading').fadeOut(1000,function(){demo_bringFirstScreen(id)})})})});demo_bringFirstScreen=function(id){var demo=window.igo.demos[id];demo.screens[demo.firstScreen].image.css({left:demo.mwpx,top:demo.mhpx,width:0,height:0}).show().animate({left:0,top:0,width:demo.wpx,height:demo.hpx},demo.bootTransitionDuration);demo.currentScreen=demo.firstScreen;demo.z=0;setTimeout(function(){demo_advanceToNextScreen(id)},demo.displayDuration)};demo_advanceToNextScreen=function(id){var demo=window.igo.demos[id],current=demo.screens[demo.currentScreen],next=demo.screens[current.next];switch(current.animToNext){case'swipe-left':var endStyleForCurrent={left:demo.nwpx};var startStyleForNext={left:demo.wpx,top:0,width:demo.wpx,height:demo.hpx};var endStyleForNext={left:0};break;case'swipe-right':var endStyleForCurrent={left:demo.wpx};var startStyleForNext={left:demo.nwpx,top:0,width:demo.wpx,height:demo.hpx};var endStyleForNext={left:0};break;case'fade':var endStyleForCurrent={};var startStyleForNext={left:0,top:0,width:demo.wpx,height:demo.hpx,opacity:0};var endStyleForNext={opacity:1};break}startStyleForNext['z-index']=++demo.z;next.image.css(startStyleForNext).show();if(count(endStyleForCurrent)>0)current.image.animate(endStyleForCurrent,demo.transitionDuration);if(count(endStyleForNext)>0)next.image.animate(endStyleForNext,demo.transitionDuration);demo.previousScreen=demo.currentScreen;demo.currentScreen=current.next;setTimeout(function(){demo_didAdvanceToNextScreen(id,demo.previousScreen)},demo.transitionDuration);setTimeout(function(){demo_advanceToNextScreen(id)},demo.displayDuration)};demo_didAdvanceToNextScreen=function(id,previousScreen){var demo=window.igo.demos[id],previous=demo.screens[previousScreen],current=demo.screens[demo.currentScreen];previous.image.hide().css({opacity:1})};function contractTerminate(id){$('#'+id).show();$('input[name="contractTerminate"]').attr('value',1)}function showPWDChangeBox(){if($('#profileChangePWDaccount:checked').val()==1||$('#profileChangePWDSFTP:checked').val()==1){$('#profileChangePWDcurPwd').show();$('#profileChangePWDButton').show()}else{$('#profileChangePWDcurPwd').hide();$('#profileChangePWDButton').hide()}}var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(input){var output="";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;input=Base64._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4)}return output},decode:function(input){var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2)}if(enc4!=64){output=output+String.fromCharCode(chr3)}}output=Base64._utf8_decode(output);return output},_utf8_encode:function(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c)}else if((c>127)&&(c<2048)){utftext+=String.fromCharCode((c>>6)|192);utftext+=String.fromCharCode((c&63)|128)}else{utftext+=String.fromCharCode((c>>12)|224);utftext+=String.fromCharCode(((c>>6)&63)|128);utftext+=String.fromCharCode((c&63)|128)}}return utftext},_utf8_decode:function(utftext){var string="";var i=0;var c=c1=c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++}else if((c>191)&&(c<224)){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2}else{c2=utftext.charCodeAt(i+1);c3=utftext.charCodeAt(i+2);string+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3}}return string}};function toSource(stuff,debugDisplay){if(typeof debugDisplay=='undefined')debugDisplay=false;var ret="{ ",first=true;for(var i in stuff){var typeofi=typeof stuff[i];if(typeofi=='function')continue;if(!first)ret+=',';ret+='"'+i+'": ';switch(typeofi){case'boolean':ret+=bool2str(stuff[i]);break;case'string':ret+="\""+stuff[i].replace(/"/g,'\\"')+"\"";break;case'number':ret+=stuff[i];break;case'object':if(stuff[i]==null)ret+='null';else ret+=toSource(stuff[i],debugDisplay);break;case'array':ret+=toSource(stuff[i],debugDisplay);break}if(debugDisplay)ret+='\n';first=false}ret+=" }";return(ret)}function userListRequestGetCallback(result){if(result.status!='ok'){$('#userListRequest').removeClass('loading');alert('Error #'+result.code+':\n'+result.message);return}var html='<!-- -->';$('#userListRequest').removeClass('loading');$('#userListRequest').html(html);if(result.data.length==0)return;html='<table>';var data=result.data;var date=0;for(var user in data){date=new Date(data[user]['dateRequestToBeArtist']*1000);html+='<tr id="userTempData_1_'+data[user]['id']+'"><td>— <a onclick="userInfoGet('+data[user]['id']+'); return false;">'+data[user]['email']+'('+date.getFullYear()+'/'+(date.getMonth()+1)+'/'+date.getDate()+')</a></td></tr>';html+='<tr id="userTempData_2_'+data[user]['id']+'"><td id="userInfoGet_id'+data[user]['id']+'" style="display:none;"><!-- --></td></tr>'}html+='</table>';$('#userListRequest').removeClass('loading');$('#userListRequest').html(html)}function userInfoGet(idUser){$.post('/aja/userInfoGet.php',{'idUser':idUser},userInfoGetCallback,'json')}function userInfoGetCallback(result){if(result.status!='ok'){alert('Error #'+result.code+':\n'+result.message);return}var html='<table>';var data=result.data;html+='<tr>'+'<td>Alias</td>'+'<td><input type="text" id="ARpseudo_id'+data['idUser']+'" value="'+data['pseudo']+'" /></td>'+'</tr>'+'<tr>'+'<td>Firstname</td>'+'<td><input type="text" id="ARfirstname_id'+data['idUser']+'" value="'+data['firstname']+'" /></td>'+'</tr>'+'<tr>'+'<td>Lastname</td>'+'<td><input type="text" id="ARlastname_id'+data['idUser']+'" value="'+data['lastname']+'" /></td>'+'</tr>'+'<tr>'+'<td>idCountry</td>'+'<td><input type="text" id="ARidCountry_id'+data['idUser']+'" value="'+data['idCountry']+'" /></td>'+'</tr>'+'<tr>'+'<td>BirthDay</td>'+'<td><input type="text" id="ARbirthDay_id'+data['idUser']+'" value="'+data['birthDay']+'" /></td>'+'</tr>'+'<tr>'+'<td>BirthMonth</td>'+'<td><input type="text" id="ARbirthMonth_id'+data['idUser']+'" value="'+data['birthMonth']+'" /></td>'+'</tr>'+'<tr>'+'<td>BirthYear</td>'+'<td><input type="text" id="ARbirthYear_id'+data['idUser']+'" value="'+data['birthYear']+'" /></td>'+'</tr>'+'<tr>'+'<td>Gender</td>'+'<td>'+'<select id="ARgender_id'+data['idUser']+'">'+'<option value="1"'+(data['gender']==1?' selected="1"':'')+'>man</option>'+'<option value="2"'+(data['gender']==2?' selected="1"':'')+'>woman</option>'+'</select>'+'</td>'+'</tr>'+'<tr>'+'<td>Address</td>'+'<td><textarea id="ARaddress_id'+data['idUser']+'">'+data['address']+'</textarea></td>'+'</tr>'+'<tr>'+'<td>zipCode</td>'+'<td><input type="text" id="ARzipCode_id'+data['idUser']+'" value="'+data['zipCode']+'" /></td>'+'</tr>'+'<tr>'+'<td>City</td>'+'<td><input type="text" id="ARcity_id'+data['idUser']+'" value="'+data['city']+'" /></td>'+'</tr>'+'<tr>'+'<td>Local phone</td>'+'<td><input type="text" id="ARlocalPhone_id'+data['idUser']+'" value="'+data['localPhone']+'" /></td>'+'</tr>'+'<tr>'+'<td>Mobile phone</td>'+'<td><input type="text" id="ARmobilePhone_id'+data['idUser']+'" value="'+data['mobilePhone']+'" /></td>'+'</tr>'+'<tr>'+'<td>Description</td>'+'<td>'+(data['description']).replace(/\n/g,'<br />')+'</td>'+'</tr>'+'<tr>'+'<td>Work</td>'+'<td>'+(data['oeuvre']).replace(/\n/g,'<br />')+'</td>'+'</tr>'+'<tr>'+'<td><button onclick="userAcceptToBeArtist('+data['idUser']+')">Accept</button></td>'+'<td><button onclick="userRefuseToBeArtist('+data['idUser']+')">Refuse</button></td>'+'</tr>';html+='</table>';$('#userInfoGet_id'+data['idUser']).toggle();$('#userInfoGet_id'+data['idUser']).html(html)}function userAcceptToBeArtist(idUser){var box=confirm('Are you sure to accept this user as artist ?');if(!box)return;var data={idUser:idUser,pseudo:$('#ARpseudo_id'+idUser).val(),firstname:$('#ARfirstname_id'+idUser).val(),lastname:$('#ARlastname_id'+idUser).val(),idCountry:$('#ARidCountry_id'+idUser).val(),birthDay:$('#ARbirthDay_id'+idUser).val(),birthMonth:$('#ARbirthMonth_id'+idUser).val(),birthYear:$('#ARbirthYear_id'+idUser).val(),gender:$('#ARgender_id'+idUser).val(),address:$('#ARaddress_id'+idUser).val(),city:$('#ARcity_id'+idUser).val(),zipCode:$('#ARzipCode_id'+idUser).val(),localPhone:$('#ARlocalPhone_id'+idUser).val(),mobilePhone:$('#ARmobilePhone_id'+idUser).val()};$.post('/aja/userAcceptToBeArtist.php',{'data':Base64.encode(JSON.stringify(data))},userAcceptToBeArtistCallback,'json')}function userAcceptToBeArtistCallback(result){if(result.status!='ok'){alert('Error #'+result.code+':\n'+result.message);return}alert('Successful artist update');$('#userTempData_1_'+result.data.idUser).remove();$('#userTempData_2_'+result.data.idUser).remove();$.getJSON('/aja/userListRequestGet.php',userListRequestGetCallback)}function userRefuseToBeArtist(idUser){var box=prompt('Refuse reason : ','');if(box==null||box=='')return;$.post('/aja/userRefuseToBeArtist.php',{idUser:idUser,reason:box},userRefuseToBeArtistCallback,'json')}function userRefuseToBeArtistCallback(result){if(result.status!='ok'){alert('Error #'+result.code+':\n'+result.message);return}alert('Successful artist remove');$('#userTempData_1_'+result.data.idUser).remove();$('#userTempData_2_'+result.data.idUser).remove();$.getJSON('/aja/userListRequestGet.php',userListRequestGetCallback)}function artistListInfoChangesGetCallback(result){if(result.status!='ok'){$('#userListRequest').removeClass('loading');alert('Error #'+result.code+':\n'+result.message);return}var html='<!-- -->';$('#artistListInfoChanges').removeClass('loading');$('#artistListInfoChanges').html(html);if(result.data.length==0)return;html='<table>';var data=result.data;var date=0;for(var user in data){date=new Date(data[user]['dateUsrLastChanges']*1000);html+='<tr id="artistTempData_1_'+data[user]['id']+'"><td>— <a onclick="artistInfoGet('+data[user]['id']+'); return false;">'+data[user]['email']+'('+date.getFullYear()+'/'+(date.getMonth()+1)+'/'+date.getDate()+')</a></td></tr>';html+='<tr id="artistTempData_2_'+data[user]['id']+'"><td id="artistInfoGet_id'+data[user]['id']+'" style="display:none;"><!-- --></td></tr>'}html+='</table>';$('#artistListInfoChanges').removeClass('loading');$('#artistListInfoChanges').html(html)}function artistInfoGet(idUser){$.post('/aja/artistInfoGet.php',{'idUser':idUser},artistInfoGetCallback,'json')}function artistInfoGetCallback(result){if(result.status!='ok'){alert('Error #'+result.code+':\n'+result.message);return}var html='<table class="collapsed">';var idUser=result.data.idUser;var data=result.data.data;html+='<tr>'+'<th>Field name</th>'+'<th>Current value</th>'+'<th>Submitted value</th>'+'</tr>'+'<tr>'+'<td>Alias</td>'+'<td>'+data[1][1]['oldContent']+'</td>'+'<td><input type="text" id="ASpseudo_id'+idUser+'" value="'+data[1][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>use Alias</td>'+'<td>'+(data[2][1]['oldContent']==''?'no value':(data[2][1]['oldContent']==1?'Yes':'No'))+'</td>'+'<td>'+'<select id="ASusePseudo_id'+idUser+'">'+'<option value="0"'+(data[2][1]['newContent']==0?' selected="1"':'')+'>No</option>'+'<option value="1"'+(data[2][1]['newContent']==1?' selected="1"':'')+'>Yes</option>'+'</select>'+'</td>'+'</tr>'+'<tr>'+'<td>Firstname</td>'+'<td>'+data[5][1]['oldContent']+'</td>'+'<td><input type="text" id="ASfirstname_id'+idUser+'" value="'+data[5][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>Lastname</td>'+'<td>'+data[6][1]['oldContent']+'</td>'+'<td><input type="text" id="ASlastname_id'+idUser+'" value="'+data[6][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>idCountry</td>'+'<td>'+data[11][1]['oldContent']+'</td>'+'<td><input type="text" id="ASidCountry_id'+idUser+'" value="'+data[11][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>BirthDay</td>'+'<td>'+data[8][1]['oldContent']+'</td>'+'<td><input type="text" id="ASbirthDay_id'+idUser+'" value="'+data[8][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>BirthMonth</td>'+'<td>'+data[9][1]['oldContent']+'</td>'+'<td><input type="text" id="ASbirthMonth_id'+idUser+'" value="'+data[9][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>BirthYear</td>'+'<td>'+data[10][1]['oldContent']+'</td>'+'<td><input type="text" id="ASbirthYear_id'+idUser+'" value="'+data[10][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>Gender</td>'+'<td>'+(data[7][1]['oldContent']==1?'Man':'Woman')+'</td>'+'<td>'+'<select id="ASgender_id'+idUser+'">'+'<option value="1"'+(data[7][1]['newContent']==1?' selected="1"':'')+'>Man</option>'+'<option value="2"'+(data[7][1]['newContent']==2?' selected="1"':'')+'>Woman</option>'+'</select>'+'</td>'+'</tr>'+'<tr>'+'<td>Address</td>'+'<td>'+(data[14][1]['oldContent']).replace(/\n/g,'<br />')+'</td>'+'<td><textarea id="ASaddress_id'+idUser+'">'+data[14][1]['newContent']+'</textarea></td>'+'</tr>'+'<tr>'+'<td>zipCode</td>'+'<td>'+data[17][1]['oldContent']+'</td>'+'<td><input type="text" id="ASzipCode_id'+idUser+'" value="'+data[17][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>City</td>'+'<td>'+data[15][1]['oldContent']+'</td>'+'<td><input type="text" id="AScity_id'+idUser+'" value="'+data[15][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>Local phone</td>'+'<td>'+data[12][1]['oldContent']+'</td>'+'<td><input type="text" id="ASlocalPhone_id'+idUser+'" value="'+data[12][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>Mobile phone</td>'+'<td>'+data[13][1]['oldContent']+'</td>'+'<td><input type="text" id="ASmobilePhone_id'+idUser+'" value="'+data[13][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>Biography (en)</td>'+'<td>'+(data[4][1]['oldContent']).replace(/\n/g,'<br />')+'</td>'+'<td><textarea id="ASbiographyen_id'+idUser+'">'+data[4][1]['newContent']+'</textarea></td>'+'</tr>'+'<tr>'+'<td>Biography (fr)</td>'+'<td>'+(data[4][2]['oldContent']).replace(/\n/g,'<br />')+'</td>'+'<td><textarea id="ASbiographyfr_id'+idUser+'">'+data[4][2]['newContent']+'</textarea></td>'+'</tr>'+'<tr>'+'<td>Website</td>'+'<td>'+data[3][1]['oldContent']+'</td>'+'<td><input type="text" id="ASwebsite_id'+idUser+'" value="'+data[3][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td>Paypal</td>'+'<td>'+data[16][1]['oldContent']+'</td>'+'<td><input type="text" id="ASpaypal_id'+idUser+'" value="'+data[16][1]['newContent']+'" /></td>'+'</tr>'+'<tr>'+'<td style="text-align: center;"><button onclick="artistValidateAllChangesWOC('+idUser+')">Validate all without changes</button></td>'+'<td style="text-align: center;"><button onclick="artistValidateAllChangesWC('+idUser+')">Validate all with changes</button></td>'+'<td style="text-align: center;"><button onclick="artistUnValidateAllChanges('+idUser+')">Unvalidate All</button></td>'+'</tr>';html+='</table>';$('#artistInfoGet_id'+idUser).toggle();$('#artistInfoGet_id'+idUser).html(html)}function artistValidateAllChangesWOC(idUser){var box=confirm('Are you sure to validate these data ? (changes done are NOT applied)');if(!box)return;$.post('/aja/artistAcceptChangesWOC.php',{'idUser':idUser},artistValidateAllChangesWOCCallback,'json')}function artistValidateAllChangesWOCCallback(result){if(result.status!='ok'){alert('Error #'+result.code+':\n'+result.message);return}alert('Successful artist info update');$('#artistTempData_1_'+result.data.idUser).remove();$('#artistTempData_2_'+result.data.idUser).remove();$.getJSON('/aja/artistListInfoChangesGet.php',artistListInfoChangesGetCallback)}function artistValidateAllChangesWC(idUser){var box=confirm('Are you sure to validate these data ? (changes done are applied)');if(!box)return;var data={idUser:idUser,info:{1:$('#ASpseudo_id'+idUser).val(),2:$('#ASusePseudo_id'+idUser).val(),3:$('#ASwebsite_id'+idUser).val(),4:{1:$('#ASbiographyen_id'+idUser).val(),2:$('#ASbiographyfr_id'+idUser).val()},5:$('#ASfirstname_id'+idUser).val(),6:$('#ASlastname_id'+idUser).val(),7:$('#ASgender_id'+idUser).val(),8:$('#ASbirthDay_id'+idUser).val(),9:$('#ASbirthMonth_id'+idUser).val(),10:$('#ASbirthYear_id'+idUser).val(),11:$('#ASidCountry_id'+idUser).val(),12:$('#ASlocalPhone_id'+idUser).val(),13:$('#ASmobilePhone_id'+idUser).val(),14:$('#ASaddress_id'+idUser).val(),15:$('#AScity_id'+idUser).val(),16:$('#ASpaypal_id'+idUser).val(),17:$('#ASzipCode_id'+idUser).val()}};$.post('/aja/artistAcceptChangesWC.php',{'data':Base64.encode(JSON.stringify(data))},artistValidateAllChangesWCCallback,'json')}function artistValidateAllChangesWCCallback(result){if(result.status!='ok'){alert('Error #'+result.code+':\n'+result.message);return}alert('Successful artist info update');$('#artistTempData_1_'+result.data.idUser).remove();$('#artistTempData_2_'+result.data.idUser).remove();$.getJSON('/aja/artistListInfoChangesGet.php',artistListInfoChangesGetCallback)}function artistUnValidateAllChanges(idUser){var box=confirm('Are you sure to unvalidate these data ?');if(!box)return;$.post('/aja/artistRefuseChanges.php',{'idUser':idUser},artistUnValidateAllChangesCallback,'json')}function artistUnValidateAllChangesCallback(result){if(result.status!='ok'){alert('Error #'+result.code+':\n'+result.message);return}alert('Successful artist info update');$('#artistTempData_1_'+result.data.idUser).remove();$('#artistTempData_2_'+result.data.idUser).remove();$.getJSON('/aja/artistListInfoChangesGet.php',artistListInfoChangesGetCallback)}
