workFadeEffect=null;qselKeys=new Array();selExp=null;selectedExporter=null;exports=new Array();function exporterClick(D){if(window.expMenuLPadObj[D]){try{window.expMenuLPadObj[D].ilLoadAni=$("externalEmbed."+D+".loading");if(typeof (window.expMenuLPadObj[D].oniFrameLoad)=="function"){window.expMenuLPadObj[D].oldFrameLoad=window.expMenuLPadObj[D].oniFrameLoad;window.expMenuLPadObj[D].oniFrameLoad=function(){this.ilLoadAni.style.display="none";this.oldFrameLoad()}}try{window.expMenuLPadObj[D].show()}catch(A){}var B=$("externalEmbed."+D+".target").getElementsByTagName("iframe")[0];B.loadAni=$("externalEmbed."+D+".loading");B.onload=B.onreadystatechange=function(){try{if(!this.readyState||this.readyState=="complete"){this.loadAni.style.display="none"}}catch(E){}}}catch(C){}}return toggleEl(D,1)}function workEnd(B){$("#msgloading-"+B).hide();$("#"+B).hide();if(workFadeEffect!=null){workFadeEffect.cancel()}workFadeEffect=null;var A=$("#msgresult-"+B);if(A.css("display")=="none"){A.show()}else{A.hide()}return false}function GetThis(D,B,A,C){var E="http://www.myspace.com/Modules/PostTo/Pages/?t="+encodeURIComponent(D)+"&c="+encodeURIComponent(B)+"&u="+encodeURIComponent(A)+"&l="+C;
window.open(E)}function submitExportHandler(K,E){var H=E?E.replace(/\\\./g,".").replace(/\./g,"\\."):"";if(K&&!K.isException){$("#msgloading-"+H).hide();$("#msgcontinfo-"+H).hide();$("#msgresult-"+H).show();$("#msg-"+H).show()}else{if(K&&K.isException){$("#msgloading-"+H).hide();$("#msgcontinfo-"+H).hide();$("#msg-"+H).show();if(K.errorCode==5000){$("#msg-"+H).hide();$("#msgcontinfo-"+H).show();var C=K.info;var J=C.split("\n");var I;var F;for(var B=0;B<J.length;B++){var G=J[B];if(G.substring(0,2)=="x:"){I=G.substring(2);$("#imgcontinfo-"+H).attr("src",mainSiteUrl+"/cont-info.htm?k="+I)}}$("#inpcontinfo-"+H).val("");$("#subcontinfo-"+H).attr("key",I).attr("exportId",H).click(function(){var L=$("#inpcontinfo-"+$(this).attr("exportId")).val();var M=$(this).attr("exportId");var N="key="+encodeURIComponent($(this).attr("key"))+"&responseInfo="+encodeURIComponent(L);il.rpcCall("imagelooop.continueRequest",N,submitExportHandler,M);$("#msgloading-"+this.exportId).show();$("#msgcontinfo-"+this.exportId).hide();$("#msg-"+this.exportId).hide()
})}else{if(K.errorCode==5001){var C=K.info;var J=C.split("\n");var A=J[0];if(E=="xchange.out.netlog"){window.lastOpenedWindow=window.open(A,"netlog")}else{var D=$("#msgiframediv-"+H);$("#msg-"+H).hide();D.show();D.attr("src",A)}}else{if(K.errorCode==4002){alert(i18nPublishingPhotosFailed)}else{if(K.message){alert(K.message)}else{if(K.errorType){alert(K.errorType)}else{alert(K)}}}}}}}}function missingInputValue(B,A){if(typeof (B)=="string"){B=$("#"+B)}if((A%2)==0){B.oldStyle={backgroundColor:B.css("background-color"),color:B.css("color")};B.css("background-color","#e00000");B.css("color","#e0e0e0")}else{B.css("background-color",B.oldStyle.backgroundColor);B.css("color",B.oldStyle.color);delete B.oldStyle}if(A==5){return }setTimeout("missingInputValue('"+B.id+"',"+(A+1)+")",300)}function submitExport(){try{var C="";var E=arguments[0];var D=false;C+="exporterId="+E;C+="&looopId="+Imagelooop.PAGE.mainObject.getId();window.globalArgs=arguments;for(var G=1;G<arguments.length;G++){var F=arguments[G];if(typeof (F)=="string"){F=F.replace(/\./g,"\\.")
}var B=$("#"+F);if(!B||B==null||B.length==0){alert("element "+submitExport.arguments[G]+" does not exist")}var A=(B.attr("xchangerequired")?B.attr("xchangerequired"):false);if("radio"==B.attr("type")||"checkbox"==B.attr("type")||B[0].checked){if(!B.val()||B.val()==""){if(A=="true"){missingInputValue(B,0);D=true}}}else{C+="&attributes="+B[0].name+"&attributes="+encodeURIComponent(B.val())}}if(!D){il.rpcCall("imagelooop.exportLooop",C,function(J){submitExportHandler(J,E)});var I=E.replace(/\./g,"\\.");$("#msgloading-"+I).show();$("#msg-"+I).hide();$("#msgcontinfo-"+I).hide()}}catch(H){alert(H);workEnd(E)}return false}function querySelectList(E,D,F){if(E&&E.alreadySet){return false}else{E.alreadySet=true}E=$(E);var G="";for(var H=3;H<arguments.length;H++){var B=arguments[H];if(typeof (B)=="string"&&B.indexOf("\\.")<=-1){B=B.replace(/\./g,"\\.")}B=$("#"+B);G+="&attributes="+B.attr("name")+"&attributes="+B.val()}var C="xchangerId="+D+"&variableId="+F;E.children().remove().append("<option>"+i18nLoadingList+"</option>");
var A=il.rpcCall("imagelooop.xChangeQueryList",C+G,function(I){processQueryList(I,E)})}function processQueryList(A,D){if(!D.length){D=$(D)}D.children().remove();if(A&&!A.isException){var B=A.values.length;for(var E=0;E<B;E++){var C=$("<option value='"+A.values[E]+"' >"+A.values[E]+"</option>");if(E==0){C.attr("selected","selected")}D.append(C)}D.focus()}else{if(A&&A.isException){if(A.errorCode==4002){alert(i18nLoadingListFailed)}else{alert(i18nErrorPrefix+" "+A.message+" ("+A.errorType+")")}var C=$("<option>"+i18nListChoose+"</option>");D.append(C);D[0].alreadySet=false}else{alert(i18nErrorPrefix+" "+A);var C=$("<option>"+i18nListChoose+"</option>");D.append(C);D[0].alreadySet=false}}}function loadHtmlIntoElement(A){if(typeof (A)=="string"){A=$((A.charAt(0)=="#"?"":"#")+A)}else{if(!A||!A.length||A.length<=0){return false}}A.show();var B=A.attr("ajaxSrc");if(B){$.get(B,function(C){A.html(C)});A.removeAttr("ajaxSrc")}}function revealHiddenExptabs(B){$("#navi ul li").show();$("#exp_moreLinksDisappear").hide();if(typeof (B)=="string"&&B.charAt(0)!="#"){B=("#"+B)
}if(B){var A=$(B);A.click()}return false}function openShareMe(){var B=(($(".exp_shareTable").width()-$(".bluebutton").width())+"px");var A=($(".exp_shareTable").offset()["top"]+"px");$("#exp_shareMe").css("left",B);$("#exp_shareMe").css("top",A);$("#exp_shareMe").show();return false}function doShareMe(G){try{var B=G.sharemail.value;var H=[];var E=B.split(",");for(var C=0;C<E.length;C++){var F=E[C].split(" ");for(var A=0;A<F.length;A++){H.push(F[A].replace(/^[\s]*/,"").replace(/[\s]*$/,""))}}var I="";if(H.length>0){for(var C=0;C<H.length;C++){if(!H[C]){alert("Please enter a valid email");return false}I+=("&recipients="+encodeURIComponent(H[C]))}}else{alert("Invalid (empty) mail")}if(G.sharesender){if(G.sharesender.value==youri18nName){G.sharesender.value=""}I+=("&senderName="+encodeURIComponent(G.sharesender.value));I+="&senderMail="}I+="&message=";window.il.rpcCall("imagelooop.sendLooop","looopID="+Imagelooop.PAGE.mainObject.getId()+I,function(J){if(J&&J.isException){alert("Error while sending: "+J.message);return false
}$("#exp_shareMe").fadeOut(800)});return false}catch(D){window.globalExpShareErr=D}finally{return false}}window.tabs=[];$(document).ready(function(){$("#navi > ul").find("li").click(function(){var C=this.id.split("_")[1];var B=$("#xchange\\.out\\."+C);$(this).find("a").blur();if(B.is(":visible")){return false}$("div.el-tab-content").hide();$("#navi > ul li div").removeClass("sl-tab-hi").addClass("sl-tab");$(this).find("div").removeClass("sl-tab").addClass("sl-tab-hi");loadHtmlIntoElement(B,B.attr("ajaxSrc"))});var A=$("#exporters div.el-tab-content:visible");window.globalVisibles=A;if(A.attr("ajaxSrc")){loadHtmlIntoElement(A);A.removeAttr("ajaxSrc",false)}});