function _ss_hiBg(A){if(A!=null){A.style.backgroundColor="#F19300"}}function _ss_lowBg(A,B){if(A!=null){A.style.backgroundColor=(B?B:"#E0E0E0")}}function _ss_setSize(B,A){w=0;h=0;switch(B){case 0:w=getRef("width").value;h=getRef("height").value;if(sv.skinType!=0){if(w<400){w=400}if(h<300){h=300}}break;case 1:w=600;h=450;break;case 2:w=500;h=375;break;case 3:w=400;h=300;break}sv.width=w;getRef("width").value=w;sv.height=h;getRef("height").value=h;if(!A){updatePlayer()}return false}function labloopInit(){window.ilExporterTAreas=$("embedExporters").getElementsByTagName("textarea");window.ilCheckItems=[];window.ilChooseItems=[];var B=$("uploaders").getElementsByTagName("div");for(var C=0;C<B.length;C++){if(B[C].className=="configValueTab"){window.ilCheckItems.push(B[C])}}var A=$("uploaders").getElementsByTagName("a");for(var C=0;C<A.length;C++){if(A[C].className!="configTab"){continue}window.ilChooseItems.push(A[C]);A[C].onmouseover=function(){if(this.getAttribute("assignedTo")){this.style.backgroundColor="#A9DAE5"
}};A[C].onmouseout=function(){if(this.getAttribute("assignedTo")){if(this.getAttribute("clicked")&&this.getAttribute("clicked")!="false"){return false}this.style.backgroundColor="#E6F5FF"}};if(A[C].getAttribute("assignedTo")){A[C].onclick=function(){this.blur();if(this.getAttribute("clickable")&&this.getAttribute("clickable")=="false"){return false}this.setAttribute("clicked",true);var D=document.getElementById(this.getAttribute("assignedTo"));for(var E=0;E<window.ilCheckItems.length;E++){if(D==window.ilCheckItems[E]){window.ilCheckItems[E].style.display="block"}else{window.ilCheckItems[E].style.display="none"}}for(var E=0;E<window.ilChooseItems.length;E++){if(this==window.ilChooseItems[E]){window.ilChooseItems[E].style.backgroundColor="#A9DAE5";window.ilChooseItems[E].style.marginLeft="-1px";window.ilChooseItems[E].style.marginRight="-1px";window.ilChooseItems[E].style.width="141px";window.ilChooseItems[E].setAttribute("clicked",true)}else{window.ilChooseItems[E].style.backgroundColor="#E6F5FF";window.ilChooseItems[E].style.marginLeft="0px";
window.ilChooseItems[E].style.marginRight="0px";window.ilChooseItems[E].style.width="140px";window.ilChooseItems[E].setAttribute("clicked",false)}}return false}}}}window.swfUrl=mainSiteUrl+"/swf/labLoop.swf";window.sv=new Array();function LabLoopMainObject(D,C,A,B){this.IlMainObject(D,C,A,B);this.updateMe=function(J,G){J=(J||"");G=(G||"player");var I=window.mainObject.getLpcfg();var H=(I&&I.width)?I.width:600;var E=(I&&I.height)?I.height:450;varString=(this.ilMainSettings.test?("test="+this.ilMainSettings.test+"&"):"")+("id="+this.getId())+((I&&I.effectType)?(("&effectType="+I.effectType)+(J?("&"+J):"")):(J?("&"+J):""));var F=getPlayerCode(window.swfUrl,"labLoop",H,E,varString,true,false);$("width").value=H;$("height").value=E;window.setTimeout("$('"+G+"').innerHTML = '"+F+"'",500)};this.saveMe=function(E){if(!window.il.isLoggedOn()){setCookie("setupCLooop",encodeURIComponent(window.mainObject.getId()),cookieDomain);setCookie("r",window.mainObject.ilMain.getPermalink()+"exportlooop.htm",cookieDomain);var H=$("registerPop");
var G=$("main");var F=$("bgRegDiv");G.style.position="relative";$("player").style.visibility=(E?"visible":"hidden");H.style.display=(E?"none":"block");F.setOpacity(E?0:0.5);F.style.height=G.clientHeight;H.style.height=(E?"0px":(G.clientHeight+"px"));$("regUserDiv").style.top=(Math.round(H.clientHeight/4)+"px");return(E?true:false)}};this.refreshImagePane=function(){var G=$("imagesPane");while(G.firstChild){G.removeChild(G.firstChild)}var E=this.ilMain.getImagesEx();if(E&&E.length){for(var H=0;H<E.length;H++){var F=_ss_createImageContainer(E[H]);G.appendChild(F);_ss_addDndImage(G,F)}}};this.updateImages=function(F){var J=$$("#imagesPane .sl-img-item");var H=new Array();var G=new Array();for(var K=0;K<J.length;K++){if(J[K].doDelete&&F){G.push(J[K].id)}else{H.push(new Imagelooop.LooopImage(this.ilMain,J[K].id))}}try{window.il.setImageOrder(this.ilMain,H,true);for(var K=0;K<G.length;K++){$(G[K]).parentNode.removeChild($(G[K]))}}catch(E){alert("Error deleting/moving images")}try{for(var K=0;K<H.length;K++){var I=$(H[K].getId());
if(I&&I.changed){I.changed=false;I.oldValue=I.getElementsByTagName("input")[0].value;H[K].setName(I.oldValue)}}}catch(E){alert("Error setting new image name")}setTimeout("window.mainObject.updateMe();",500);return false}}copyPrototype(LabLoopMainObject,IlMainObject);function _ss_createImageContainer(C){var G=document.createElement("div");G.className="sl-img-item";G.id=C.getId();var D=document.createElement("div");D.className="sl-img";var I=document.createElement("img");I.width=83;I.height=61;I.src=C.getImageLink("rw133h98f");D.appendChild(I);G.appendChild(D);var J=document.createElement("div");J.className="sl-img-txt";var A=document.createElement("input");A.type="text";A.maxlength=10;var H=C.getName();A.value=H;A.onchange=function(){this.parentNode.parentNode.changed=true};C.elNameInput=A;J.appendChild(A);G.appendChild(J);var F=document.createElement("div");F.className="sl-img-check";var B=document.createElement("img");B.src=(mainSiteStaticUrl+"/_img/ic_delete.gif");B.onclick=function(){this.checker.click()};B.style.paddingRight="5px";
B.alt=B.title="Delete";F.appendChild(B);var E=document.createElement("input");B.checker=E;E.onclick=function(){this.parentNode.parentNode.doDelete=(this.checked?true:false);if(this.checked){for(foo in Draggables.drags){if(Draggables.drags[foo].element&&Draggables.drags[foo].element==this.parentNode.parentNode){Draggables.drags[foo].destroy();this.parentNode.parentNode.getElementsByTagName("img")[0].setOpacity(0.3);return true}}}this.parentNode.parentNode.getElementsByTagName("img")[0].setOpacity(1);new Draggable(this.parentNode.parentNode,{containment:$("imagesPane"),tag:"div",revert:true})};E.type="checkbox";C.elCheckInput=E;F.appendChild(E);G.appendChild(F);return G}function initSwfUp(L,K){try{if(deconcept.SWFObjectUtil.getPlayerVersion().major<9){$("uploadStart").style.display="block";$("flashUpload").style.display="none"}else{try{var G=function(N){getRef("flashProblemText").style.display="none";getRef("problems").style.display="none";if(!this._fileCounter){this._fileCounter=0;this._fileTotalCount=0}this._fileCounter++;
this._fileTotalCount++;this.displayRegion.style.display="block";document.getElementById("SWFUpload_0").style.visibility="hidden";if(this.fileListDisplay.getElementsByTagName("li").length<=5){this.addListElement(N.name);this.colorList()}else{this.fileList.push(N.name)}};var C=function(R,Q){if(Q>0){try{var O=this.getSetting("post_params");var P=window.mainObject.getSettingsString().replace(/id=[^&]*&/i,"").replace(/test=[^&?\s]*/i,"");O.looopID=window.mainObject.beforeCollectionCheck(P);this.setPostParams(O)}catch(N){if(!window.globalError){window.globalError=[]}window.globalError.push(N)}this.startUpload()}};var F=function(N){this._fileCounter--;if(this.fileListDisplay.firstChild){this.fileListDisplay.removeChild(this.fileListDisplay.firstChild)}if(this.fileList.length>0){this.addListElement(this.fileList.pop())}if(this._fileCounter<=0){while(this.fileListDisplay.firstChild){this.fileListDisplay.removeChild(this.fileListDisplay.firstChild)}}else{this.colorList()}if(this.getFile()){this.startUpload()}else{this.queueComplete(this._fileTotalCount)
}};var B=function(O){try{this.addPostParam("imageName",O.name)}catch(N){this.addPostParam("imageName","image")}return true};var E=function(N,O){this.displayCount((this._fileTotalCount-this._fileCounter+1),this._fileTotalCount)};var D={apiKey:il.apiKey,looopID:window.mainObject.getId(),h:encodeURIComponent(document.location.hostname)};K=K.replace(/\|/gi,"_");var I=L.replace(/httprpc./,"");var J=(I+"httprpc/;sessionid="+K+"?f=imagelooop.uploadFilesForm");var H=mainSiteUrl+"/swf/additionalFlash/swfupload.swf";window.swfu=new SWFUpload({flash_url:H,upload_url:J,post_params:D,file_size_limit:"30 MB",file_types:"*.gif;*.jpg;*.jpeg;*.jpe;*.png;*.bmp;*.tif",file_types_description:"Common Image Formats",file_post_name:"uploadFile",file_queued_handler:G,file_dialog_complete_handler:C,upload_start_handler:B,upload_progress_handler:E,upload_complete_handler:F,button_image_url:"../_img/labloopUploadButton.gif",button_width:227,button_height:38,button_placeholder_id:"uploadButton",button_text:'<span class="text">'+i18nUploadButtonText+"</span>",button_text_style:".text { text-align: center; color: #FFFFFF; font-family: verdana,tahoma,arial,helvetica,sans-serif; font-size: 24px; }",button_text_top_padding:1,button_window_mode:"transparent"});
window.swfu._fileCounter=0;window.swfu._fileTotalCount=0;window.swfu.refreshLimit=2;window.swfu.fileList=new Array();swfu.addListElement=function(O){var N=document.createElement("li");N.appendChild(document.createTextNode(O));this.fileListDisplay.appendChild(N)};swfu.colorList=function(){var N=this.fileListDisplay.getElementsByTagName("li");N[0].style.color="";for(var O=0;O<N.length;O++){N[O].style.color="#a9a9a9"}};swfu.fileComplete=function(O,N){this._fileCounter--;if(this.fileListDisplay.firstChild){this.fileListDisplay.removeChild(this.fileListDisplay.firstChild)}if(this.fileList.length>0){this.addListElement(this.fileList.pop())}if(this._fileCounter<=0){while(this.fileListDisplay.firstChild){this.fileListDisplay.removeChild(this.fileListDisplay.firstChild)}}else{this.colorList()}};swfu.queueComplete=function(P,O){try{this._fileCounter=0;this._fileTotalCount=0;this.nameDisplay.innerHTML="&nbsp;";$(O?(O+"-uploading"):"file-uploading").style.display="none";window.mainObject.updateMe();if(!O){toggleDisplay(this.displayRegion);
document.getElementById("SWFUpload_0").style.visibility="visible"}if($("saveButton2").style.visibility=="hidden"){$("saveButton2").style.visibility="visible";for(var Q=2;Q<window.ilChooseItems.length;Q++){window.ilChooseItems[Q].getElementsByTagName("span")[0].style.visibility="visible";window.ilChooseItems[Q].onclick=window.ilChooseItems[Q].oldOnClick;window.ilChooseItems[Q].onmouseover=window.ilChooseItems[Q].oldOnMouseOver;window.ilChooseItems[Q].onmouseout=window.ilChooseItems[Q].oldOnMouseOut}}UnLockUploaders(true)}catch(N){}window.mainObject.refreshImagePane();window.mainObject.saveMe(false);if(window.il.isLoggedOn()){window.mainObject.ilMain.publishLooop()}};window.swfu.invi=function(){document.getElementById("button2").style.display="none"};window.swfu.displayCount=function(O,N){this.nameDisplay.innerHTML=("Uploading file <b>"+O+"</b> of <b>"+N+"</b>")};window.swfu.toggo=function(N){if($(N).style.display=="none"&&N!="button2"){$(N).style.display="block"}else{$(N).style.display="none"}}}catch(M){alert("failed to init swf upload: "+M.message)
}}}catch(A){alert("failed to init upload: "+A)}window.swfu.displayRegion=getRef("flashStatus");window.swfu.nameDisplay=getRef("flashFileName");window.swfu.fileListDisplay=getRef("flashFileList");$("flashUpload").style.display="block"}function _ss_uploadFinishedTest(E){if(!window._lab_uploadCname){return false}var D="";try{D=getCookieValue(window._lab_uploadCname,true)}catch(A){D=false}if(!D){setTimeout("_ss_uploadFinishedTest("+E+");",300);return false}toggleDisplay("file-choosing");toggleDisplay("file-uploading");var F=getRef("uploadFile");var B=F.cloneNode(true);B.value="";var C=getRef("uploadFileContainer");C.removeChild(F);C.appendChild(B);setCookie(window._lab_uploadCname,null,cookieDomain);window._lab_uploadCname=null;window.swfu.queueComplete(0,E?E:"");return false}function _ss_uploadFiles(){var B=window.mainObject.beforeCollectionCheck();window._lab_uploadCname="upload-"+B+"-"+new Date().getTime();toggleDisplay("file-uploading");try{window.mainObject.ilMain.uploadImagesForm($("uploadForm"),null,null,window._lab_uploadCname);
_ss_uploadFinishedTest()}catch(A){setCookie(window._lab_uploadCname,null,cookieDomain);window._lab_uploadCname=null;return false}try{$("file-choosing").style.display="none"}catch(A){}UnLockUploaders(false);return false}function _ss_addDndImage(E,B){var C=Sortable.options(E.id);var H=B;var D=E;var A={revert:true,ghosting:C.ghosting,constraint:C.constraint,handle:C.handle};var G={overlap:C.overlap,containment:C.containment,tree:C.tree,hoverclass:C.hoverclass,onHover:Sortable.onHover};var F=C.handle?$(H).down("."+C.handle,0):H;new Draggable(H,Object.extend(A,{handle:F}));Droppables.add(H,G);if(C.tree){H.treeNode=D}C.droppables.push(H)}function UnLockUploaders(G){for(var F=0;F<window.ilChooseItems.length;F++){var B=window.ilChooseItems[F];try{if(B.getAttribute&&B.getAttribute("assignedTo")&&B.getAttribute("assignedTo").search(/^uplTab/)>-1&&B.getAttribute("clicked")!="true"&&B.getAttribute("clicked")!=true){if(G){if(B.onmouseover){continue}B.onclick=B.oldOnClick;B.oldOnClick=null;B.onmouseover=B.oldOnMouseOver;B.oldOnMouseOver=null;
B.onmouseout=B.oldOnMouseOut;B.oldOnMouseOut=null;B.setOpacity(1)}else{if(B.oldOnMouseOver){continue}B.oldOnClick=B.onclick;B.onclick=function(){this.blur();return false};B.oldOnMouseOver=B.onmouseover;B.onmouseover=null;B.oldOnMouseOut=B.onmouseout;B.onmouseout=null;B.setOpacity(0.4)}}else{if(G&&B.getAttribute&&B.getAttribute("assignedTo")=="postTab"&&B.onclick){B.onclick()}}}catch(A){}}if(G){for(var F=0;F<window.ilExporterTAreas.length;F++){var C=window.ilExporterTAreas[F];try{var E=C.id;E=E.substring(E.indexOf(".")+1,E.length);var D=window.mainObject.ilMain.getLooopPlayerExportHtml(E);C.value=D;if(window.pconf){window.pconf[E+"Content"]=D}}catch(A){}}launchPoster(window.mainObject.ilMain)}}function addSet(C,B){for(foo in C){if(typeof (C[foo])=="object"){if(!window.mainObject.ilMainSettings[foo]){window.mainObject.ilMainSettings[foo]={}}for(bar in C[foo]){window.mainObject.ilMainSettings[foo][bar]=C[foo][bar]}}else{window.mainObject.ilMainSettings[foo]=C[foo]}}var A=window.mainObject.getSettingsString().replace(/id=[^&]*&?/g,"").replace(/test=[^&]*&?/g,"");
window.mainObject.ilMain.setMetaData(A,function(D){});window.mainObject.updateMe();return false};