Clientcide.setAssetLocation("assets");window.addEvent('domready',function(){MooTools.lang.setLanguage("es-ES");email();popup();});function detectUnityWebPlayer(){var tInstalled=false;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.toLowerCase().indexOf("win")!=-1)
{tInstalled=detectUnityWebPlayerActiveX();}
else if(navigator.mimeTypes&&navigator.mimeTypes["application/vnd.unity"])
{if(navigator.mimeTypes["application/vnd.unity"].enabledPlugin&&navigator.plugins&&navigator.plugins["Unity Player"])
{tInstalled=true;}}
return tInstalled;}
function email(){var email="info",emailHost="arrarray.com";$$('.email').set('html','<a  href=\'mailto:'+email+'&#64;'+emailHost+'\' target=\'_blank\' >'+email+'&#64;'+emailHost+'</a>');}
var anim={index:function(){var fx_menu=new Fx.Tween($('menu_index'),{transition:Fx.Transitions.Cubic.easeOut});var fx_logo=new Fx.Tween($('logo_index'),{transition:Fx.Transitions.Cubic.easeOut,'link':'chain'});var fx_loader=new Fx.Tween($('loader'),{transition:Fx.Transitions.Cubic.easeIn,'link':'chain'});fx_loader.set('opacity',0);$$('ul#menu_index li a').addEvent('click',function(ev){Cookie.write('animate',false);this.getParent().set('class','active');var href=this.get('href');ev.stop();fx_menu.start('top',-370);fx_logo.start('top',-120).chain(function(){fx_loader.start('opacity',1).chain(function(){document.location.href=href;});})});},content:function(scrolling){if(scrolling){new MooScroller($('text'),$('scrollKnob'),{scrollSteps:30,hideWhenNoOverflow:true,scrollLinks:{forward:$('scrollForward'),back:$('scrollBack')}});}
var fx_content_in=new Fx.Morph($('content'),{transition:Fx.Transitions.Cubic.easeIn,'link':'chain'});var fx_content_out=new Fx.Morph($('content'),{transition:Fx.Transitions.Cubic.easeOut,'link':'chain'});var fx_loader=new Fx.Tween($('loader'),{transition:Fx.Transitions.Cubic.easeIn,'link':'chain'});var direction=Cookie.read('direction');var animate=Cookie.read('animate');var distance=350;var position=distance;if(direction=="right"){position=distance;}else{position=-distance;}
if(animate=="true"){fx_content_in.set({'opacity':0,'left':position});fx_loader.start('opacity',0).chain(function(){fx_content_out.start({'opacity':1,'left':0});});}else{Cookie.write('animate',true);fx_content_in.set({'opacity':0});fx_loader.start('opacity',0).chain(function(){fx_content_out.start({'opacity':1,'left':0})});}
$$('a').addEvent('click',function(ev){if(this.get('target')=="_blank"){}else{ev.stop();Cookie.write('animate',true);direction=this.getParent().get('class');Cookie.write('direction',direction);var href=this.get('href');var position=distance;if(direction=="right"){position=-distance;}else{position=distance;}
fx_content_in.start({'opacity':0,'left':position}).chain(function(){fx_loader.start('opacity',1).chain(function(){document.location.href=href;});});};});}}
function content_anim(){}
function request(){Date.$culture="GB";new OverText($('nombre'));new OverText($('telefono'));new OverText($('email'));new OverText($('mensaje'));var validar=new FormValidator.Tips('contacto',{evaluateOnSubmit:false});var mensaje=new StickyWin({showNow:false});mensaje.setContent(StickyWin.ui('Info','<p>Enviando su mensaje, por favor espere...</p><div class="cargando"></div>'));$('contacto').addEvents({'reset':function(){validar.reset();$$('.validation-advice').setStyle('visibility','hidden');},'submit':function(e){e.stop();this.set('send',{onRequest:function(){mensaje.setContent(StickyWin.ui('Info','<p>Enviando su mensaje, por favor espere...</p><div class="cargando"></div>'));},onSuccess:function(results){mensaje.setContent(StickyWin.ui('Info',results,{buttons:[{text:'ok'}]}));$('contacto').reset();},onFailure:function(xhr){mensaje.setContent(StickyWin.ui('Error','<p>Hubo un problema al enviar su mensaje.</p><p>Por favor int&eacute;ntelo m&aacute;s tarde o revise si esta conectado al internet.</p>'),{buttons:[{text:'ok'}]});}});if(validar.validate(e)){mensaje.show();$('contacto').send();}}});}
function popup(){var mensaje=new StickyWin({showNow:false,draggable:true});$$(".p_daniela").addEvent('click',function(ev){selecCalidad('daniela','3D Interactivo: Casales Daniela');});$$(".p_patriotas").addEvent('click',function(ev){generate.video('patriotas','PATRIOTAS Teaser',240,225);});$$(".chat").addEvent('click',function(ev){mensaje.setContent(StickyWin.ui('Chat Arrarray',generate.chat(),{width:'465px'}));mensaje.show();});}
function selecCalidad(nombre,titulo){var mensaje=new StickyWin({showNow:false,draggable:true});var html="<p><b>Web:</b> Para visualizarlo en <b>baja resoluci&oacute;n</b> dentro de &eacute;ste navegador. Necesita una tarjeta de video Geforce FX o superior.</p>";html+="<p><b>Escritorio:</b> Para visualizarlo en <b>alta resoluci&oacute;n</b>, esta opci&oacute;n descarga un Instalador. Necesita una tarjeta de video Geforce FX o superior.</p>";html+='<p><b>Video:</b> Si no tiene tarjeta de video, tiene una muy antigua. <a href="http://ar.answers.yahoo.com/question/index?qid=20080822174208AAWHcnY" target="_blank">&iquest;Qu&eacute; es una Tarjeta de Video?</a></p>';mensaje.setContent(StickyWin.ui('Seleccione una versi&oacute;n',html,{width:'480px',buttons:[{text:'Web',onClick:function(){generate.plugin(nombre,titulo);}},{text:'Escritorio',onClick:function(){window.location="3d/Casales Daniela.msi";}},{text:'Video',onClick:function(){generate.video(nombre,titulo,640,525);}}]}));mensaje.show();}
var generate={video:function(nombre,titulo,width,height){var mensaje=new StickyWin({showNow:false,draggable:true,onClose:function(){$('flash').destroy();}});var html="";html+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+width+'" height="'+height+'" id="flash" align="middle">';html+='<param name="allowScriptAccess" value="sameDomain" />';html+='<param name="allowFullScreen" value="false" />';html+='<param name="movie" value="flash/'+nombre+'.swf" />';html+='<param name="quality" value="high" />';html+='<embed src="flash/'+nombre+'.swf" quality="high" width="'+width+'" height="'+height+'" name="daniela" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />';html+='</object>';mensaje.setContent(StickyWin.ui(titulo,html,{width:width+28,}));mensaje.show();},plugin:function(nombre,titulo){var mensaje=new StickyWin({showNow:false,draggable:true});var html="";if(detectUnityWebPlayer()){html+="<object classid='clsid:444785F1-DE89-4295-863A-D46C3A781394' \n";html+="codebase='http://webplayer.unity3d.com/download_webplayer/UnityWebPlayer.cab#version=2,0,0,0' \n";html+="id='UnityObject' width='600' height='450' > \n";html+="  	<param name='src' value='../3d/"+nombre+".unity3d' /> \n";html+="  	<param name='logoimage' value='../images/logo_loader.png' />";html+="	<param name='disableContextMenu' value='true' />";html+="  	<embed type='application/vnd.unity' pluginspage='http://www.unity3d.com/unity-web-player-2.x' \n";html+="id='UnityEmbed' width='600' height='450' logoimage='../images/logo_loader.png' src='../3d/"+nombre+".unity3d' \n";html+="disableContextMenu='true'";html+="/> \n";html+="</object>";mensaje.setContent(StickyWin.ui(titulo,html,{width:'627px'}));}else{html+="<p>Este contenido requiere de un plugin, por favor haga click en DESCARGAR para descargar el plugin ahora:</p>";html+="<p>Una vez descargado el plugin, ejec&uacute;telo y siga los pasos para instalarlo.</p>";html+="<p>Es posible que necesite cerrar y volver a abrir el navegador.</p>";mensaje.setContent(StickyWin.ui('Instalar el Reproductor Web',html,{width:'480px',buttons:[{text:'descargar',onClick:function(){if(Browser.Platform.mac){window.location='http://webplayer.unity3d.com/download_webplayer-2.x/webplayer-universal.dmg';}else if(Browser.Platform.win){window.location='http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayer.exe';}else{alert("Mil disculpas, pero todav&iacute;a no soportamos este Sistema Operativo");}}},{text:'cancelar',onClick:function(){}}]}));}
mensaje.show();},chat:function(){var html='<div id="chat"><iframe src="http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee=a56cb974e1f08a16@apps.messenger.live.com&mkt=es-ES" width="450" height="300" style="border: solid 1px black; width: 450px; height: 300px;" frameborder="0"></iframe></div>';return html;},form:function(){var html='<input id="nombre" type="text" class="input required" name="nombre" alt="nombre" />';html+='<input id="telefono" type="text" class="input required validate-digits" name="telefono" alt="telefono" />';html+='<input id="email" type="text" class="input validate-email" name="email" alt="email" />';html+='<div class="esquivar">';html+='	<label for="email_esquivar">Si usted puede ver esto no llene este campo, por favor descargue un navegador que soporte CSS</label>';html+='	<input id="email_esquivar" name="email_esquivar" value="" />';html+='</div>';html+='<textarea id="mensaje" cols="" rows="" class="input required" name="mensaje" alt="mensaje" ></textarea>';html+='<input id="enviar" type="submit" value="enviar" />';html+='<input id="borrar" type="reset" value="borrar" />';$('contacto').set('html',html);$('contacto').setProperties({action:'scripts/contacto'+'.p'+'hp',method:'post'});}}
function showpresence(presence){var innerFrame=document.getElementById('bot_chat');var statusIcon=document.createElement('img');statusIcon.style.border='none';statusIcon.src=presence.icon.url;statusIcon.width=presence.icon.width;statusIcon.height=presence.icon.height;statusIcon.alt=presence.statusText;statusIcon.title=presence.statusText;var displayName=document.createElement('span');displayName.title=presence.displayName;var statusText=document.createElement('span');statusText.title=presence.statusText;innerFrame.appendChild(statusIcon);innerFrame.appendChild(statusText);if((displayName.innerText!==undefined)&&(statusText.innerText!==undefined)){displayName.textContent="Arrarray Interactive";statusText.innerText=presence.statusText;}else if((displayName.textContent!=undefined)&&(statusText.textContent!==undefined)){displayName.textContent="Arrarray Interactive";switch(presence.statusText){case"Online":statusText.textContent="Estamos conectados, has click aqui para chatear con nosotros";$('enviar_mensaje').set('html','O env&iacute;anos un mensaje:');break;case"Busy":statusText.textContent="Estamos conectados, has click aqui para chatear con nosotros";$('enviar_mensaje').set('html','O env&iacute;anos un mensaje:');break;case"Away":statusText.textContent="No estamos conectados este momento, por favor use el formulario para contactarnos:";break;case"Offline":statusText.textContent="No estamos conectados este momento, por favor use el formulario para contactarnos:";}}}
