//merci a oznog, http://www.trucsweb.com
// nbrIMG = numero de imagenes menos 1 (la tabla array empieza por "0")
var nbrIMGmain = 17;

var aURLmain = new Array(nbrIMGmain+1);
var aHeight = new Array(nbrIMGmain+1);

aURLmain[0]="http://www.youtube.com/v/kVyUMrHIcTg&autoplay=1";
aURLmain[1]="http://www.youtube.com/v/wXJd9zod6mU&autoplay=1";
aURLmain[2]="http://www.youtube.com/v/LW6PaZ5VGqY&autoplay=1";
aURLmain[3]="http://www.youtube.com/v/kzT3sHp1Crs&autoplay=1";
aURLmain[4]="http://www.youtube.com/v/TEvwzaYYwF8&autoplay=1";
aURLmain[5]="http://www.youtube.com/v/qWou_RUMh18&autoplay=1";
aURLmain[6]="http://www.youtube.com/v/VkBtu2V32bs&autoplay=1";
aURLmain[7]="http://www.youtube.com/v/JspclR4RPcg&autoplay=1";
aURLmain[8]="http://www.youtube.com/v/wiKvzQbKo70&autoplay=1";
aURLmain[9]="http://www.youtube.com/v/5ByuRvR3my8&autoplay=1";
aURLmain[10]="http://www.youtube.com/v/BTkE32V9884&autoplay=1";
aURLmain[11]="http://www.youtube.com/v/pCZ9XsQCG3M&autoplay=1";
aURLmain[12]="http://www.youtube.com/v/hxyrNeXpOW8&autoplay=1";
aURLmain[13]="http://www.youtube.com/v/__TtxyU3qNE&autoplay=1";
aURLmain[14]="http://www.youtube.com/v/43s_6FOM2a4&autoplay=1";
aURLmain[15]="http://www.youtube.com/v/rRKHwO-VSPo&autoplay=1";
aURLmain[16]="http://www.youtube.com/v/uEU46IQA-Jk&autoplay=1";
aURLmain[17]="http://www.youtube.com/v/__TtxyU3qNE&autoplay=1";


aHeight[0]="270";
aHeight[1]="270";
aHeight[2]="270";
aHeight[3]="270";
aHeight[4]="270";
aHeight[5]="270";
aHeight[6]="270";
aHeight[7]="270";
aHeight[8]="270";
aHeight[9]="270";
aHeight[10]="270";
aHeight[11]="270";
aHeight[12]="270";
aHeight[13]="270";
aHeight[14]="270";
aHeight[15]="270";
aHeight[16]="270";
aHeight[17]="270";

function rndPagemain(){
var rndmain = -1;
while (rndmain < 0 || rndmain > nbrIMGmain || isNaN(rndmain)){
rndmain = parseInt(Math.random()*(nbrIMGmain+1));
}
return rndmain;
}
numIMGmain = rndPagemain();
AURLmain = aURLmain[numIMGmain];
AHeight = aHeight[numIMGmain];

//document.write("<a href='"+urlImagenmain+"'><img src='"+RandomImagenmain+"' alt='"+AltImagenmain+"' width='260' border='0' /></a>");
//document.write("<div id='contentLeftBottom01'><div class='textLeftBottom'><a href='#'><img src='http://www.vpacheco.com/images/small_doublearrow_right_onBlue.gif' width='12' height='11' alt='mas' /></a><a href='"+urlImagenmain+"' class='modulecopylink'>más información</a></div></div>");
//document.write('<div id="contentLeftBottom01"><div class="bodyText7"><img src="images/small_doublearrow_right_onBlue.gif" width=12 height=11 alt=more /><a href=http://www.vpacheco.com/toldos/novedades/index.htm>nuevos productos</a> | <a href=# target=name onclick="window.open('"http://www.youtube.com/profile?user=toldospacheco&view=videos&sort=v"','"name"','"height=600, width=660,toolbar=no,directories=no,status=no, menubar=no, scrollbars=no,resizable=no"'); return false;">Videos de toldos</a>  </div></div>');

document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='335' height='"+AHeight+"' title='Toldos'>");
document.write("<param name='movie' value='"+AURLmain+ "' />");
document.write("<param name='quality' value='high' />");
document.write("<embed src='"+AURLmain+"' quality='high'");
document.write("pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='330' height='"+AHeight+"'></embed>");
document.write("</object>");

//document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0' width='230' height='"+AHeight+"' title='Toldos'>");
//document.write("<param name='movie' value='http://www.vpacheco.com/flash/nuevaexposicionmadrid.swf' />");
//document.write("<param name='quality' value='high' />");
//document.write("<embed src='http://www.vpacheco.com/flash/nuevaexposicionmadrid.swf' quality='high' pluginspage='http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='230' height='"+AHeight+"'></embed>");
//document.write("</object>");

