/* $Id: yt.js,v 1.12 2009/05/05 22:06:17 Mario Exp $ */
/*
  www.clubkart.it - Copyright (c) 2002-2009 Mario Cimento - cimario@tiscali.it - http://creativecommons.org/licenses/by-nc-nd/2.5/it/
  Reverse engineering of this file is strictly prohibited. File protected by copyright law and provided under license.
  - Script per inserire video di YouTube -
*/
var n_v_per_row=2;var v_w_l=190;var v_h_l=160;var v_w_b=425;var v_h_b=355;var yt_spec="&amp;rel=1&amp;color1=0x550000&amp;color2=0xdd0000&amp;border=0&amp;fs=1";document.write('<STYLE TYPE="text/css">');document.write("\n.yt_white_sign, a:link.yt_white_sign, a:visited.yt_white_sign, a:hover.yt_white_sign\n");document.write("   {font-family:Verdana;font-size:14pt;font-weight:bold;text-decoration:none;color:#ffffff;}");document.write("\n.yt_white_word8, a:link.yt_white_word8, a:visited.yt_white_word8, a:hover.yt_white_word8\n");document.write("   {font-family:Verdana;font-size:8pt;font-weight:bold;text-decoration:none;color:#ffffff;}");document.write("\n.yt_white_word6, a:link.yt_white_word6, a:visited.yt_white_word6, a:hover.yt_white_word6\n");document.write("   {font-family:Verdana;font-size:6pt;font-weight:bold;text-decoration:none;color:#ffffff;}");document.write("\n</STYLE>");function write_yt(){if(typeof (YT)!="object"){return }var A=YT.length;document.write('<table cellpadding="5" cellspacing="10">');for(v=0;v<A;v++){if(!(v%n_v_per_row)){document.write("<tr>")}document.write('<td align="center">');document.write('<table cellpadding="2" cellspacing="0" bgcolor="#000000">');document.write(" <tr>");document.write('  <td colspan="2" align="center">');document.write('   <a target="_blank" class="yt_white_word8" href="http://www.youtube.com/watch?v='+YT[v].yt_id+'">');document.write(YT[v].label+"</a>");document.write("  </td>");document.write(" </tr>");document.write(" <tr>");if((typeof (YT[v].yt_img)=="string")&&(YT[v].yt_img.length>0)){document.write('  <td colspan="2" align="center">');document.write('   <img style="cursor:pointer;" onclick="verifyEmbed(\''+YT[v].yt_id+"', "+v_w_l+", "+v_h_l+');" width="'+v_w_l+'" height="'+v_h_l+'" id="i'+YT[v].yt_id+'" border="0" src="'+YT[v].yt_img+'">');document.write("  </td>")}else{document.write('  <td colspan="2" align="center">');document.write('   <object id="o'+YT[v].yt_id+'" width="'+v_w_l+'" height="'+v_h_l+'">');document.write('   <param name="movie" value="http://www.youtube.com/v/'+YT[v].yt_id+yt_spec+'"></param>');document.write('   <embed id="e'+YT[v].yt_id+'" src="http://www.youtube.com/v/'+YT[v].yt_id+yt_spec+'" type="application/x-shockwave-flash" allowfullscreen="true" width="'+v_w_l+'" height="'+v_h_l+'"></embed>');document.write("   </object>");document.write("  </td>")}document.write(" </tr>");document.write(" <tr>");document.write('  <td align="left">');document.write('   <a class="yt_white_sign" style="cursor:pointer;"');document.write("    onclick=\"verifyEmbed('"+YT[v].yt_id+"', "+v_w_b+", "+v_h_b+');">');document.write('     <img src="../images/icona_piu.gif" border="0" alt="ingrandisci" title="ingrandisci"></a>');document.write('   <a class="yt_white_sign" style="cursor:pointer;"');document.write("    onclick=\"verifyEmbed('"+YT[v].yt_id+"', "+v_w_l+", "+v_h_l+');">');document.write('     <img src="../images/icona_meno.gif" border="0" alt="riduci" title="riduci"></a>');document.write('   <a class="yt_white_sign" style="cursor:pointer;"');document.write('      href="http://gdata.youtube.com/feeds/base/users/clubkart/uploads?alt=rss&amp;v=2&amp;orderby=published&amp;client=ytapi-youtube-profile" target="_blank">');document.write('     <img src="../rss/images/rss_15_black.gif" border="0" alt="RSS dei video di ClubKart" title="RSS dei video di ClubKart"></a>');document.write("  </td>");document.write('  <td align="right">');document.write('   <a target="_blank" class="yt_white_word6" href="http://www.youtube.com/watch?v='+YT[v].yt_id+'">');document.write('   guardalo su <img src="../images/logoYouTube50.gif" border="0"></a>');document.write("  </td>");document.write(" </tr>");document.write("</table>");document.write("</td>");if(!((v+1)%n_v_per_row)){document.write("</tr>")}}document.write("</table>");if(typeof (YT_addon)=="string"){document.write(YT_addon)}}function verifyEmbed(F,B,E){var D;var C;D=document.getElementById("i"+F);if(D==null){D=document.getElementById("e"+F);if(D==null){D=document.getElementById("o"+F);if(D==null){return }}}if((D.nodeName.toLowerCase())=="img"){if((C=D.parentNode)==null){return }C.removeChild(D);delete D;var A='   <object id="o'+F+'" width="'+B+'" height="'+E+'">     <param name="movie" value="http://www.youtube.com/v/'+F+yt_spec+'&amp;autoplay=1"></param>     <param name="allowFullScreen" value="true"></param>     <embed id="e'+F+'" src="http://www.youtube.com/v/'+F+yt_spec+'&amp;autoplay=1" type="application/x-shockwave-flash"            allowfullscreen="true" width="'+B+'" height="'+E+'"></embed>   </object>';C.innerHTML=fixEmbeddedVideo(A);if((D=document.getElementById(F))==null){return }}D.width=B;D.height=E}var fixEmbeddedVideo=function(A){if(A&&A.toLowerCase().indexOf("classid")==-1){var B=A.toLowerCase().indexOf("object ")+"object ".length;return A.substr(0,B)+'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+A.substr(B)}else{return A}}