197
| <![CDATA[<script type="text/javascript">
//<![CDATA[
function YoutubeGalleryClientWidth1() {
return YoutubeGalleryResults1 (
window.innerWidth ? window.innerWidth : 0,
document.documentElement ? document.documentElement.clientWidth : 0,
document.body ? document.body.clientWidth : 0
);
}
function YoutubeGalleryScrollLeft1() {
return YoutubeGalleryResults1 (
window.pageXOffset ? window.pageXOffset : 0,
document.documentElement ? document.documentElement.scrollLeft : 0,
document.body ? document.body.scrollLeft : 0
);
}
function YoutubeGalleryFindHorizontalOffset1(id) {
var node = document.getElementById(id);
var curleft = 0;
var curleftscroll = 0;
var scroll_left = YoutubeGalleryScrollLeft1();
if (node.offsetParent) {
do {
curleft += node.offsetLeft;
curleftscroll =0;
} while (node = node.offsetParent);
var imaged_x=(curleft - curleftscroll)-scroll_left;
return imaged_x;
}
return 0;
}
function YoutubeGalleryResults1(n_win, n_docel, n_body) {
var n_result = n_win ? n_win : 0;
if (n_docel && (!n_result || (n_result > n_docel)))
n_result = n_docel;
return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
function YoutubeGalleryAutoResizePlayer1(){
var clientWidth=YoutubeGalleryClientWidth1();
var playerObject=document.getElementById("youtubegalleryplayerid_1");
var mainObject=document.getElementById("YoutubeGalleryMainContainer1");
var parentObject=mainObject.parentNode;
var parentWidth=parentObject.offsetWidth;
var secondaryObject=document.getElementById("YoutubeGallerySecondaryContainer1");
var playerWidth=400;
var x=YoutubeGalleryFindHorizontalOffset1("YoutubeGalleryMainContainer1");
var setWidth=false;
if(playerWidth>parentWidth)
{
playerWidth=parentWidth;
setWidth=true;
}
if(x+playerWidth>clientWidth)
{
playerWidth=clientWidth-x;
setWidth=true;
}
if(playerObject.width!=playerWidth)
setWidth=true;
if(setWidth)
{
mainObject.style.width= (playerWidth) + "px";
var newH=300/(400/playerWidth);
secondaryObject.style.width= (playerWidth) + "px";
secondaryObject.style.height= (newH) + "px";
playerObject.width= (playerWidth) + "px";
playerObject.height= (newH) + "px";
}
}
//]]>
</script>]]>
|