function OpenWindow(windowURL,w,h)

{ 

var strOpt="height="+h+",width="+w+",menubar=no,personalbar=no,resizable=no,scrollbars=no,status=no,toolbar=no"; 

closeup = window.open(windowURL,"newwindow",strOpt);  

closeup.focus();

}





function setActiveStyleSheet(title) {

  var i, a, main;

  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {

    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {

      a.disabled = true;

      if(a.getAttribute("title") == title) a.disabled = false;

    }

  }

}



	

	function setRatio(img)

		{

		var imageratio = img.height / img.width;

		

		

		 var window_width = 0, window_height = 0;

		  if( typeof( window.innerWidth ) == 'number' ) {

			//Non-IE

			window_width = window.innerWidth;

			window_height = window.innerHeight;

		  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {

			//IE 6+ in 'standards compliant mode'

			window_width = document.documentElement.clientWidth;

			window_height = document.documentElement.clientHeight;

		  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {

			//IE 4 compatible

			window_width = document.body.clientWidth;

			window_height = document.body.clientHeight;

		  }



		

		

		/*var window_height = (document.body.clientHeight === undefined)?window.innerHeight:document.body.clientHeight;

		var window_width = (document.body.clientWidth === undefined)?window.innerWidth:document.body.clientWidth;*/

		window_ratio = (window_height-52) / window_width;



		if(window_ratio < imageratio)

			{

				img.style.height = (window_height-52)+'px';

				img.style.width = 'auto';

			}

		else

			{

				img.style.width = '100%';

				img.style.height = 'auto';

			}

			

			

		}
		
		
	function setVideoRatio(video,video_width,video_height)
		{
			
			
			var window_width = 0, window_height = 0;

			  if( typeof( window.innerWidth ) == 'number' ) {

				//Non-IE

				window_width = window.innerWidth;

				window_height = window.innerHeight;

			  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {

				//IE 6+ in 'standards compliant mode'

				window_width = document.documentElement.clientWidth;

				window_height = document.documentElement.clientHeight;

			  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {

				//IE 4 compatible

				window_width = document.body.clientWidth;

				window_height = document.body.clientHeight;

			  }
			  
			  window_height = window_height - 52; // deduct 52px for header and footer area
			  window_width=800; // temporary setting for constraining to 800px - remove this line for full window
			  
			  
			  var video_ratio = video_width / video_height;
			  var window_ratio = window_width / window_height;
			  
			  if(window_ratio > video_ratio)

					{
						// window narrower than video width - constrain to width				
						video.style.height = window_height + 'px';
						video.style.width = (video_width * window_height / video_height) + 'px';
						
					}

				else

					{
						// window wider than video width - constrain to height					
						video.style.height = (video_height * window_width / video_width) + 'px';
						video.style.width = window_width + 'px';

						video.style.top=(window_height - (video_height * window_width / video_width))/2 + 'px';

					}
			  
		}
		
/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
*/
this.vtip=function(){this.xOffset=-30;this.yOffset=40;$(".vtip").unbind().hover(function(a){this.t=this.title;this.title="";this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("body").append('<p id="vtip"><img id="vtipArrow" />'+this.t+"</p>");$("p#vtip #vtipArrow").attr("src","../../images/vtip_arrow.png");$("p#vtip").css("top",this.top+"px").css("left",this.left+"px").fadeIn("fast")},function(){this.title=this.t;$("p#vtip").fadeOut("fast").remove()}).mousemove(function(a){this.top=(a.pageY+yOffset);this.left=(a.pageX+xOffset);$("p#vtip").css("top",this.top+"px").css("left",this.left+"px")})};jQuery(document).ready(function(a){vtip()});
		
