var finalLeft;var finalTop;function _controlPhoto_Init(A){writeDivs(A);_controlPhoto_Close()}function writeDivs(A){document.writeln('\n<div id="controlPhoto_marco">');document.writeln('\t<div id="controlPhoto_innermarco">');document.writeln('\t\t<img id="controlPhoto_imagen" alt="Unknown Image" src=""/>');document.writeln('\t\t<div id="controlPhoto_description"></div>');document.writeln('\t\t<div style="text-align:right"> <img id="controlPhoto_cerrar" onclick="_controlPhoto_Close()" alt="cerrar" src="'+A+'" /></div>');document.writeln("\t</div>");document.writeln("</div>");document.writeln('\n<div id="controlPhoto_background" onClick="_controlPhoto_Close();"></div>')}function _controlPhoto_Close(){changeVisibilityById("controlPhoto_background",false);changeVisibilityById("controlPhoto_marco",false);changeVisibilityById("controlPhoto_innermarco",false);changeVisibilityById("controlPhoto_cerrar",false);changeVisibilityById("controlPhoto_imagen",false);var A=document.getElementById("controlPhoto_description");A.innerHTML="";finalLeft=600;finalTop=250}function _relocateToBody(){if(BrowserDetect.browser=="Explorer"){return }var A=document.getElementById("controlPhoto_background");var B=document.getElementById("controlPhoto_marco");if(A!=null&&A.parentNode!=document.body){A.parentNode.removeChild(A);document.body.appendChild(A)}if(B!=null&&B.parentNode!=document.body){B.parentNode.removeChild(B);document.body.appendChild(B)}}function _controlPhoto_OpenImage(A,J,B,H,E,O){var C=document.getElementById("controlPhoto_background");var K=document.getElementById("controlPhoto_marco");var I=document.getElementById("controlPhoto_innermarco");var G=document.getElementById("controlPhoto_cerrar");var M=document.getElementById("controlPhoto_imagen");var L=document.getElementById("controlPhoto_description");var F=document.getElementById(H);M.src=A;L.setAttribute("class",O);M.alt="";M.title="";if(F!=null){L.innerHTML=F.innerHTML;M.title=F.innerHTML;M.alt="Imagen de "+F.innerHTML}var D=J==0?M.width:J;var N=B==0?M.height:B;if(N/2+50>finalTop){finalTop=N/2+50}if(D/2+50>finalLeft){finalLeft=D/2+50}finalTop+=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);finalLeft+=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);if(E){if(D!=0){M.style.width=D+"px"}if(N!=0){M.style.height=N+"px"}}changeElemVisibility(C,true);setBackgroundPositionAndSize(C);changeOpac(0,"controlPhoto_background");animate("controlPhoto_background",0,85,0,1000,"changeOpac");changeheigth(20,"controlPhoto_marco");changeWidth(0,"controlPhoto_marco");setTimeout("VisibleMarco()",1000);animate("controlPhoto_marco",0,D+20,1000,500,"changeWidth");animate("controlPhoto_marco",20,N+100,1500,1000,"changeheigth");changeOpac(0,"controlPhoto_innermarco");setTimeout("visibleTodo()",2500);animate("controlPhoto_innermarco",0,100,2500,1500,"changeOpac");return 0}function getStylePixelesValueInteger(A){return A.substring(A.length-2)}function setBackgroundPositionAndSize(A){if(A==null||!A.style){return }if(A.parentNode.style&&A.parentNode.style.position==="relative"){A.parentNode.style.position=""}var B=A.style;B.position="fixed";B.top="0px";B.left="0px";B.width=(document.documentElement.scrollWidth?document.documentElement.scrollWidth+"px":document.body.scrollWidth+"px");B.height=(document.documentElement.scrollHeight?document.documentElement.scrollHeight+"px":document.body.scrollHeight+"px")}function changeVisibilityById(C,B){var A=document.getElementById(C);if(A==null){return false}changeElemVisibility(A,B);return true}function changeElemVisibility(A,B){if(A==null){return }if(B){A.style.visibility="visible";A.style.display="block"}else{A.style.visibility="hidden";A.style.display="none"}}function visibleTodo(){var B=document.getElementById("controlPhoto_marco");var A=document.getElementById("controlPhoto_innermarco");var D=document.getElementById("controlPhoto_cerrar");var C=document.getElementById("controlPhoto_imagen");if(B==null||A==null){return }changeElemVisibility(D,true);changeElemVisibility(C,true);changeElemVisibility(A,true);A.style.width=B.style.width;changeOpac(0,"controlPhoto_innermarco")}function VisibleMarco(){var A=document.getElementById("controlPhoto_marco");changeElemVisibility(A,true)}function animate(A,D,E,F,H,G){var I=Math.abs((E-D))/H;var B=0;var J=D;var C=10;if(D>E){for(B=0;B<H;B+=C){setTimeout(G+"("+J+",'"+A+"')",B+F);J-=I*C}setTimeout(G+"("+E+",'"+A+"')",B+F)}else{if(D<E){for(B=0;B<H;B+=C){setTimeout(G+"("+J+",'"+A+"')",B+F);J+=I*C}setTimeout(G+"("+E+",'"+A+"')",B+F)}}}function changeWidth(B,C){var A=document.getElementById(C).style;A.marginLeft=(-B/2)+"px";A.width=B+"px"}function changeheigth(B,C){var A=document.getElementById(C).style;A.top=(finalTop-B/2)+"px";A.height=B+"px"}function changeOpac(B,C){var A=document.getElementById(C).style;A.opacity=(B/100);A.MozOpacity=(B/100);A.KhtmlOpacity=(B/100);A.filter="alpha(opacity="+B+")"}if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};
