
/*--scripts to display the B-Clip video clips */

function startDarkChange(){
	BClipID = setInterval("changeVidSize()", 300);
}

function changeVidSize() {
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}

	document.body.scrollTop = 0;

	document.getElementById('darkScreen').style.top = 0;
	document.getElementById('uponor_vid').style.top = 0;

	document.getElementById('darkScreen').style.width = myWidth;
	document.getElementById('darkScreen').style.height = myHeight;
	document.getElementById('uponor_vid').style.width = myWidth;
	document.getElementById('uponor_vid').style.height = myHeight;

}

function startVideo(title){
    self.scrollTo(0, 0);
	document.getElementById('vid_iframe').src = "http://bclip.com/link.php?num=15&vid=" + title;
	document.getElementById('uponor_vid').style.display='block';
	startDarkChange();
}

function exitVideo(){
	document.getElementById('vid_iframe').src = "about:blank";
	document.getElementById('uponor_vid').style.display='none';
	clearInterval(BClipID);
}
