/* $Id: immagini_gara.js,v 1.16 2009/03/21 12:57:31 Mario Exp $ */
/*
  Copyright (c) 2002-2009 Mario Cimento - cimario@tiscali.it - http://creativecommons.org/licenses/by-nc-nd/2.5/it/
  - Script per scrivere la tabella delle immagini di una singola gara -
*/
var num_images=IMAGES_src.length;var ori_present=0;if(typeof (IMAGES_src_ori)=="object"){ori_present=1}var thumb_present=0;if(typeof (IMAGES_thumbs_ext)=="string"){thumb_present=1}var yt_present=0;if((IMAGES_raceName.length>0)&&(typeof (YT)=="object")){yt_present=1;var autoIncludeFunctions={"../js/yt.js":["write_yt"]};for(var fileName in autoIncludeFunctions){var functionNames=autoIncludeFunctions[fileName];for(var i=0;i<functionNames.length;i++){var functionName=functionNames[i];if(typeof (window[functionName])!="function"){window[functionName]=function(){loadScript(fileName,functionNames);var execCode=functionName+"( ";for(var i=0;i<arguments.length;i++){execCode+="arguments["+i+"],"}execCode=execCode.substr(0,execCode.length-1)+")";return eval(execCode)}}}}}var images_w_l=150;var images_w_b=400;var fname="";var fext="";var img_src="";if(typeof (IMAGES_width)=="number"){images_w_l=IMAGES_width}if(IMAGES_name.length>0){document.write('<a name="'+IMAGES_name+'"></a>')}document.write('<div align="center">');if((IMAGES_name.length>0)&&!((typeof (IMAGES_avoidHead)=="number")&&(IMAGES_avoidHead==1))){document.write("<br>");document.write('<div align="center" class="race_title_big">Immagini'+((yt_present)?"/Video":"")+"</div>");document.write("<br>")}if(IMAGES_raceName.length>0){document.write('<table align="center" valign="top" class="table_out_gray2" width="650">');document.write(' <td align="center">');document.write('   <table align="center" width="650" border="0" cellspacing="0" cellpadding="2" class="table_in_gray1_600">');document.write('    <tr><td width="100%" align="center">');document.write('     <div align="center" style="border:2px inset #eeeeee;padding-left: 10px; padding-right: 10px;">');document.write('<font color="#771111" face="Verdana" size="5"><b>'+IMAGES_raceName+" highlights </b>")}if(IMAGES_archLink.length>0){document.write('<br><a href="'+IMAGES_archLink+'">');document.write('<strong><font color="#993300" size="2"><u>scarica qui l\'archivio completo');if(typeof (IMAGES_archLink_size)!="undefined"){document.write(" ("+IMAGES_archLink_size+")")}document.write("</u></font></strong></a>")}if(typeof (IMAGES_gallery)!="undefined"){document.write('<br><a href="javascript:myLightboxStart(IMAGES_gallery);">');document.write('<b><font color="#0099ff" size="4" face="Verdana"><u>');document.write("Vedi la splendida galleria fotografica");document.write('<font size="1"> ('+(IMAGES_gallery.length-1)+" foto)</font>");document.write("</u></font></b></a>")}if(IMAGES_raceName.length>0){document.write("</font><br><br>")}document.write('<font face="Verdana" size="2"><strong>Cliccate sulle immagini per vederle a tutto schermo'+((ori_present)?"":"<br>Passateci sopra il mouse per ingrandirle")+"</strong></font>");document.write("<br>");document.write('<STYLE TYPE="text/css">');document.write("\n.images_table_style {padding:0px 2px 0px 2px;}");document.write("\n</STYLE>");document.write('<table align="center" border="0" cellspacing="2px" cellpadding="2px">');for(var im=0;im<num_images;im++){if(!(im%3)){document.write("<tr>")}document.write("<td>");document.write('<table width="'+images_w_l+'" align="center" border="1" cellspacing="0px" cellpadding="0px" class="images_table_style"');document.write('<tr bgcolor="#000000">');document.write('<td align="center">');document.write("<a ");if(ori_present){document.write("onclick=\"javascript:window.open('"+IMAGES_src_ori[im]+"','_blank','width="+screen.availWidth+",height="+screen.availHeight+",resizable=1,status=0,scrollbars=1,location=0,top=0,left=0');\"");document.write('onMouseOver="image'+im+IMAGES_name+".style.cursor='pointer'; return true;\"")}else{document.write("onclick=\"javascript:window.open('"+IMAGES_src[im]+"','_blank','width="+screen.availWidth+",height="+screen.availHeight+",resizable=1,status=0,scrollbars=1,location=0,top=0,left=0');\"");document.write('onMouseOver="image'+im+IMAGES_name+".style.cursor='pointer'; image"+im+IMAGES_name+".width="+images_w_b+";window.status='"+IMAGES_status[im]+"';return true;\"");document.write('onMouseOut="image'+im+IMAGES_name+".width="+images_w_l+";window.status='';return true\"")}document.write(">");if(thumb_present){fext=IMAGES_src[im].substring(IMAGES_src[im].lastIndexOf("."),IMAGES_src[im].length);fname=IMAGES_src[im].substring(0,IMAGES_src[im].lastIndexOf("."));img_src=fname+IMAGES_thumbs_ext+fext}else{img_src=IMAGES_src[im]}document.write('<img src="'+img_src+'" name="image'+im+IMAGES_name+'" width="'+images_w_l+'" alt="'+IMAGES_alt[im]+'" border="0">');document.write("</a>");document.write("</td>");document.write("</tr>");if(IMAGES_comment[im].length>0){document.write('<tr height="35" bgcolor="#000000">');document.write('<td align="center">');document.write('<font face="Verdana" size="2" color="#ffffff">'+IMAGES_comment[im]+"</font>");document.write("</td>");document.write("</tr>")}document.write("</table>");document.write("</td>");if(!((im+1)%3)){document.write("</tr>")}}document.write("</table>");if(yt_present){document.write("<br>");document.write('<hr><font color="#771111" face="Verdana" size="5"><b>'+IMAGES_raceName+" video </b></font>");write_yt()}if(IMAGES_raceName.length>0){document.write("     </div>");document.write("    </td></tr>");document.write("  </table>");document.write(" </td>");document.write("</table>")}document.write("</div>");function include(C){if(document.createElement&&document.getElementsByTagName){var B=document.getElementsByTagName("head")[0];var A=document.createElement("script");A.setAttribute("type","text/javascript");A.setAttribute("src",C);B.appendChild(A)}else{alert("Your browser doesn't handle the DOM standard well.")}}function getXMLHttpObj(){if(typeof (XMLHttpRequest)!="undefined"){return new XMLHttpRequest()}var A=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP"],B;for(B=0;B<A.length;B++){try{return new ActiveXObject(A[B])}catch(C){}}return null}function loadScript(scriptpath,functions){var oXML=getXMLHttpObj();oXML.open("GET",scriptpath,false);oXML.send("");eval(oXML.responseText);for(var i=0;i<functions.length;i++){window[functions[i]]=eval(functions[i])}}