// this script displays a youtube video 

addJavascript("../../associates/amazonproduct.js",'head'); 

var link = getProduct(document.title);

var html = '<h2><small><small><small>Related item on Amazon</small></small></small></h2>' 
         + '<span id="main-amazonproduct" >' + link + '</span>';

// PROGRAM
function displayVideo(video)
{
var width='480';
var height='330';

document.write("<table style='margin:0; padding:0; ");
document.write("border:none; border-width:0; border-collapse:collapse; border-spacing=0;  ' >");
document.write("<thead><tr>")

//document.write("<td style='text-align:center;' >");
//document.write("</td>");

document.write("<td style='text-align:left;' >");

document.write("<object id='myObject' width='");
document.write(width);
document.write("' height='");
document.write(height);
document.write("' ><param name='movie' value='http://www.youtube.com/v/");
document.write(video);
document.write("&hl=en_GB&fs=1&rel=0'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/");
document.write(video);
document.write("&hl=en_GB&fs=1&rel=0' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='");
document.write(width);
document.write("' height='");
document.write(height);
document.write("' ></embed></object>");
//document.write(html);

document.write("</td>");

document.write("</tr></thead><tbody></tbody></table>");
}

function addJavascript(jsname,pos) {
 var th = document.getElementsByTagName(pos)[0];
 var s = document.createElement('script');
 s.setAttribute('type','text/javascript');
 s.setAttribute('src',jsname);
 th.appendChild(s);
 } 

// END 
