// myRepono JS
// Copyright 2010 ionix Limited
var stretchy_tags=new Array();function stretchy_content(){var theClass="stretchy_content";var stretchy_tags=document.getElementsByTagName("*");var client_window_width=getWindowWidth();var content_width="1140";var stretchy_carousel="320";var stretchy_carousel_inner=parseInt(content_width)-parseInt(60);if(client_window_width<content_width){content_width=parseInt(client_window_width)-parseInt(40);if(content_width<940){content_width="940";}
if(content_width>1140){var content_width="1140";}}
if((document.getElementById('stretchy_carousel'))&&(document.getElementById('stretchy_carousel')!=null)&&(document.getElementById('stretchy_carousel')!=undefined)){var width_base_factor=parseInt(1200)-parseInt(content_width);var width_base_multiplier=parseInt(content_width)*0.22;var stretchy_carousel_container_height=parseInt(width_base_factor)+parseInt(width_base_multiplier);if(stretchy_carousel_container_height>460){stretchy_carousel_container_height="460";}else if(stretchy_carousel_container_height<320){stretchy_carousel_container_height="320";}else{stretchy_carousel_container_height=Math.round(stretchy_carousel_container_height);}
if(content_width>=1040){stretchy_carousel_container_height="320";}else if(content_width>=970){stretchy_carousel_container_height=parseInt(stretchy_carousel_container_height)-60;if (stretchy_carousel_container_height<350) {stretchy_carousel_container_height = "350";} else if(stretchy_carousel_container_height<400){stretchy_carousel_container_height="400";}}
var stretchy_carousel=stretchy_carousel_container_height;var stretchy_carousel_container=parseInt(stretchy_carousel)+20;var stretchy_carousel_inner=parseInt(content_width)-60;var stretchy_carousel_select=parseInt(stretchy_carousel)-20;}
for(i=0;i<stretchy_tags.length;i++){if(stretchy_tags[i].className==theClass){stretchy_tags[i].style.width=content_width+"px";if(stretchy_tags[i].width){stretchy_tags[i].width=content_width;}}}
if((document.getElementById('stretchy_carousel'))&&(document.getElementById('stretchy_carousel')!=null)&&(document.getElementById('stretchy_carousel')!=undefined)){document.getElementById('stretchy_carousel').style.height=stretchy_carousel+"px";document.getElementById('stretchy_carousel_container').style.height=stretchy_carousel_container+"px";document.getElementById('stretchy_carousel_container').height=stretchy_carousel_container;document.getElementById('stretchy_carousel_inner').style.width=stretchy_carousel_inner+"px";document.getElementById('stretchy_carousel_inner').width=stretchy_carousel_inner;document.getElementById('stretchy_carousel_select').style.top=stretchy_carousel_select+"px";}}
function getWindowWidth(){var windowWidth=0;if(typeof(window.innerWidth)=='number'){windowWidth=window.innerWidth;}else{if(document.documentElement&&document.documentElement.clientWidth){windowWidth=document.documentElement.clientWidth;}else{if(document.body&&document.body.clientWidth){windowWidth=document.body.clientWidth;}}}
return windowWidth;}
stretchy_content();
